Commit Graph

59 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
8535bb3bf1 Minimally integrate SPIR-T (opt-in via RUSTGPU_CODEGEN_ARGS=--spirt). 2022-12-12 17:14:35 +02:00
Eduard-Mihai Burtescu
b3c280424c Migrate rustc_codegen_spirv env vars to codegen args. 2022-12-09 11:46:27 +02:00
Sylvester Hesp
097ba40bed Fixed some errors in documentation 2022-10-19 17:36:43 +03:00
Sylvester Hesp
c3a9b9fd3e
Migration from register_attr to register_tool (#926)
* Accept `#[rust_gpu::spirv()]` attributes rather than `#[spirv()]` in backend
* Implemented `#[spirv(..)]` proc macro attribute for all platforms that conditionally translates to `#[rust_gpu::spirv()]` based on platform
* Changed `SpirvBuilder` to always apply `register_tool(rust_gpu)` attribute to shader crates
* Updated docs
* Added changelog
2022-10-19 09:50:24 +00:00
tata
a435c93317 Add note comment about environment variable 2022-05-21 21:52:26 +03:00
Ashley Hauck
f780364317
rustup update (#840)
* rustup update

* asm->core::arch::asm
2022-01-13 17:27:33 +02:00
Ashley Hauck
edd0a67392
Add docs for linux package requirements (#820) 2021-12-08 15:33:10 +02:00
Ashley Hauck
2e4de94a66
Generate bools as bools instead of u8 (#809)
* Generate bools as bools instead of u8

* convert bool->int select to cast
2021-11-30 13:12:13 +00:00
Ashley Hauck
fe5c613ac1
Document behavior of bools in asm (#786) 2021-10-29 14:05:24 +03:00
Ashley Hauck
5633a79d93
Document build-override to speed up shader building (#787) 2021-10-28 13:17:39 +00:00
Ashley Hauck
44c9fdd8c5
Release v0.4.0-alpha.12 (#719) 2021-08-12 10:46:32 +00:00
Markus Siglreithmaier
46c9ea0c9c
book: Add section for storage class interference (#714)
* book: add section for workgroup memory

* book: add section regarding storage class interference
2021-08-10 11:21:49 +00:00
Markus Siglreithmaier
2ddae102eb
book: add section for workgroup memory (#713) 2021-08-10 08:32:51 +02:00
Ashley Hauck
819365cbae
Release v0.4.0-alpha.11 (#702) 2021-08-02 14:02:02 +00:00
Ashley Hauck
8924fe7b4c
Clean up DUMP environment variables (#673) 2021-06-17 17:07:35 +02:00
Ashley Hauck
e1a000d408
Nuke const generics feature (#661)
* Nuke const generics feature

* Remove spirv(image_type) attribute
2021-06-15 09:19:23 +02:00
Ashley Hauck
c829157b8b
Fix up some outdated documentation (#650) 2021-06-09 12:21:42 +02:00
Ashley Hauck
64380d609a
Add Image! docs to book (#652) 2021-06-09 12:18:05 +02:00
Markus Siglreithmaier
486a3cee2e
Always emit cargo dependency information (#618)
* spirv-builder: Add more control over cargo metadata printout

* lint fix
2021-06-03 22:03:03 +02:00
XAMPPRocky
b6311789bb
Add new handling for SPIR-V targets (#559)
* Add new handling for SPIR-V targets

* Ensure target is always three components
2021-04-12 11:19:28 +00:00
Anirudh S
439dc5c6a1
Fix grammatical typo (#588)
Add preposition "to" to make the documentation more clear.

Consulted in the Discord server to confirm this.
2021-04-12 07:34:39 +02:00
Urho Laukkarinen
fccf8418c3
Update .cargo/config guide in the book (#589)
The .cargo/config snippet in the book was missing
a line without which the build gave an error
`error: Unresolved symbol "memcmp"`
2021-04-12 07:33:59 +02:00
Eduard-Mihai Burtescu
4395b84114 Deprecate #[spirv(block)] and auto-wrap in "interface blocks" instead. 2021-04-05 20:45:59 +03:00
XAMPPRocky
3a53968817
Add support for multiple target environments (#533)
* Add support for multiple target environments

* updates from code review

* Update lib.rs
2021-03-29 18:43:07 +02:00
khyperia
bc5c45f696 docs 2021-03-26 13:15:29 +01:00
Eduard-Mihai Burtescu
e04e1f53fc Replace spirv_std::storage_class::X<T> with &T/&mut T and optionally #[spirv(x)]. 2021-03-23 09:30:24 +01:00
Eduard-Mihai Burtescu
54cb4ada2e compiletest: allow specifying filters via cargo compiletest .... 2021-03-22 19:01:56 +02:00
Eduard-Mihai Burtescu
b3c04e5951
compiletest: don't require -- to pass our specific flags. (#523)
* docs: removed outdated `cargo compiletest -- --clean` instructions.

* compiletest: don't require `--` to pass our specific flags.
2021-03-22 14:37:55 +00:00
XAMPPRocky
27eb1d1413
Refactor validation tests to use compiletest (#464)
* Refactor validation tests to use compiletest

* Update tests/ui/lang/core/ptr/allocate_const_scalar.rs
2021-03-18 17:16:21 +00:00
Henno
d92480b781
update compute shader attribute docs (#499) 2021-03-17 08:21:25 +01:00
XAMPPRocky
6678f9a49d
Add entry point attribute configuration. (#458)
* Add entrypoint attribute configuration.

* Update with feedback

* Add docs

* fmt

* rm usused_attributes

* other changes

* fmt
2021-03-02 15:30:08 +02:00
Jesse
98fb0e0a94
docs: Clarify supported MoltenVK version for macOS (#352) 2021-02-26 14:34:21 +01:00
XAMPPRocky
b5a53feddd
Add SPIR-V minimization guide (#451) 2021-02-26 14:33:00 +01:00
XAMPPRocky
b60e258686
Add inline assembly docs (#410)
* Add inline assembly docs

* Add more docs

* Update inline-asm.md
2021-02-10 12:32:43 +00:00
XAMPPRocky
19cf332f6c
Mention web based ways to try rust-gpu (#388) 2021-01-21 08:52:21 +00:00
XAMPPRocky
b8cea94721
Add step about copying rust-toolchain into your project (#357)
* Add step about copying rust-toolchain into your project

* Update docs/src/writing-shader-crates.md

Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>

* Update writing-shader-crates.md

Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2021-01-04 17:29:23 +00:00
Zicklag
d431dfd637
Update .cargo/config Shader Compilation Setup (#356)
Update the example .cargo/config to match the rustc args
passed in by spirv-builder.
2020-12-28 06:54:01 +00:00
XAMPPRocky
ca8b389b6a
Update to use rust-toolchain toml (#284)
* Update to the new rust-toolchain format

* Remove unneeded docs

* Update CI for toolchain file

* Update ci.yaml

* Update ci.yaml

* Update deploy_docs.yml

* Update ci.yaml

* Update deploy_docs.yml

* Remove redundant `rustup component add` commands from ci.yaml.

* Shorten "Continuous integration" to "CI" in ci.yaml.

* Add a helpful message above the TOML in rust-toolchain.

* Don't update rustup in ci.yaml, GHA already has the right version.

Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2020-12-09 17:43:00 +02:00
Ashley Hauck
c70cee8f97
Add flat attribute (#317)
* Add flat attribute

* Document attributes
2020-12-04 11:20:58 +00:00
XAMPPRocky
3fdeeb3d48
Split introduction into two separate sections (#290) 2020-12-01 12:36:06 +00:00
Jake Shadle
0f3948dc27
Move out spirv-tools to separate repo (#237)
* Nuke spirv-tools

* Swap to use published spirv-tools crate
2020-11-13 09:57:12 +01:00
Dhruv Dhamani
e261b88a73
Update 001-resource-binding-syntax.md (#236)
small typo
2020-11-13 08:38:26 +01:00
Marijn Suijten
e8aef14347
Add Android support to wgpu example (#215)
* examples/wgpu: Handle escape to exit (same as ash example)

* examples/wgpu: Set up for use on Android

* examples/wgpu: Convert #[cfg] blocks to cfg_if

* examples/wgpu: Wait for events instead of busy-looping

The image currently does not change and the OS will notify us when to
redraw (ie. after window resizes). This is going to save power
especially on mobile devices.

As soon as interactive or animating visuals are introduced to this
example redraws can be requested with `window.request_redraw()`.

* examples/wgpu: Create swapchain in ::Resume on Android

* docs: Add Android to supported operating systems

* ci: Build test cross-compilation for Android

* HACK: ci: Create Android symlink without spaces

* ci: Set legacy ANDROID_HOME because ndk-build prefers deprecated var
2020-11-11 16:32:02 +01:00
XAMPPRocky
2942967607
Add initial platform support docs (#187)
* Add initial platform support docs

* Update platform-support.md

* Update platform-support.md
2020-11-02 16:07:34 +00:00
XAMPPRocky
ad610b57f5
Move top-level crates to crates/ directory (#200)
* Move top-level crates to crates/ directory

* Update docs

* Update test.sh

* Update docs.sh

* Update clippy.sh
2020-11-02 11:26:10 +01:00
Gray Olson
b12a2f3f6a
Cleanup pass on example shader and vk example-runner (#109)
* get rid of vertex buffers in example

* get rid of unused attributes in example shader

* use negative viewport height to match wgpu

* remove depth buffer

* use SRGB surface

* improve tonemapping

remove 'gamma correction' in favor of hardware srgb support

* make clippy happy

* move tonemapping out of sky(), rename gl_pos to builtin_pos

* rename shaders and use sky shader in wgpu example runner

* apply srgb OETF and invert clip space for cpu example runner

* restructure example directory structure according to #170

* update winit in wgpu example runner

* fix deny.toml example crate refs

* fix ci example name on maOS

* example-shader -> sky-shader in docs

* update sky shader image

* re-enable clippy and make it happy
2020-10-30 11:38:47 -07:00
meowjesty
e729aad3b7
repository 'https://github.com/EmbarkStudios.com/rust-gpu/' not found (#182)
```
git clone --recurse-submodules https://github.com/EmbarkStudios.com/rust-gpu
Cloning into 'rust-gpu'...
remote: Repository not found.
fatal: repository 'https://github.com/EmbarkStudios.com/rust-gpu/' not found
```

Removing the `.com` from EmbarkStudios solves it.
2020-10-30 07:55:22 +01:00
Jake Shadle
307d0da66b
Add spirv-tools and spirv-tools-sys crates to wrap usage of spirv-tools (#179)
* Add spirv-headers and spirv-tools as submodules

* Add simple generator and the generated code needed for compilation

* Add first pass on spirv-tools-sys

* Add first pass on spirv-tools

* Replace invocation of spirv-opt with spirv-tools crate

* Use C++11

* Placate clippy

* Add validation, replacing spirv-val with the spirv-tools crate

* Fix MSVC warning

* Use patched spirv-tools

* Fixup metadata

* Add same compiler flags as "official" build scripts

* Update spirv-tools and generated files

* Fixup

* Add assembler and example

* Use assembler in tests

* Oops, fix macos TARGET_OS

* write -> write_all

* Start splitting spirv-tools into a compiled vs tool feature set

* Checkpointing

* Checkpoint

* Boop

* Get tests to work both with installed and compiled tools

* Cleanup CI config

* Splits steps to clearly show how long each part of a longer (eg test)
step actually takes
* Label all steps

* Explicitly disable submodule checkout

* Rustfmt

* Rename features for consistency and fix clippy warnings

* Split "core" crates from examples

* Add run_clippy bash script

* Add test script

* Remove x flag

* Newline

* Actually print out errors from running val/opt

* Revert drive-by import merging

* Change intro to take the changes this PR has into account

* Actually run tests on Windows

* Fetch only the host target to reduce fetch times

* Add more info when a spirv tool returns a non-zero exit code

* Rustfmt

* Switch tool assembler to use files to see if it fixes windows

* Use files for input and output for now until I can figure out Windows being dumb

* Fix API docs generation

* Compile and use C++ code to check Windows issue

* Return to use installed tools
2020-10-29 23:03:07 +01:00
Jake Shadle
5aa7453b19 Revert "Replace usage of spirv-* binaries with spirv-tools rust crate (#117)"
This reverts commit 0bfe303a64.
2020-10-29 22:34:26 +01:00
Jake Shadle
0bfe303a64
Replace usage of spirv-* binaries with spirv-tools rust crate (#117)
* Add spirv-headers and spirv-tools as submodules

* Add simple generator and the generated code needed for compilation

* Add first pass on spirv-tools-sys

* Add first pass on spirv-tools

* Replace invocation of spirv-opt with spirv-tools crate

* Use C++11

* Add validation, replacing spirv-val with the spirv-tools crate

* Use patched spirv-tools

* Fixup metadata

* Add same compiler flags as "official" build scripts

* Update spirv-tools and generated files

* Add assembler and example

* Use assembler in tests

* Start splitting spirv-tools into a compiled vs tool feature set

* Get tests to work both with installed and compiled tools

* Cleanup CI config

* Splits steps to clearly show how long each part of a longer (eg test)
step actually takes
* Label all steps

* Explicitly disable submodule checkout

* Rename features for consistency and fix clippy warnings

* Split "core" crates from examples

* Add run_clippy bash script

* Add test script

* Change intro to take the changes this PR has into account

* Fetch only the host target to reduce fetch times

* Add more info when a spirv tool returns a non-zero exit code

* Use files for input and output for now until I can figure out Windows being dumb
2020-10-29 21:54:25 +01:00