Commit Graph

398 Commits

Author SHA1 Message Date
Jake Shadle
aef85ea5d8
Fix val error output (#188)
* Add test for validation output

* Fix validation to use correct functions

* Clippy y so strict
2020-10-30 14:02:56 +00:00
Johan Andersson
98eb8d369c
Convert to use glam for math types (#149)
* [spirv-std] Remove math types

* Temp implementation of copysign

https://github.com/EmbarkStudios/rust-gpu/issues/148

* Convert shader to use glam

* Rustfmt

* Fix wgpu-example-shader to use glam

* [spirv-std] Disable clippy::use_self

* Upgrade to latest glam branch

* Use latest glam fork

* Remove incorrect assert_uninit

After discussions with @khyperia

* Update lockfile

* Update to latest glam fork with fixes

* Use real copysign intrinsic

* Disable clippy on example-shader for now

Tracked in https://github.com/EmbarkStudios/rust-gpu/issues/186
2020-10-30 14:58:38 +01:00
XAMPPRocky
b47ff73b44
Update docs.sh 2020-10-30 14:54:09 +01:00
XAMPPRocky
db24b3023f
Add spirv-std back to docs. 2020-10-30 14:43:04 +01:00
khyperia
450eb7d586 Improve DUMP_MIR debug flag 2020-10-30 14:31:52 +01:00
VZout
e72c77e391 Added a test for a fully unreachable break scenario 2020-10-30 11:51:48 +01:00
Viktor Zoutman
4f2daf3601
Fixed loops inside of a conditional branch (#185) 2020-10-30 10:19:10 +00:00
XAMPPRocky
53fce0b4dc
Add generated to .gitattributes (#183) 2020-10-30 08:40:43 +01:00
XAMPPRocky
d59f5adae2
Add docs badge back. 2020-10-30 08:40:10 +01: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
Johan Andersson
96f5f1075e GitHub categorize spirv-tools-sys as vendored 2020-10-29 23:29:47 +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
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
03e69fc1ea
Refactor linker and delete some unused code (#171)
Use more efficient solutions than DefAnalyzer, and shuffle linker step
order to remove need for ScalarType/AggregateType.
2020-10-29 12:03:16 +00:00
Louis Pilfold
52277d3336
Correct URL after incorrect rebase (#174) 2020-10-29 10:11:32 +00:00
Louis Pilfold
41ee5dd266
Use our new badges (#154)
* Use our new badges

This repo uses GitHub actions rather than Circle so it looks a little
different. We could shorten the name of the GitHub Actions workflow to
make the badge smaller.

* Add Contributing section

* Remove duplication

* Remove crates badges

* Feedback
2020-10-29 09:42:31 +00:00
XAMPPRocky
502f3dbaf6
Update README.md 2020-10-29 10:41:50 +01:00
XAMPPRocky
0698e3f7df
move assets and rfcs into docs (#172) 2020-10-29 09:01:28 +00:00
XAMPPRocky
dc9c66963a
Build rustdoc documentation and update links (#169) 2020-10-28 14:59:16 +01: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
XAMPPRocky
b784710193
Update mcp.md 2020-10-28 12:47:29 +01:00
Ashley Hauck
ddd2526f6d
Include examples in test (#166)
I thought examples couldn't be included in test due to weird windows
reasons, but wgpu-example-runner is already included, and it works
2020-10-28 11:34:46 +01:00
Johan Andersson
de4436d2e0 Fix compiling wgpu-example-shader for CPU 2020-10-28 10:22:06 +01:00
Johan Andersson
e2be058015 Remove old lingering Cargo.lock files 2020-10-28 10:22:06 +01: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
706f4cc695
Download spirv-tools directly on ubuntu CI (#162) 2020-10-27 17:19:28 +01:00
Nipun Garg
6dd94d19f4
Remove spirv-std::f32x4 (#160)
grep revealed that spirv-std::f32x4 isn't being
used anywhere
2020-10-27 14:57:40 +00:00
Ashley
1b99a9ce20
Fix compilation of wgpu runner on wasm (#159) 2020-10-27 14:34:02 +00:00
Ashley Hauck
5b538ee5ee
Implement copysign for shaders (#158)
* Implement copysign for shaders

* Fix typo

* PR feedback
2020-10-27 13:16:40 +00:00
Ashley Hauck
e88a5f9b50
Enable CI clippy on example-runner (#156) 2020-10-27 13:13:09 +01: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
d148dafc7d
Improve error message for pointer casts (#153) 2020-10-27 10:21:24 +00:00
Viktor Zoutman
27df71f492
WGPU example (#92) 2020-10-27 02:39:56 +01:00
Johan Andersson
1043aba140 Link copysign intrinsic implementation issue
https://github.com/EmbarkStudios/rust-gpu/issues/148
2020-10-27 02:11:14 +01:00
Ashley Hauck
75de003e0b
Move rspirv override to be directly in the crate (#150)
This fixes git references to rust-gpu, which don't pick up the workspace
override and cause obscure build failures.
2020-10-27 00:42:45 +01:00
Nipun Garg
75ca54546b
Enable Clippy use_self lint (#147) 2020-10-26 16:07:36 +00:00
Johan Andersson
dbe8af66f4
Minor README Markdown lint fix (#146) 2020-10-26 16:01:18 +00:00
Johan Andersson
c049db9a66 Add back mergify review conditions
To require all reviewers have reviewed and that there are no pending changes requested
2020-10-26 16:34:09 +01: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
fe18434bff
Add example to evaluate sky shader on CPU (#141) 2020-10-26 15:49:01 +01:00
Johan Andersson
960fb0b1df Simplify mergify, rely on branch protections 2020-10-26 15:28:31 +01:00
Jasper Bekkers
2357a488fe
Clarify breaking changes and deprecation (#142)
* Clarify breaking changes and deprecation

* Update README.md

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2020-10-26 15:02:36 +01:00
Johan Andersson
d9838a0a5f Revert back to installing exact nightly in setup script 2020-10-26 14:20:52 +01:00
Johan Andersson
22209ede49
Pin Rust Nightly to 2020-10-25 (#139) 2020-10-26 13:59:34 +01:00
khyperia
9e67f83cd6 rustup update 2020-10-26 08:38:07 +01: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
Daniel McNab
5d7d8671fb
Add badge for deps.rs (#133) 2020-10-24 15:34:17 +00:00