Commit Graph

868 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
04146858ce ci: also test --target-env vulkan1.2. 2021-11-04 11:54:26 +02:00
Eduard-Mihai Burtescu
b28716d5eb tests: get --target-env vulkan1.2 passing. 2021-11-04 11:54:26 +02:00
Eduard-Mihai Burtescu
cda583e0d5 Gather all interface OpVariables into OpEntryPoints. 2021-11-04 11:54:26 +02:00
Eduard-Mihai Burtescu
86d669bccf compiletests: unlock // {only,ignore}-* usage. 2021-11-04 10:26:11 +02:00
Ashley Hauck
f7fc1245f3
Add tests for every builtin (#789) 2021-11-03 11:38:06 +01:00
Ashley Hauck
c4eb7af88e
Update rspirv to 0.11 (#788) 2021-10-29 13:38:28 +02:00
Ashley Hauck
fe5c613ac1
Document behavior of bools in asm (#786) 2021-10-29 14:05:24 +03:00
Ashley Hauck
f0fd471218
Add examples readme (#785) 2021-10-28 15:29:12 +02:00
Ashley Hauck
5633a79d93
Document build-override to speed up shader building (#787) 2021-10-28 13:17:39 +00:00
Ashley Hauck
3ae5c2b010
Remove CARGO_FEATURES_* and CARGO_CFG_* (#782) 2021-10-28 13:09:32 +02:00
Ashley Hauck
1517a8bdd6
Document spirv-std, and add warn(missing_docs) (#784) 2021-10-28 10:10:44 +00:00
Ashley Hauck
62548134d2
Add test for issue #329 (#781) 2021-10-28 13:07:47 +03:00
Ashley Hauck
8fb4f10995
Don't ICE on ZST union (#780) 2021-10-28 08:13:00 +00:00
Ashley Hauck
d45f9da016
Add test for issue #330 (#779) 2021-10-28 07:53:27 +00:00
Ashley Hauck
902c51c242
Inline calls that look like f(&s.x) (#777) 2021-10-27 13:28:35 +00:00
Ashley Hauck
c10a1ca756
Implement bool fusion pass (#776)
Fixes #677
2021-10-27 12:52:31 +00:00
Ashley Hauck
f58c6f20af
rustup update, and edition = 2021 (#775) 2021-10-26 10:24:44 +00:00
Hannes Vernooij
4831789bbb
added memory barrier intrinsics to spirv-std (#769)
* added memory barrier intrinsics to spirv-std

* added function-level docs

* added unit-tests

constants could not be validated in tests because of the limited output

* clippy fixes

* improved documentation

* Added missing features to device_memory and all_memory barrier intrinsics.
2021-10-26 09:15:50 +02:00
Ashley Hauck
1fbb2410b6
Fix tests (#773) 2021-10-25 09:10:29 +00:00
Ashley Hauck
3f22a897f3
Handle OpCopyMemory in mem2reg (#772)
* Handle OpCopyMemory in mem2reg

* Update tests
2021-10-25 11:01:53 +03:00
Ashley Hauck
8d019e4e37
Detect recursion in inline.rs and bail (#770)
* Detect recursion in inline.rs and bail

* Bail on inline error
2021-10-25 10:42:45 +03:00
Ashley
e5c2953ea6
Add debug_printf! and debug_printfln! macros that uses the DebugPrintf extension (#768) 2021-10-23 10:05:03 +02:00
Eduard-Mihai Burtescu
28313a2029 tests: adjust for lack of PassMode::{Indirect, Cast}. 2021-10-20 22:13:03 +03:00
Eduard-Mihai Burtescu
2dc88f26ac Simplify FnAbi handling for the fewer PassModes possible now. 2021-10-20 22:13:03 +03:00
Eduard-Mihai Burtescu
6d43d60142 abi: use span_bug! over bug! wherever a Span is available. 2021-10-20 22:13:03 +03:00
Eduard-Mihai Burtescu
111bebdd68 abi: readjust FnAbis to remove unsupported PassModes, via query hooks. 2021-10-20 22:13:03 +03:00
Eduard-Mihai Burtescu
13678f8644 abi: replace extern "C" with extern "unadjusted", not Rust ABI. 2021-10-20 22:13:03 +03:00
Eduard-Mihai Burtescu
f8333127d7 abi: remove redundant fn_sig hook from provide_extern. 2021-10-20 22:13:03 +03:00
Eduard-Mihai Burtescu
1436572c3a Move query hooks out of the crate root (and into abi). 2021-10-20 22:13:03 +03:00
Ashley Hauck
0e0304a232
Ignore RUSTSEC-2020-0159 (#771) 2021-10-20 11:11:30 +00:00
Ashley Hauck
e2db97f899
Update dependencies (#765) 2021-10-14 14:38:15 +00:00
Ashley
f8a1130377
Add arch functions for the GLSL.std.450 S/U Min/Max functions (#763)
* Add (un)signed_(min|max) glsl functinos

* Add gpu_only to call glsl op
2021-10-12 08:49:02 +02:00
Ashley
14e2152198
Add an read_clock_khr function that calls OpReadClockKHR (#757)
* Add support for OpReadClockKHR

* Use a const scope

* Use full scope import path

* Apply some suggestions

* Add cfg flags and scopes as raw u32s

* Run cargo fmt

* Fix comment accuracy

* Update crates/rustc_codegen_spirv/src/spirv_type_constraints.rs

Co-authored-by: Ashley Hauck <953151+khyperia@users.noreply.github.com>

* Run rustfmt

* Add the shader clock feature and capability to the compile test rust flags and bless the changed test errors

Co-authored-by: Ashley Hauck <953151+khyperia@users.noreply.github.com>
2021-10-08 15:56:00 +02:00
Ashley
4e5f347239
Add SampledImage::sample_by_lod (#755)
* Add 'SampledImage::sample_by_lod'

* Add a compiletest

* Format the compiletest, but manually because running cargo fmt doesn't seem to do anything 🤷

* Run rustfmt
2021-10-08 10:33:00 +02:00
Ashley Hauck
b692ab5afc
Convert Image<> parameters from enums to integers to make spirv-std build on stable (#761)
* Convert Image<> parameters from enums to integers to make spirv-std build on stable

* Remove access_qualifier from Image type

It's kernel-mode-only, and we won't ever support kernel mode.
2021-10-07 13:28:33 +02:00
Johan Andersson
2540106965
Support glam 0.18 (#760) 2021-10-05 09:24:18 +02:00
Eduard-Mihai Burtescu
6780432b37 rustup: update to nightly-2021-09-29. 2021-09-30 09:26:11 +03:00
Jake Shadle
35172f7edb
Update spirv-tools to 0.7.0 (#753)
This moves to the v2021.3 version of SPIRV-Tools
2021-09-17 11:42:43 +00:00
Ashley Hauck
eeb67ae748
Replace <const INTERSECTION: u32> with two functions (#750)
* Replace <const INTERSECTION: u32> with two functions

* Fix doc URLs
2021-09-07 11:30:56 +02:00
Eduard-Mihai Burtescu
6807c5973d Re-add -Zsymbol-mangling-version=v0. 2021-09-07 12:24:38 +03:00
Eduard-Mihai Burtescu
8d9e14a0a3 tests: add test for the OpName of a generic function. 2021-09-07 12:24:38 +03:00
Eduard-Mihai Burtescu
75f81814ec rustup: update to nightly-2021-08-27. 2021-09-07 12:24:38 +03:00
Ashley Hauck
92dc64bd06
Make byte addressable buffer take &self, add support for matrix (#749) 2021-09-06 08:47:34 +00:00
Ashley Hauck
95da8981ad
Add load/store_unchecked to ByteAddressableBuffer without bounds check (#746) 2021-09-03 12:10:01 +00:00
Ashley Hauck
71d6001bed
Actually set the SPIR-V generator magic number (#743)
wow this took a while to do
2021-09-01 13:32:11 +02:00
Ashley Hauck
032286e217
Add a spirv-builder option to include all debug info (#742) 2021-09-01 06:05:43 +00:00
Ashley Hauck
66d6c554d8
Implement ByteAddressableBuffer prototype detached from bindless (#735) 2021-08-31 10:26:30 +02:00
Markus Siglreithmaier
f0560824fe
std: fix ray query initialization and proceed result (#740) 2021-08-31 10:09:05 +02:00
hatoo
b0676cba61
Implement OpTypeMatrix (#738)
* Implement OpTypeMatrix

* clippy

* Use cached Symbol

* Implement #[spirv(matrix(ty, m, n))] instead of Matrix trait

* Update #[spirv(matrix(..))]

- #[spirv(matrix(ty, m, n))]
  Specify all of type, rows, columns.
- #[spirv(matrix(ty, m))]
  Specify all of type, rows. Infer columns.
- #[spirv(matrix(ty))]
  Specify all of type. Infer others.
- #[spirv(matrix)]
  Infer all.

* Drop #[spirv(matrix(..))] (with arguments)

* Fix IntrinsicType::Matrix type construction

* Update matrix-type.rs

* Update tests/ui/spirv-attr/multiple.rs to test Matrix

* Fix tests/ui/spirv-attr/matrix-type.rs

* Add failing tests for #[spirv(matrix)

* Update error messages for #[spirv(matrix)]
2021-08-30 15:45:29 +02:00
Ashley Hauck
1e3881bfcb
Various fixes and cleanup (#726)
* Various fixes and cleanup

While working on other patches that ended up not being applicable, I've
gathered these changes unrelated to the irrelevant patch. So, submitting
them as a seperate change, since the bigger change isn't going in.

* Revert change superseded by #732
2021-08-21 21:41:46 +02:00