Commit Graph

19 Commits

Author SHA1 Message Date
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
Viktor Zoutman
ffc6d30dcd
Rough structurization of loops. (#176)
* Rough loops implementation

* Update rustc_codegen_spirv/src/linker/structurizer.rs

Co-authored-by: Ashley <ashley.ruglys@gmail.com>

Co-authored-by: Ashley <ashley.ruglys@gmail.com>
2020-10-29 13:10:49 +00:00
Ashley Hauck
1b5aac084c
Support GLSL450 and Simple memory models (#168)
* Support GLSL450 and Simple memory models

* Update spirv-builder/src/lib.rs

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>

* Only emit SPV_KHR_vulkan_memory_model when needed

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2020-10-28 13:49:44 +00:00
khyperia
5e12734ce9 Add fix that was supposed to be in 165 but mergify merged it before I could push 2020-10-28 10:14:07 +01:00
Ashley Hauck
23819c7a2c
Add support for spir-v 1.0 (#165) 2020-10-28 09:08:01 +00:00
Ashley Hauck
06fdb85d61
Add dis_fn testing function (#155)
* Add dis_fn testing function

* Update spirv-builder/src/test/mod.rs

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2020-10-27 10:35:53 +00:00
Ashley Hauck
b32c04b3fd
Refactor attributes and add descriptor_set/binding (#145)
* Move entry declarations to their own file

Also clean up attribute parsing (and make it allow multiple arguments in
the process)

* Add descriptor_set and binding attributes

* clippy fix

* Fix test

* Reserve descriptor_set 0 for future use

* Add book page on attributes
2020-10-26 15:23:21 +00:00
Johan Andersson
12b07dcc53
Add cargo-deny config & CI step (#125)
* Add cargo-deny config & CI step

* Add missing license to multiple workspace crates

* Fix author

* Switch to checkout@v2
2020-10-25 16:15:04 +01:00
Ashley Hauck
8681464af7
Add framework for compiler tests (#118) 2020-10-23 18:22:36 +02:00
Ashley Hauck
d3af0552d3
Move to a builder struct for spirv-builder (#59)
This allows the print_metadata option
2020-10-14 15:48:21 +02:00
khyperia
377bf070f0 Pass full path to rustc_codegen_spirv to rustc 2020-10-14 14:38:40 +02:00
khyperia
69ecc92ba4 Enable spirv-val by default 2020-10-10 12:37:59 +02:00
khyperia
8d3101e81e Change the default shader mode to shader 2020-10-10 12:34:48 +02:00
khyperia
80398d8149 Rebuild shader crates if changed 2020-10-10 12:25:05 +02:00
khyperia
60a4164ca1 Reference rustc_codegen_spirv in spirv-builder
This makes the UX much better. It's also kind of bonkers, but, in a good
way. I think.
2020-10-09 20:01:35 +02:00
Jasper Bekkers
6b1a292daa
Make cargo-run of example work on windows 2020-10-09 19:11:08 +02:00
khyperia
1516d864f3 First try at spirv-builder 2020-10-09 17:22:07 +02:00