Commit Graph

256 Commits

Author SHA1 Message Date
Sylvester Hesp
0f9cd391ce Removed return type inference from Image API
Return types are now always `glam` vectors. This also means that `glam` is required. The "glam" feature toggle is made mandatory, we may want to support other specific vector libraries in the future.
2023-02-13 16:10:14 +02:00
Eduard-Mihai Burtescu
2ccdb4651d Apply clippy::uninlined_format_args suggestions for Rust 2021 (panic/assert). 2023-01-30 23:00:43 +02:00
Eduard-Mihai Burtescu
c2084b4568 Switch to Rust 2021. 2023-01-30 23:00:43 +02:00
Sylvester Hesp
33c2f80835 Clippy fixes 2023-01-05 14:50:13 +02:00
Sylvester Hesp
86d6042204 Update to nightly-2022-12-18
This nightly includes a clippy fix that we need (https://github.com/rust-lang/rust-clippy/pull/10055)
2023-01-05 14:50:13 +02:00
Sylvester Hesp
fbbe2f7d2d Formatting 2023-01-05 14:50:13 +02:00
Sylvester Hesp
2cb10b2771 Update to nightly-2022-11-28 2023-01-05 14:50:13 +02:00
Sylvester Hesp
816c3409e2 Updated to nightly-2022-11-14 2023-01-05 14:50:13 +02:00
Sylvester Hesp
0028a12b75 Blessed tests 2022-12-20 10:43:57 -08:00
Eduard-Mihai Burtescu
3fca36ecb2 tests: run both with and without --spirt. 2022-12-12 17:14:35 +02:00
Eduard-Mihai Burtescu
78130e1151 tests: clean up the structopt usage slightly. 2022-12-09 08:48:53 -08:00
Sylvester Hesp
fb7e13cdeb Update to nightly-2022-10-29 2022-12-02 01:58:11 -08:00
Eduard-Mihai Burtescu
d000e9699b Use Spans to detect "system crate"s, for error deferral (zombie) purposes. 2022-12-01 17:24:48 +02:00
Sylvester Hesp
fc19ab58fb Update to nightly-2022-10-15 2022-11-30 09:38:54 -08:00
Eduard-Mihai Burtescu
7a170d3f78 linker/zombies: stop compilation after zombie errors. 2022-11-30 17:02:10 +02:00
Eduard-Mihai Burtescu
5836b83415 Remove fn/closure #[spirv(unroll_loops)] attribute. 2022-11-28 07:18:06 -08:00
Sylvester Hesp
e087a5267f Upgraded compiletest_rs to 0.9.0 2022-11-24 08:15:36 -08:00
Sylvester Hesp
5e7a0755c2 Also applied default-features=false to spirv-builder 2022-11-22 07:43:06 -08:00
Sylvester Hesp
e7df2feb27 Applied workspace inheritance 2022-11-22 07:43:06 -08:00
Sylvester Hesp
39850120ae Update to 0.4.0-alpha.17
* Specified exact versioning for crates within rust-gpu
* Fixed spirv-std referring to an older version of spirv-std-macros
2022-11-09 15:07:38 +01:00
Sylvester Hesp
c248806bf0 Updated versions to 0.4.0-alpha.16 2022-11-04 20:39:07 +02:00
Eduard-Mihai Burtescu
27e3cfc328 Update to nightly-2022-10-01. 2022-11-04 17:22:42 +02:00
Eduard-Mihai Burtescu
dcf37b75a7 Update to nightly-2022-09-25. 2022-11-04 17:22:42 +02:00
Sylvester Hesp
932cd1d173 Update tests/ui/arch/any.rs
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2022-11-03 17:03:54 +02:00
Sylvester Hesp
d61f486b9e Removed some bogus code in all.rs 2022-11-03 17:03:54 +02:00
Sylvester Hesp
83d6c0b9fe Removed rust-gpu support for Vector bool for glam 2022-11-03 17:03:54 +02:00
Eduard-Mihai Burtescu
53ad54add3 Fix new clippy warnings from the newer nightly. 2022-11-03 17:03:54 +02:00
Eduard-Mihai Burtescu
69cb69d28f Replace const_{vec,mat}! usage in tests and examples. 2022-11-03 17:03:54 +02:00
Sylvester Hesp
1053c72575 Blessed these const_mat2 errors
`const_mat2` is deprecated in `glam`. We need to fix the tests.
2022-11-03 17:03:54 +02:00
Sylvester Hesp
4b47b82e17 Blessed tests (line number changes) 2022-11-03 17:03:54 +02:00
Eduard-Mihai Burtescu
fbc20c240e tests: fix a couple mistakes that spirv-val now catches. 2022-10-28 17:28:50 +03:00
Eduard-Mihai Burtescu
65f892eb50 attr: fix #[spirv(flat)] checking to match the Vulkan spec. 2022-10-27 11:42:23 +03:00
Sylvester Hesp
68ddddb8c4 Fixed bad imports 2022-10-19 14:12:11 +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
Sylvester Hesp
08117395b3
Pre-updated invalid-target.rs test (#929)
This PR adds the commented out use spirv_std::spirv; to invalid-target.rs in preparation for #926
2022-10-19 11:57:47 +03:00
Eduard-Mihai Burtescu
4b10bf5db1 Add codegen backend dylib back into depinfo (.d) post-rust-lang/rust#93969. 2022-10-14 16:50:36 +03:00
Sylvester Hesp
985007fc08
Version bump to 0.4.0-alpha.15 (#920) 2022-09-23 11:36:34 +02:00
Sylvester Hesp
9e2e66729d Blessed tests 2022-09-21 14:23:11 +03:00
Sylvester Hesp
3fceab26dd Blessed tests 2022-09-08 13:01:05 +03:00
Sylvester Hesp
2e810bd8c2 Blessed tests 2022-09-08 13:01:05 +03:00
Sylvester Hesp
a7c448988b Blessed tests 2022-09-08 13:01:05 +03:00
Sylvester Hesp
e9cdc7de51 Blessed tests 2022-09-07 16:03:32 +03:00
Sylvester Hesp
09b3a4cff4 Blessed tests 2022-09-07 16:03:32 +03:00
Sylvester Hesp
c068d49efc Blessed tests 2022-09-07 16:03:32 +03:00
Sylvester Hesp
869d0cf316 Blessed tests for slightly different output 2022-08-30 13:47:08 +03:00
Sylvester Hesp
26fd725941 Blessed tests 2022-08-29 16:54:38 +03:00
Sylvester Hesp
3d15799f14 Blessed tests because of changed line numbers 2022-08-25 16:10:05 +03:00
Sylvester Hesp
425e377f87 Blessed test 2022-08-25 16:10:05 +03:00
Sylvester Hesp
c8c5bd3c03 Blessed slightly changed ptr_copy test output 2022-08-22 23:08:29 +03:00
Sylvester Hesp
e50606fa0c Updated test result 2022-08-17 20:54:04 +03:00
Sylvester Hesp
805297146b
Update to 0.4.0-alpha.14 (#905)
* Changed version of all unpublished crates to 0.0.0

* New version: v0.4.0-alpha.14

* Fixed versions in deny.toml
2022-08-12 12:38:45 +02:00
Sylvester Hesp
f41625d70a
Renamed spirv-types to spirv-std-types (#904) 2022-08-12 01:49:50 +00:00
Sylvester Hesp
fde567ed2d
Updated versions to 0.4.0-alpha.13 (#899)
* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* (cargo-release) version 0.4.0-alpha.13

* Updated versions in local dependencies as well
2022-08-11 12:34:07 +02:00
Sylvester Hesp
ef65808a5b
Added some version tags to some crates referencing rustc_codegen_spirv (#894)
Although not really necessary, this removes some errors `cargo-release` is giving.
2022-08-10 22:06:20 +02:00
BeastLe9enD
ba947ced62 Fix line error 2022-08-09 13:59:15 +03:00
molikto
0866cf591a fix: tests 2022-05-24 15:35:03 +03:00
molikto
cdbf4dec1d warn when inline(never) is not respected 2022-05-24 15:35:03 +03:00
Dennis
03f89e8ba6 Add support for zero sized types 2022-04-28 14:42:31 +03:00
Johan Andersson
685c79a972
Upgrade SPIRV-Tools prebuild to 2022-04-14 (#867)
For Linux and Windows, Mac CI uses latest installed from brew.
Also added comment about how/where to get the download link for next upgrade.

Resolves: #866
2022-04-19 11:47:37 +00:00
Johan Andersson
132b960e83
Upgrade from our standard lints v4 -> v6 (#861) 2022-04-17 12:16:59 +02:00
Eduard-Mihai Burtescu
e08d0d6a48 rustup: update to nightly-2022-04-11. 2022-04-12 09:01:18 +03:00
Eduard-Mihai Burtescu
3e04f62ede rustup: update to nightly-2022-04-01. 2022-04-12 09:01:18 +03:00
Eduard-Mihai Burtescu
f0baf78ade rustup: update to nightly-2022-03-01. 2022-04-12 09:01:18 +03:00
Eduard-Mihai Burtescu
57eed8394e rustup: update to nightly-2022-02-01. 2022-04-12 09:01:18 +03:00
David Craven
3151a8c2b1 Add tests. 2022-02-09 18:10:22 +02:00
Eduard-Mihai Burtescu
31e3fdb09b abi: explicitly unpack ScalarPair newtypes. 2022-01-23 20:18:56 +02:00
Ashley
11e21c6412
Add a OpAtomicIIncrement function to arch (#839) 2022-01-13 17:32:33 +02:00
Ashley Hauck
f780364317
rustup update (#840)
* rustup update

* asm->core::arch::asm
2022-01-13 17:27:33 +02:00
Ashley Hauck
fe5c7716ed
Fix ByteAddressableBuffer PassMode::Pair (#837) 2022-01-10 09:35:03 +00:00
Ashley Hauck
480cd048e0
Fuse OpPtrAccessChain with previous OpAccessChain (#835)
* Fuse OpPtrAccessChain with previous OpAccessChain

* constant-fold add, and change mul to wrap
2021-12-28 11:39:37 +01:00
Ashley Hauck
d26716b881
Add error for insts not allowed outside fragment (#821)
* Add error for insts not allowed outside fragment

* make get_name return entry point names too
2021-12-14 08:04:50 +00:00
Ashley Hauck
9673f39967
A whole host of minor tweaks and clippy fixes (#824) 2021-12-14 07:45:45 +00:00
Ashley
da7c3ed71f
Add a RayQuery::confirm_intersection function (#822) 2021-12-09 13:00:35 +00:00
Ashley Hauck
2ca5826e55
rustup update (#816)
* rustup update

* Test fixes
2021-12-06 11:31:43 +01:00
Ashley Hauck
340f4bb70a
Error when int doesn't have spirv(flat) (#815) 2021-12-06 11:31:26 +01: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
9fd3c9e172
Add an IndexUnchecked trait that uses asm! (#805)
* Add an IndexUnchecked trait to spirv-std/arch

* Slap some #[spirv_std_macros::gpu_only] on there

* Spelling

* Add safety sections to the docs

* Improve documentation, implement for non-spirv targets
2021-11-29 07:56:13 +01:00
Eduard-Mihai Burtescu
553f79ebce
asm: support OpCompositeExtract inference for OpTypeStruct fields. (#803) 2021-11-22 13:27:55 +01:00
Eduard-Mihai Burtescu
b28716d5eb tests: get --target-env vulkan1.2 passing. 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
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
111bebdd68 abi: readjust FnAbis to remove unsupported PassModes, via query hooks. 2021-10-20 22:13:03 +03: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
Eduard-Mihai Burtescu
6780432b37 rustup: update to nightly-2021-09-29. 2021-09-30 09:26:11 +03:00