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
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 rlib
s 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
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
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
Eduard-Mihai Burtescu
5ac500d5b9
Split out a new -types
crate so spirv-builder
stops loading LLVM via dylibs. ( #856 )
...
* Split out a new `-types` crate so `spirv-builder` stops loading LLVM via dylibs.
* example-wgpu-runner: halve `max_push_constant_size` so it works on RADV/Fiji.
2022-03-30 09:07:14 +02:00
David Craven
4932a44658
Revert workgroup_size builtin.
2022-02-09 18:10:22 +02:00
David Craven
f638590389
Enable builtins.
2022-02-09 18:10:22 +02:00
Jake Shadle
7e7fdb4a4b
Update spirv-tools to 0.8.0
2022-02-05 04:40:21 +02:00
Eduard-Mihai Burtescu
31e3fdb09b
abi: explicitly unpack ScalarPair
newtypes.
2022-01-23 20:18:56 +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
d705a238a1
Add a preserve_bindings opt to the builder and codegen opts ( #830 )
2022-01-03 09:18:58 +01: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
f08819fede
Fix some ICEs with bools ( #826 )
2021-12-15 14:10:38 +00: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
Eduard-Mihai Burtescu
7a60181679
Hint "rust-analyzer.rustcSource": "discover"
next to rustc_private = true
. ( #825 )
2021-12-14 08:09:21 +01: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
d5d0c90652
Fix for duplicate OpMemberName, and add OpMemberName for ScalarPairs ( #814 )
2021-12-01 10:25:23 +00: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
Eduard-Mihai Burtescu
6232d95256
abi: demonstrate overriding the behavior of the layout_of
query. ( #808 )
2021-11-26 11:51:56 +01:00
Benjamin Bouvier
c1dd14d863
Remove unused dependencies in rust-gpu ( #800 )
2021-11-22 13:12:43 +00:00
Eduard-Mihai Burtescu
553f79ebce
asm: support OpCompositeExtract
inference for OpTypeStruct
fields. ( #803 )
2021-11-22 13:27:55 +01:00
Eduard-Mihai Burtescu
cda583e0d5
Gather all interface OpVariable
s into OpEntryPoint
s.
2021-11-04 11:54:26 +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
8fb4f10995
Don't ICE on ZST union ( #780 )
2021-10-28 08:13:00 +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
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
Eduard-Mihai Burtescu
2dc88f26ac
Simplify FnAbi
handling for the fewer PassMode
s 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 FnAbi
s to remove unsupported PassMode
s, 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
e2db97f899
Update dependencies ( #765 )
2021-10-14 14:38:15 +00: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 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
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
Eduard-Mihai Burtescu
6807c5973d
Re-add -Zsymbol-mangling-version=v0
.
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
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
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
khyperia
44ae4411ee
Revert no-longer-needed OpTypeArray support
2021-08-20 12:20:14 +03:00
khyperia
0bd0bf0f11
Fix issues with some raytracing functions and add tests
2021-08-20 12:20:14 +03:00
Eduard-Mihai Burtescu
2d5b8e6b0e
Get the default panic hook for ICEs, from std::panic::set_hook
.
2021-08-20 11:45:39 +03:00
Ashley Hauck
ee3d5afe63
Update rspirv to 0.10 ( #724 )
2021-08-20 11:24:26 +03:00
Eduard-Mihai Burtescu
9a69d6dccc
specializer: allow unused fully-constrained interface variables.
2021-08-19 18:20:27 +03:00
Eduard-Mihai Burtescu
f14046477a
link: remove workaround for mdsteele/rust-ar#19. ( #730 )
2021-08-19 08:45:29 +02:00
Eduard-Mihai Burtescu
4dcb50169f
link: rely on the default metadata loader.
2021-08-13 17:32:10 +03:00
Eduard-Mihai Burtescu
731a5e86aa
link: switch from tar
to ar
for .rlib
s.
2021-08-13 17:32:10 +03:00
Eduard-Mihai Burtescu
5a431e65a1
link: use METADATA_FILENAME instead of hardcoding ".metadata".
2021-08-13 17:32:10 +03:00
Markus Siglreithmaier
acda7716db
asm: add support for noreturn option ( #717 )
...
* asm: add support for noreturn option
OpUnreachable will be appended as terminator at the end of the asm block.
* asm: implicit label after return or abort terminator
* rework handling
* fix tests and add few comments
* fix tests
2021-08-13 08:50:44 +02:00
Ashley Hauck
44c9fdd8c5
Release v0.4.0-alpha.12 ( #719 )
2021-08-12 10:46:32 +00:00
Eduard-Mihai Burtescu
7501f1895c
rustup: update to nightly-2021-08-10.
2021-08-10 16:53:28 +03:00
Eduard-Mihai Burtescu
7f5e2e778e
Fix unit tests to not have dead params.
2021-08-10 12:43:15 +03:00
Eduard-Mihai Burtescu
0bbea9e93e
Introduce remove_unused_params
pass, to run just before zombie removal.
2021-08-10 12:43:15 +03:00
Eduard-Mihai Burtescu
5e23a73c85
Move CallGraph
into a new ipo
module.
2021-08-10 12:43:15 +03:00
Eduard-Mihai Burtescu
340816ae75
abi: make dig_scalar_pointee
search for offsets in all layout fields.
2021-08-10 10:55:39 +03:00
Eduard-Mihai Burtescu
7393c3884f
abi: switch scalar_pair_field_index
to an offset.
2021-08-10 10:55:39 +03:00
Eduard-Mihai Burtescu
c1cdc4707c
abi: use scalar_pair_field_index
instead of index
in some places.
2021-08-10 10:55:39 +03:00
Ashley Hauck
12c09cbc5a
Remove implicit bindless and kernel modes ( #710 )
...
* Remove +bindless mode
* Remove +kernel mode
2021-08-10 08:23:24 +02:00
Ashley Hauck
a93d6e0f2a
Add sample_bias and gather functions ( #704 )
...
* Add sample_bias function
* Update line numbers
* Add gather function
* Update spirv-tools
CI was failing on "Capability SampledRect is not allowed by Vulkan 1.1
specification (or requires extension)", except locally it was fine, and
I have more up to date spirv-tools than CI, so try bumping the CI
version to see if it's just an out-of-date spirv-val
* Fix gather() in vulkan
* Convert compiler valication into marker traits
2021-08-06 15:26:30 +02:00
Alex Es
bca7656c8c
Added a transformation that gets rid of temporary composites. ( #690 )
...
* Added an optimization that gets rid of temporary composites.
Those temporary composites result from inlining of multi-argument
closures. Not only are they rather useless, they're also sometimes
invalid, when an argument to said closure is e.g. a pointer.
* Correctness fixes to transitive unused removal:
- delay only if the instruction is in reference set
- properly mark composites being inserted into composites as used
* cargo fmt
* clippy
* Make transformation per-function & rely on DCE for eliminating dead constructs.
* Forgot to mark CompositeInsert as pure & additional line cleaning
* Rustfmt
* Remove duplicate lines only once
2021-08-06 10:52:56 +02:00
Alex Es
d548268140
Aggressively prune no-side-effect instructions during DCE. ( #691 )
...
* Aggressively prune no-side-effect instructions during DCE.
Since we're walking all the instructions anyway, it's practically
zero-cost.
* Reverse iteration order within a function.
This allows to root more instructions per `spread_roots`
invocation, becoming zero-cost in absence of loops.
* Manually iterate over function instructions in reverse order.
2021-08-04 08:03:38 +00:00
bjorn3
cccb9737d7
Use DefaultMetadataLoader for loading dylib metadata ( #698 )
2021-08-03 10:20:46 +00:00
Ashley Hauck
819365cbae
Release v0.4.0-alpha.11 ( #702 )
2021-08-02 14:02:02 +00:00
Ashley Hauck
62799d06cc
Make BuilderSpirv::has_capability
and has_extension
O(1) ( #688 )
2021-08-02 13:13:48 +02:00
khyperia
febd253d7b
Bypass rspirv O(n^2) deduplication
2021-06-24 16:55:40 +03:00
Ashley Hauck
06f0aa2c3a
Release v0.4.0-alpha.10 ( #679 )
2021-06-23 09:32:09 +02:00
evopen
8c05636f53
fix NO_SPIRV_OPT ( #675 )
2021-06-19 19:01:27 +02:00
Ashley Hauck
8924fe7b4c
Clean up DUMP environment variables ( #673 )
2021-06-17 17:07:35 +02:00
Ashley Hauck
1cef56bcf3
Cargo update ( #674 )
2021-06-17 17:06:26 +02:00
khyperia
efd97e6d22
Fix issue with --disassemble-entry
2021-06-17 18:03:38 +03:00
Ashley Hauck
db5e5fd336
rustup update and embark standard lints v0.4 ( #672 )
...
* rustup update
* update to embark standard lints v0.4
2021-06-17 13:10:19 +02:00
Ashley Hauck
f7ac6a09e7
Small linker refactorings ( #664 )
...
Not actually many interesting things here, just cleaning up some crud
from previous work where things were added/removed without full
knowledge of the surrounding code, so it becomes a bit of a "wait, why
the heck is it done this way" confusing mess for those trying to
understand it for the first time.
2021-06-15 09:20:03 +02:00
Ashley Hauck
e1a000d408
Nuke const generics feature ( #661 )
...
* Nuke const generics feature
* Remove spirv(image_type) attribute
2021-06-15 09:19:23 +02:00
Ashley Hauck
c3eff4d4a5
Add name_variables option to spirv-builder ( #660 )
2021-06-09 15:27:08 +02:00
Ashley Hauck
b072b5ebdc
Nuke the old structurizer ( #658 )
2021-06-09 12:22:04 +02:00
Ashley Hauck
31bfc338e0
Release v0.4.0-alpha.9 ( #646 )
2021-06-03 12:35:53 +00:00
khyperia
a5e9fe751b
Fix nasty miscompilation
2021-06-03 14:00:18 +02:00
Ashley Hauck
92b680fdb9
Release v0.4.0-alpha.8 ( #645 )
2021-06-02 14:06:56 +02:00
Alex Es
985cbed9e4
Added read_subpass for SubpassData images, and necessary attrs for it. ( #643 )
...
* Added read_subpass for SubpassData images, and necessary attrs for it.
* Fix CI; test bless + rustfmt
* Rename attachment_index => input_attachment_index.
* Rustfmt
* Fix clippy warning.
* Review: check for cap rather than adding cap, fix error messages.
2021-06-02 11:02:04 +02:00
Ashley Hauck
ba689b5603
Don't require Int* capabilities for mouse-shader ( #636 )
...
* Don't require Int* capabilities for mouse-shader
* Make Int*/Float64 errors be zombie_even_in_user_code
* Demote glam back to a non-system crate
2021-05-31 11:56:15 +02:00
Ashley Hauck
3fa15c99ae
Add spirv-val flags to spirv-builder ( #635 )
2021-05-31 09:44:09 +00:00
Ashley Hauck
5d22f600e7
Add runtime array type ( #596 )
2021-05-31 09:39:06 +00:00
Ashley Hauck
1046f7cdf6
Implement auto-vectorization ( #629 )
...
* Implement auto-vectorization
* Run mem2reg a lot
2021-05-31 11:22:02 +02:00
Ashley Hauck
6019f391ec
Add API to enable ext/capabilities, and remove default capabilities ( #630 )
...
* Do not set some capabilities by default
* Fix nondeterminism
* Add required caps to mouse shader
2021-05-26 11:57:16 +02:00
Eduard-Mihai Burtescu
e5a07a9e2b
rustup: update to nightly-2021-05-24. ( #631 )
...
* rustup: update to nightly-2021-05-24.
* tests: update expected OpLine numbers in disassembly tests.
2021-05-25 08:28:47 +02:00
Ashley Hauck
47d1e75327
Always emit json metadata, and emit entry point names ( #622 )
...
* Always emit json metadata
* Codegen shader entry point names
* Fix tests
2021-05-24 09:45:58 +02:00
Ashley Hauck
6bff395680
Build the wgpu shader at runtime ( #627 )
...
* Build the wgpu shader at runtime
2021-05-21 12:09:56 +00:00
Ashley Hauck
ca988f95de
rustup update to 2021-05-17 ( #621 )
2021-05-20 14:46:09 +02:00
Markus Siglreithmaier
75d0d8f1ac
asm: support sampler and as types ( #624 )
...
* asm: support sampler and as types
* fmt
2021-05-20 09:08:54 +02:00
Ashley Hauck
943f09fef7
Emit OpLine instructions ( #616 )
...
* Emit OpLine instructions
2021-05-07 08:57:47 +00:00
Jasper Bekkers
78ac32be27
Initial work for bindless buffers & textures in rust-gpu ( #450 )
...
This adds the initial support for basic bindless types into rust-gpu. Using this requires a compilation with the `-Ctarget-features=+bindless` flag, or through `.bindless` in the `SpirvBuilder`.
2021-05-05 18:34:39 +02:00
XAMPPRocky
2f451ee993
Add support for using target-features for extensions and capabilities ( #610 )
2021-05-03 11:19:10 +00:00
Ashley Hauck
1431c18b9d
Move disassemble tests to compiletest ( #609 )
...
* Move disassemble tests to compiletest
* Fix problematic tests
* Add newlines
2021-04-30 09:07:45 +02:00
Ashley Hauck
7a6806c17b
Add shader image query instructions ( #608 )
...
* Add shader image query instructions
* Normalize spirv-std src paths in test output
* Fix tests on vulkan
2021-04-30 09:07:38 +02:00
XAMPPRocky
538cdd2ea7
Update version and remove usage of or_patterns ( #607 )
2021-04-29 10:55:51 +02:00
XAMPPRocky
a14e3ec110
Release 0.4.0-alpha.6 ( #606 )
...
compiletests@0.4.0-alpha.6
compiletests-deps-helper@0.4.0-alpha.6
compute-shader@0.4.0-alpha.6
example-runner-ash@0.4.0-alpha.6
example-runner-cpu@0.4.0-alpha.6
example-runner-wgpu@0.4.0-alpha.6
mouse-shader@0.4.0-alpha.6
multibuilder@0.4.0-alpha.6
rustc_codegen_spirv@0.4.0-alpha.6
shared@0.4.0-alpha.6
simplest-shader@0.4.0-alpha.6
sky-shader@0.4.0-alpha.6
spirv-builder@0.4.0-alpha.6
spirv-std@0.4.0-alpha.6
spirv-std-macros@0.4.0-alpha.6
spirv-types@0.4.0-alpha.6
Generated by cargo-workspaces
2021-04-29 09:24:21 +02:00
Ashley Hauck
49dd238083
Bump rust-toolchain to nightly-2021-04-25 ( #605 )
...
* Bump rust-toolchain to nightly-2021-04-25
2021-04-28 13:53:33 +00:00
XAMPPRocky
f88ae5b28a
Add Const Generic Image Type ( #359 )
...
* Add parameterized Image type
* nits
* Update crates/spirv-std/src/lib.rs
* Update crates/rustc_codegen_spirv/src/symbols.rs
* Update crates/rustc_codegen_spirv/src/symbols.rs
* Update symbols.rs
2021-04-28 09:47:40 +02:00
Erin Power
18ba6f322d
Add support for SPV_KHR_ray_query
2021-04-27 16:07:46 +03:00
XAMPPRocky
d04039efda
Add track_caller to type lookups ( #599 )
2021-04-22 10:02:26 +02:00
XAMPPRocky
a42a9f20e1
Add support for SPV_KHR_ray_tracing ( #563 )
...
* Add support for SPV_KHR_ray_tracing
* Update spirv_type_constraints.rs
* Update spirv_type_constraints.rs
* Update spirv_type_constraints.rs
2021-04-16 16:59:11 +03:00
Eduard-Mihai Burtescu
bb7adc912f
asm: infer the result type of OpAccessChain (when indexing into arrays).
2021-04-16 09:00:45 +03:00
Eduard-Mihai Burtescu
fedac0f4a5
asm: streamline generating a type from a pattern for inference.
2021-04-16 09:00:45 +03:00
Ashley Hauck
6c8dece25a
Fix issue 585 ( #594 )
2021-04-13 11:34:02 +02:00
Ashley Hauck
9679e615bd
Disable variable pointers by default ( #591 )
2021-04-13 11:30:16 +02:00
XAMPPRocky
b6311789bb
Add new handling for SPIR-V targets ( #559 )
...
* Add new handling for SPIR-V targets
* Ensure target is always three components
2021-04-12 11:19:28 +00:00
XAMPPRocky
4824d205ba
Release 0.4.0-alpha.5 ( #590 )
...
compiletests@0.4.0-alpha.5
compiletests-deps-helper@0.4.0-alpha.5
compute-shader@0.4.0-alpha.5
example-runner-ash@0.4.0-alpha.5
example-runner-cpu@0.4.0-alpha.5
example-runner-wgpu@0.4.0-alpha.5
mouse-shader@0.4.0-alpha.5
multibuilder@0.4.0-alpha.5
rustc_codegen_spirv@0.4.0-alpha.5
shared@0.4.0-alpha.5
simplest-shader@0.4.0-alpha.5
sky-shader@0.4.0-alpha.5
spirv-builder@0.4.0-alpha.5
spirv-std@0.4.0-alpha.5
spirv-std-macros@0.4.0-alpha.5
Generated by cargo-workspaces
2021-04-12 10:27:55 +02:00
Eduard-Mihai Burtescu
7c568ab219
Allow constant references (to constant data), when they're valid SPIR-V.
2021-04-12 11:09:50 +03:00
Eduard-Mihai Burtescu
2bf4f76741
builder_spirv: track whether SpirvConst
s were deemed "legal" or not.
2021-04-12 11:09:50 +03:00
Eduard-Mihai Burtescu
00fe5a975e
builder_spirv: replace the constants BiHashMap
with two FxHashMap
s.
2021-04-12 11:09:50 +03:00
Eduard-Mihai Burtescu
3a9e7781d5
builder_spirv: don't keep a whole SpirvValue
in the constants
cache.
2021-04-12 11:09:50 +03:00
Eduard-Mihai Burtescu
84350e31d3
builder_spirv: split out the type field from SpirvConst
.
2021-04-12 11:09:50 +03:00
Eduard-Mihai Burtescu
8c89b49b66
rustc_codegen_spirv: use FxHash{Map,Set}
instead of the std ones.
2021-04-08 18:02:55 +03:00
XAMPPRocky
98d7dec503
Release 0.4.0-alpha.4 ( #582 )
...
compiletests@0.4.0-alpha.4
compiletests-deps-helper@0.4.0-alpha.4
compute-shader@0.4.0-alpha.4
example-runner-ash@0.4.0-alpha.4
example-runner-cpu@0.4.0-alpha.4
example-runner-wgpu@0.4.0-alpha.4
mouse-shader@0.4.0-alpha.4
multibuilder@0.4.0-alpha.4
rustc_codegen_spirv@0.4.0-alpha.4
shared@0.4.0-alpha.4
simplest-shader@0.4.0-alpha.4
sky-shader@0.4.0-alpha.4
spirv-builder@0.4.0-alpha.4
spirv-std@0.4.0-alpha.4
spirv-std-macros@0.4.0-alpha.4
Generated by cargo-workspaces
2021-04-08 13:58:43 +03:00
Eduard-Mihai Burtescu
3f641638c8
entry: move call arg ajustments to declare_shader_interface_for_param
.
2021-04-08 10:18:49 +03:00
Eduard-Mihai Burtescu
630e5a61d8
entry: shorten variable
to var
.
2021-04-08 10:18:49 +03:00
Eduard-Mihai Burtescu
f834f989e5
entry: rename declare_interface_global_for_param
to declare_shader_interface_for_param
.
2021-04-08 10:18:49 +03:00
Eduard-Mihai Burtescu
b893c47727
entry: move things around in declare_interface_global_for_param
.
2021-04-08 10:18:49 +03:00
Eduard-Mihai Burtescu
1d1c2951c7
entry: collect OpEntryPoint
operands in declare_interface_global_for_param
.
2021-04-08 10:18:49 +03:00
Eduard-Mihai Burtescu
2b4037832f
spirv_type: fix copy-paste mistake regarding InterfaceBlock
.
2021-04-08 10:18:49 +03:00
Eduard-Mihai Burtescu
4395b84114
Deprecate #[spirv(block)]
and auto-wrap in "interface blocks" instead.
2021-04-05 20:45:59 +03:00
Eduard-Mihai Burtescu
561f0dd984
Clean up the output of assert_ty_eq!
(when it fails).
2021-04-05 20:45:59 +03:00
Eduard-Mihai Burtescu
674649c4cb
entry: tweak spans (mostly to use hir_param.ty_span
in more places).
2021-04-05 20:45:59 +03:00
Eduard-Mihai Burtescu
ad859e681e
entry: check the type of the argument we compute from the global OpVariable
.
2021-04-05 20:45:59 +03:00
Eduard-Mihai Burtescu
6c3ce3fac2
entry: use a Builder
instead of manually emitting into the entry stub.
2021-04-05 20:45:59 +03:00
Eduard-Mihai Burtescu
9bada9362d
entry: return SpirvValue
from declare_interface_global_for_param
.
2021-04-05 20:45:59 +03:00
Eduard-Mihai Burtescu
7cc69e7126
entry: rename declare_parameter
to declare_interface_global_for_param
.
2021-04-05 20:45:59 +03:00
khyperia
40359bdb56
Add DCE-φ pass
2021-04-01 13:33:07 +02:00
Ashley Hauck
f0f0f318ec
Don't treat OpSelectionMerge as an edge in mem2reg ( #571 )
...
* Don't treat OpSelectionMerge as an edge in mem2reg
* Make outgoing_edges not allocate
* Update test
2021-04-01 10:03:00 +02:00
Ashley Hauck
4fa73bddb4
Infer the storage class for images/samplers/imagesamplers ( #567 )
...
* Infer the storage class for images/samplers/imagesamplers
* format
* Move comment
2021-04-01 07:49:08 +00:00
Eduard-Mihai Burtescu
fc8efd4562
structurizer: treat single-exit regions as unconditionally branching. ( #566 )
2021-03-31 12:04:20 +00:00
Eduard-Mihai Burtescu
9723e12723
structurizer: find and/or cache OpConstant{False,True}
.
2021-03-31 00:41:17 +03:00
XAMPPRocky
f09a5f6e65
Release 0.4.0-alpha.3 ( #560 )
...
compiletests@0.4.0-alpha.3
compiletests-deps-helper@0.4.0-alpha.3
compute-shader@0.4.0-alpha.3
example-runner-ash@0.4.0-alpha.3
example-runner-cpu@0.4.0-alpha.3
example-runner-wgpu@0.4.0-alpha.3
mouse-shader@0.4.0-alpha.3
multibuilder@0.4.0-alpha.3
rustc_codegen_spirv@0.4.0-alpha.3
shared@0.4.0-alpha.3
simplest-shader@0.4.0-alpha.3
sky-shader@0.4.0-alpha.3
spirv-builder@0.4.0-alpha.3
spirv-std@0.4.0-alpha.3
spirv-std-macros@0.4.0-alpha.3
Generated by cargo-workspaces
2021-03-30 11:23:16 +00:00
Eduard-Mihai Burtescu
0e7fdb30f2
#[spirv(uniform)]
is actually immutable in the absence of BufferBlock
. (#558 )
2021-03-30 09:32:59 +00:00
Eduard-Mihai Burtescu
820573a21f
Duplicate SpirvValueKind::ConstantPointer
into a separate FnAddr
variant. ( #557 )
2021-03-30 08:55:37 +00:00
Ashley Hauck
d6ff9cd439
Run DCE twice ( #556 )
2021-03-30 09:44:01 +02:00
Henno
9f25e92d60
Remove sized check from Block translation
2021-03-30 05:35:02 +03:00
XAMPPRocky
3a53968817
Add support for multiple target environments ( #533 )
...
* Add support for multiple target environments
* updates from code review
* Update lib.rs
2021-03-29 18:43:07 +02:00
Henno
05ce407278
Add basic support for struct DSTs ( #504 )
...
* Add basic support for struct DSTs
* Add tests
* cleanup tests
* Update with entry changes, address review
* Address review
* Update allocate_const_scalar.stderr
* Add ArrayStride decoration to OpTypeRuntimeArray
2021-03-29 18:02:09 +02:00
Ashley Hauck
c3a3b20e3c
Add support for outputting multiple modules, one per entry point ( #551 )
...
* Add multimodule feature
* Use -Cllvm-args instead of -Ctarget-feature for multimodule
* Fix cargo.toml
2021-03-29 17:59:03 +02:00
Eduard-Mihai Burtescu
db208e7190
Avoid ever building rustc_codegen_spirv more than once in release mode.
2021-03-29 09:05:48 +02:00
Erin Power
3fc6cd5a2f
Release 0.4.0-alpha.2
...
compute-shader@0.4.0-alpha.2
rustc_codegen_spirv@0.4.0-alpha.2
spirv-builder@0.4.0-alpha.2
spirv-std@0.4.0-alpha.2
spirv-std-macros@0.4.0-alpha.2
Generated by cargo-workspaces
2021-03-26 13:23:23 +01:00
khyperia
d3605f79c7
Add #[spirv(invariant)]
2021-03-26 13:15:29 +01:00
Erin Power
1e7eb64f17
Release 0.4.0-alpha.1
...
compute-shader@0.4.0-alpha.1
rustc_codegen_spirv@0.4.0-alpha.1
spirv-builder@0.4.0-alpha.1
spirv-std@0.4.0-alpha.1
spirv-std-macros@0.4.0-alpha.1
Generated by cargo-workspaces
2021-03-25 16:16:25 +01:00
Ashley Hauck
15d96cde8c
Use the cute Function::all_inst_iter helper, because it's cute. ( #535 )
2021-03-25 10:20:34 +00:00
Eduard-Mihai Burtescu
79200bb777
Produce TypeKind::Token
for {Image,Sampler,SampledImage} in type_kind
.
2021-03-24 14:51:50 +02:00
Johan Andersson
916f4798d3
Use Embark standard lints v0.3
2021-03-24 14:51:50 +02:00
Eduard-Mihai Burtescu
908487ae1d
entry: use T
instead of &T
for Input
s.
2021-03-23 09:30:24 +01:00
Eduard-Mihai Burtescu
8c1406ee39
entry: reorganize storage class handling, and move some checking to attr
.
2021-03-23 09:30:24 +01:00
Eduard-Mihai Burtescu
e04e1f53fc
Replace spirv_std::storage_class::X<T> with &T/&mut T and optionally #[spirv(x)].
2021-03-23 09:30:24 +01:00
XAMPPRocky
681e4f21ae
Update nightly ( #516 )
2021-03-22 10:20:05 +00:00
Eduard-Mihai Burtescu
94f46142a7
Use AggregatedSpirvAttributes
instead of iterating over SpirvAttribute
s.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
ffcddd4f4c
attr: disallow multiple attributes that are identical or in the same category.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
8688e8c25a
attr: group attributes by their targets.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
a2026376b7
attr: group {ImageType,Sampler,SampledImage} into an IntrinsicType
enum.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
fdbfdec6f5
symbols: move SpirvAttribute
to the attr module.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
7f94fea3b6
attr: target_from_impl_item
can just be private.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
b3b3fbec98
tests: add a test for where #[spirv(...)]
attributes can (not) be used.
2021-03-22 11:23:55 +02:00
XAMPPRocky
52ae430ec1
Update dependencies ( #506 )
2021-03-22 09:27:34 +01:00
Eduard-Mihai Burtescu
3274778d98
link: don't use {:?}
with paths because it turns \ into \\.
2021-03-22 08:01:22 +02:00
Ashley Hauck
3bc8a8076b
Fix recover_access_chain_from_offset on unsized fields ( #510 )
2021-03-19 15:23:55 +00:00
Eduard-Mihai Burtescu
a0b4de4cf6
Bump rust-toolchain to nightly-2021-03-17, unlocking for i in 0..n
loops!
2021-03-17 03:31:11 +02:00
Eduard-Mihai Burtescu
17f4f37a64
Bump rust-toolchain to nightly-2021-03-11.
2021-03-17 03:31:11 +02:00
XAMPPRocky
6b33db07e6
Update to 0.4.0-alpha.0 ( #497 )
...
* Release 0.4.0-alpha.0
compute-shader@0.4.0-alpha.0
rustc_codegen_spirv@0.4.0-alpha.0
spirv-builder@0.4.0-alpha.0
spirv-std@0.4.0-alpha.0
spirv-std-macros@0.4.0-alpha.0
Generated by cargo-workspaces
* Update Cargo.lock, remove unused one
* Update lockfile
* update lockfile
2021-03-16 15:14:53 +01:00
Jake Shadle
44393affe5
Update spirv-tools to 0.5.0 ( #496 )
...
* Update spirv-tools to 0.5.0
* Use ubuntu-20.04 image rather than the ambiguous "latest"
* Update spirv-tools binaries to latest
2021-03-16 13:04:23 +01:00
Henno
eebb2d3b32
Require local size x dimension and remove gl_ ( #495 )
...
* Require local size and remove gl_
Removes the gl_ prefix from the compute shader attribute, shortens the thread dimension declaration to threads(x, y, z), requires the x size dimensions be specified, trailing ones may be elided for the y or z dimensions.
* Implement review suggestions
2021-03-16 09:12:21 +01:00