Commit Graph

613 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
beecb48e39 spirv-std: add #[repr(C)] (and extra comments) to opaque handle types. 2023-03-18 02:07:02 +02:00
Eduard-Mihai Burtescu
396adcaf59 abi: implement simple unions (MaybeUninit especially). 2023-03-18 02:07:02 +02:00
Sylvester Hesp
ae66c7cc1a Removed glam feature toggle altogether 2023-03-15 04:59:33 -07:00
Sylvester Hesp
5a401f96b9 Made glam a default feature in spirv-std 2023-03-15 04:59:33 -07:00
Sylvester Hesp
17a1249dee Version update to 0.6.0 2023-03-15 03:35:03 -07:00
Sylvester Hesp
28b675d2eb Update wording on --no-spirt
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2023-03-15 02:02:17 -07:00
Sylvester Hesp
eaab5101ce Made --spirt the default, added --no-spirt 2023-03-15 02:02:17 -07:00
Sylvester Hesp
2f1a102c36 Updated tempfile to 0.3.4 2023-03-14 07:44:53 -07:00
Sylvester Hesp
17ff16f645 Added SpirvBuilder API to set extra codegen arguments 2023-03-14 07:44:53 -07:00
Sylvester Hesp
e4a41cda19 Renamed rust-toolchain to rust-toolchain.toml
to improve workflow with vscode
2023-02-17 01:51:34 +02:00
Sylvester Hesp
b1670298e9 Use skip_binder in favor of subst_identity
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2023-02-16 12:32:11 +02:00
Sylvester Hesp
d78c301799 Update to 2023-01-21 2023-02-16 12:32:11 +02:00
Sylvester Hesp
25cb265b5e Fixed compile error in compile_error
Also includes an insignificant naming change
2023-02-13 16:10:14 +02:00
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
Sylvester Hesp
547309a73c Changed current version to 0.5.0 2023-02-03 03:34:51 +01:00
Eduard-Mihai Burtescu
2a77f6ee86 Apply Rust 2021 clippy fixes. 2023-02-01 11:08:36 +02:00
Eduard-Mihai Burtescu
8bde624b74 spirt-passes: add fuse_selects pass for merging same-condition if-elses. 2023-02-01 11:08:36 +02:00
Eduard-Mihai Burtescu
27c698b302 spirt-passes: add reduce pass for replacing ops with their inputs/constants. 2023-02-01 11:08:36 +02:00
Eduard-Mihai Burtescu
6ed51e87b2 linker: add --spirt-passes codegen args and underlying abstraction. 2023-02-01 11:08:36 +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
335a637973 Support all panic entry-points equally - mainly for Rust 2021's panic!("..."). 2023-01-30 23:00:43 +02:00
Sylvester Hesp
bab728f205 Formatting fixes 2023-01-05 14:50:13 +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
87dc07c623 More clippy fixes 2023-01-05 14:50:13 +02:00
Sylvester Hesp
54587b1816 Update to nightly-2022-12-10 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
4eb14fc218 Fixed rust-toolchain error message 2023-01-03 16:02:24 +02:00
Sylvester Hesp
6cb0c06ab7 Refer to specific commits rather than main branch in README.md 2022-12-20 10:43:57 -08:00
Sylvester Hesp
4747d5b3cf Update crates/spirv-builder/README.md
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2022-12-20 10:43:57 -08:00
Sylvester Hesp
f910bc1e19 doc fix 2022-12-20 10:43:57 -08:00
Sylvester Hesp
70c5358419 Updated docs 2022-12-20 10:43:57 -08:00
Sylvester Hesp
b3e5c73c8d Update crates/spirv-std/README.md
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2022-12-20 10:43:57 -08:00
Sylvester Hesp
5819bbaff8 Update crates/spirv-builder/README.md
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2022-12-20 10:43:57 -08:00
Sylvester Hesp
ecceedab92 Some tweaks to docs 2022-12-20 10:43:57 -08:00
Sylvester Hesp
8bf791d0c4 Included README.md files for published crates 2022-12-20 10:43:57 -08:00
Eduard-Mihai Burtescu
6a35586893 Set CARGO_CACHE_RUSTC_INFO=0 instead of removing .rustc_info.json. 2022-12-20 06:11:43 +02:00
Eduard-Mihai Burtescu
85e4df3136 Include identifying information (e.g. crate names) in --dump-* filenames. 2022-12-13 06:18:03 +02:00
Eduard-Mihai Burtescu
6fb35ffeeb outputs: ⋯.spv⋯.spv.json, ⋯.spv.dir/⋯⋯.spvs/⋯.spv (or ⋯.spv). 2022-12-12 17:15:12 +02:00
Eduard-Mihai Burtescu
3fca36ecb2 tests: run both with and without --spirt. 2022-12-12 17:14:35 +02:00
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
32db2b4c3f linker/test: enable DCE (adding new Exports where necessary). 2022-12-09 12:53:05 +02:00
Eduard-Mihai Burtescu
12172b3f17 linker/test: keep Exports around, even after import->export resolution. 2022-12-09 12:53:05 +02:00
Eduard-Mihai Burtescu
00bb9be12d linker/test: add in the missing (mandatory) OpMemoryModel instructions. 2022-12-09 12:53:05 +02:00
Eduard-Mihai Burtescu
0274eb9500 linker/test: "desugar" deprecated "decoration groups" (not supported by SPIR-T). 2022-12-09 12:53:05 +02:00
Eduard-Mihai Burtescu
fb393a9566 linker/test: add #[track_caller] to without_header_eq. 2022-12-09 12:53:05 +02:00
Eduard-Mihai Burtescu
eea44854a7 linker/inline: handle OpPhis. 2022-12-09 11:50:01 +02:00
Eduard-Mihai Burtescu
b3c280424c Migrate rustc_codegen_spirv env vars to codegen args. 2022-12-09 11:46:27 +02:00
Eduard-Mihai Burtescu
47d5577a93 spirv-builder: add RUSTGPU_RUSTFLAGS/RUSTGPU_CODEGEN_ARGS env vars. 2022-12-09 11:46:27 +02:00
Eduard-Mihai Burtescu
ab69706640 CodegenArgs::parse: support --help to show an "usage" message. 2022-12-09 11:46:27 +02:00
Eduard-Mihai Burtescu
8d53076a13 CodegenArgs::parse: replace optflagopt (-X and -X=Y) with optflag (only -X). 2022-12-09 11:46:27 +02:00
Sylvester Hesp
8bd42bcc3a Get rid of run_in_thread_pool_with_globals altogether, 2022-12-02 01:58:11 -08:00
Sylvester Hesp
94a752d9db Format fixes 2022-12-02 01:58:11 -08:00
Sylvester Hesp
17523e06d7 Fix for run_in_thread_pool_with_globals being no longer public 2022-12-02 01:58:11 -08:00
Sylvester Hesp
f0aace570b Linter fixes 2022-12-02 01:58:11 -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
ccf920d54f Actually use FnAbi in the call 🙄 2022-11-30 09:38:54 -08:00
Sylvester Hesp
1ac63d3a49 Added passing of FnAbi 2022-11-30 09:38:54 -08:00
Sylvester Hesp
fc19ab58fb Update to nightly-2022-10-15 2022-11-30 09:38:54 -08:00
Eduard-Mihai Burtescu
dfd285e735 linker/test: create Session manually to inject a custom diagnostic writer. 2022-11-30 09:15:12 -08:00
Eduard-Mihai Burtescu
9d639d3ad5 linker/test: catch FatalErrors to ensure they print any error output at all. 2022-11-30 09:15:12 -08:00
Eduard-Mihai Burtescu
acb05d3799 Arena-allocate slices to replace Vecs in SpirvType and SpirvConst. 2022-11-30 17:03:58 +02:00
Eduard-Mihai Burtescu
1000dece4a symbols: avoid using to_ident_string when {}-formatting works. 2022-11-30 17:03:58 +02:00
Eduard-Mihai Burtescu
d76211384e Replace bimap dependency with a more efficient pair of maps. 2022-11-30 17:03:58 +02:00
Eduard-Mihai Burtescu
7a170d3f78 linker/zombies: stop compilation after zombie errors. 2022-11-30 17:02:10 +02:00
Eduard-Mihai Burtescu
a9ede2ed9f linker/duplicates: handle all decorations instead of special-casing zombies. 2022-11-30 17:01:20 +02:00
Eduard-Mihai Burtescu
5836b83415 Remove fn/closure #[spirv(unroll_loops)] attribute. 2022-11-28 07:18:06 -08:00
BeastLe9enD
4452da80f5 Add rint & rintf libm intrinsics 2022-11-28 16:55:32 +02: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
Sylvester Hesp
c30a37fe11 Added rerun-if-env-changed to build script 2022-11-04 17:22:42 +02:00
Sylvester Hesp
4968760328 Lint fixes 2022-11-04 17:22:42 +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
Eduard-Mihai Burtescu
08250e5ca1 builder: work around rust-lang/rust#101483 abusing implicit i1->i8 zext (from_immediate). 2022-11-04 17:22:42 +02:00
Sylvester Hesp
c7ca8df8b1 Update to nightly-2022-09-11 2022-11-04 17:22:42 +02:00
Sylvester Hesp
64b159257e Update to nightly-2022-09-10 2022-11-04 17:22:42 +02:00
Sylvester Hesp
bf887922c7 Update crates/spirv-std/Cargo.toml
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.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
Sylvester Hesp
a45fbc943e Update glam to 0.22 because of remove_attr 2022-11-03 17:03:54 +02:00
Sylvester Hesp
5190e2e7b1 Compile fixes 2022-11-03 17:03:54 +02:00
Sylvester Hesp
efac825739 Update to nightly 2022-09-06 2022-11-03 17:03:54 +02:00
Eduard-Mihai Burtescu
8efc4220ae spirv_std::ray_tracing: use actual OpTypeBool for -> bool intrinsics. 2022-10-28 17:28:50 +03:00
Jake Shadle
fc202cb3c5 Update spirv-tools 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
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
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
Eduard-Mihai Burtescu
6dc23afaf8 Avoid rebuilding rustc_codegen_spirv between example runners. 2022-10-13 17:01:52 +03:00
Sylvester Hesp
d90274af0b Check whether REQUIRED_RUST_TOOLCHAIN matches local rust-toolchain file 2022-09-27 13:07:47 +03:00
Sylvester Hesp
985007fc08
Version bump to 0.4.0-alpha.15 (#920) 2022-09-23 11:36:34 +02:00
Sylvester Hesp
f00f267160
Added toolchain check to rustc_codegen_spirv (#919)
* Added toolchain check to rustc_codegen_spirv

* Removed unused dependency

* Reworked the toolchain check

* Removed some debug code
2022-09-23 11:35:23 +02:00
Sylvester Hesp
2442d900a8 Fix for read_scalar().unwrap() panicking 2022-09-21 14:23:11 +03:00
Eduard-Mihai Burtescu
69fb9e3188 Keep PassMode by reference instead of value. 2022-09-21 14:23:11 +03:00
Sylvester Hesp
4d22af493f Compile fixes 2022-09-21 14:23:11 +03:00
Sylvester Hesp
a9a233eb80 Linter fix 2022-09-08 13:01:05 +03:00
Sylvester Hesp
2dd88c1f13 Compile fixes 2022-09-08 13:01:05 +03:00
Sylvester Hesp
f66030dad9 Compile fixes 2022-09-08 13:01:05 +03:00
Sylvester Hesp
b800a34b6b Compile fixes 2022-09-08 13:01:05 +03:00
Sylvester Hesp
fff9e0cec3 Fixed compile errors 2022-09-07 16:03:32 +03:00
Sylvester Hesp
0eb12ccf90 Compile fixes 2022-09-07 16:03:32 +03:00
Sylvester Hesp
ec6207e664 Fixed compile errors 2022-09-07 16:03:32 +03:00
Sylvester Hesp
7e83721978 Formatting 2022-08-30 13:47:08 +03:00
Sylvester Hesp
faf5c1321b Fixed compile error due to earlier linter fix 2022-08-30 13:47:08 +03:00
Sylvester Hesp
6237c65544 Linter fix 2022-08-30 13:47:08 +03:00
Sylvester Hesp
358a54a8f2 Alternative dead_code warning fix
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2022-08-30 13:47:08 +03:00
Sylvester Hesp
ac160444ba Silenced dead code warning
Little unsure about this though, scary that it pops up all of a sudden while obviously being used by the functions below.
2022-08-30 13:47:08 +03:00
Sylvester Hesp
efe0f9becf Fixed compile error 2022-08-30 13:47:08 +03:00
Sylvester Hesp
30a682d633 Added stub for new method in IntrinsicCallMethods 2022-08-30 13:47:08 +03:00
Sylvester Hesp
e1aecffe67 Fixed compile errors 2022-08-30 13:47:08 +03:00
Sylvester Hesp
ccf01366b8 Updated OutRegister to reflect 'tcx lifetime usage 2022-08-29 16:54:38 +03:00
Sylvester Hesp
cb3289b132 Linter fix 2022-08-29 16:54:38 +03:00
Sylvester Hesp
7fd517a384 Compile fixes 2022-08-29 16:54:38 +03:00
Sylvester Hesp
7d8f02b380 Compile fixes 2022-08-29 16:54:38 +03:00
Sylvester Hesp
ccd2b12174 Fixed linter 2022-08-25 16:10:05 +03:00
Sylvester Hesp
37e5ce592d Compile fixes
Formatting fix
2022-08-25 16:10:05 +03:00
Sylvester Hesp
954edc9fb2 Compile fixes 2022-08-25 16:10:05 +03:00
Sylvester Hesp
a9209cd3bf Fixed formatting 2022-08-22 23:08:29 +03:00
Sylvester Hesp
86921a21ff Fixed compile errors 2022-08-22 23:08:29 +03:00
Sylvester Hesp
621cd48e5d Fixed linter 2022-08-22 23:08:29 +03:00
Sylvester Hesp
b3ff800246 Fixed compile errors 2022-08-22 23:08:29 +03:00
Sylvester Hesp
475f508eac Update to 2022-04-18 2022-08-17 20:54:04 +03:00
Eduard-Mihai Burtescu
a99fd432ad Avoid leaking file metadata (mtime/UID/GID) in rlibs through the ar crate. 2022-08-17 19:29:36 +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
e1696a4cbd
Updated metadata for spirv-builder (#903) 2022-08-11 12:02:34 +00:00
Sylvester Hesp
3deccf2927
Added a description for rustc_codegen_spirv (#902) 2022-08-11 11:32:35 +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
Johan Andersson
0693243619 Upgrade sanitize-filename v0.3.0 -> v0.4.0
No code changes needed
2022-08-11 06:41:31 +03: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
f69d94ed27 Update number documentation
Co-authored-by: Eduard-Mihai Burtescu <edy.burt@gmail.com>
2022-08-09 13:59:15 +03:00
BeastLe9enD
7d7f2fe5a6 Improve documentation & add Number trait 2022-08-09 13:59:15 +03:00
BeastLe9enD
9123a0141c Remove ext suffix from float atomic functions 2022-08-09 13:59:15 +03:00
BeastLe9enD
6387d2156f Add low-level atomic instructions 2022-08-09 13:59:15 +03:00
Ashley Ruglys
c36be918ba Bump the latest allowed glam version to 0.21 2022-08-09 04:05:07 +03:00
Minghao Liu
68db589d98 Update crates/rustc_codegen_spirv/src/linker/inline.rs
Co-authored-by: Eduard-Mihai Burtescu <edy.burt@gmail.com>
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
Eduard-Mihai Burtescu
b0328ed454 Fix style nit (quotes -> backticks) in crates/rustc_codegen_spirv/src/symbols.rs 2022-04-28 14:40:08 +03:00
BeastLe9enD
4b55f91de3 Support 'threads' with 'mesh_nv' and 'task_nv' 2022-04-28 14:40:08 +03:00
Johan Andersson
132b960e83
Upgrade from our standard lints v4 -> v6 (#861) 2022-04-17 12:16:59 +02:00
Eduard-Mihai Burtescu
116bf9c4d4 rustup: address (new) clippy errors. 2022-04-12 09:01:18 +03: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