Commit Graph

62 Commits

Author SHA1 Message Date
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
XAMPPRocky
182bbca7e5 Update mod.rs 2021-03-27 17:12:11 +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
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
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 Inputs. 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
52ae430ec1
Update dependencies (#506) 2021-03-22 09:27:34 +01:00
XAMPPRocky
27eb1d1413
Refactor validation tests to use compiletest (#464)
* Refactor validation tests to use compiletest

* Update tests/ui/lang/core/ptr/allocate_const_scalar.rs
2021-03-18 17:16:21 +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
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
XAMPPRocky
1d365490a5
Add arithmetic instructions to arch (#446) 2021-03-16 09:42:18 +00:00
XAMPPRocky
6e8453f386
Decouple glam from spirv-std (#476) 2021-03-16 09:59:08 +01:00
Eduard-Mihai Burtescu
7348f3389d
builder: constant-fold bx.mul(a, b) in order to support ptr::{read,write}. (#485) 2021-03-11 09:53:49 +01:00
Jesse
c53c351987
feat: add image fetch (#480) 2021-03-10 08:17:07 +00:00
Johan Andersson
a990ed5696
Use Embark standard lints v0.2 (#475) 2021-03-08 10:37:43 +01:00
Erin Power
499bf4cede Version bump to 0.3.0 2021-03-04 17:50:40 +01:00
Eduard-Mihai Burtescu
7723f5db6b
Access the original type's fields through a pointercast, under the Logical addressing model. (#469)
* Defer pointer casts under the Logical addressing model.

* Access the original type's fields through a `pointercast`, under the Logical addressing model.

* Add a test using a `for` loop and a custom `Range`-like iterator.
2021-03-04 15:15:01 +01:00
XAMPPRocky
5cfaa0055b
Update to the latest nightly (#467)
* Update to the latest nightly

* Update to fix clippy lints

* ignore test for now
2021-03-04 14:12:00 +01:00
XAMPPRocky
5446ca3f9f
Revert const generics (#465) 2021-03-03 17:09:31 +02:00
XAMPPRocky
6678f9a49d
Add entry point attribute configuration. (#458)
* Add entrypoint attribute configuration.

* Update with feedback

* Add docs

* fmt

* rm usused_attributes

* other changes

* fmt
2021-03-02 15:30:08 +02:00
Eduard-Mihai Burtescu
6571f45a29 attr: mark #[spirv(...)] attributes as used and remove #[allow(unused_attributes)]. 2021-03-02 08:54:28 +02:00
Jasper Bekkers
2f4c67e8e0
Safeness bug in StorageImage2d::write (#453)
* Safeness bug in StorageImage2d::write

It's pretty easy to see why this is unsafe, if multiple threads write to the same coordinate race-conditions happen.

Ultimately this should be addressed through something like #216 and some higher level abstractions on top of our buffer types, but since we don't have those for now, marking this as unsafe seems to be the only thing we can do for now.

* Remove unsafe {} block for clippy
2021-03-01 15:20:07 +00:00
XAMPPRocky
57a9ebb797
Add any and all arch instructions (#441) 2021-02-25 17:09:44 +02:00
Eduard-Mihai Burtescu
47cf841209 spirv_std: deprecate load/store/then methods on storage_class::* types. 2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
67746012f5 Infer storage classes using the specializer, replacing special pointer types. 2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
7da5be3766
Work around linker error by isolating spirv_tools usage to rustc_codegen_spirv. (#436) 2021-02-19 14:46:50 +02:00
Jasper Bekkers
6d2d4a13e6
Inline asm types (#418)
* Add more types for inline asm

* Add basic OpDecorate support to inline asm

* Add khronos ticket link

* Add additional operands support to inline assembly

* Fix unused import warning

* Switch to rspirv git dependency

* Update Cargo.lock

* fmt

* Switch to while-let loop

* Address feedback around `additional_extensions`

* Remove debug code

* Remove un-needed special cases for OpCapability and OpExtension

* Switch back to iterating over all instructions only once, with this one cool trick

* Add test for OpDecorate / varargs

* Fix residual merge error

* Add test for a complex OpImageSample instruction that needs some BitEnums
2021-02-18 14:08:58 +01:00
XAMPPRocky
34261a8905
Add StorageImage with read/write (#434) 2021-02-17 10:15:42 +00:00
Erin Power
77fd6ee4a9 Release 0.3.0-alpha.0
compute-shader@0.3.0-alpha.0
rustc_codegen_spirv@0.3.0-alpha.0
spirv-builder@0.3.0-alpha.0
spirv-std@0.3.0-alpha.0
spirv-std-macros@0.3.0-alpha.0

Generated by cargo-workspaces
2021-02-16 16:19:46 +01:00
Ashley Hauck
56067de909
Support const args in asm! (#421) 2021-02-12 14:05:31 +01:00
XAMPPRocky
c10a6c0747
Add vector_insert_dynamic (#411)
* Add vector_insert_dynamic and copy_object

* Update arch.rs

* Update basic.rs

* Update arch.rs

* Update spirv_type_constraints.rs
2021-02-11 15:18:52 +00:00
Eduard-Mihai Burtescu
3a4d140328
Don't require 1:1 mapping between OpTypeStructs and their names. (#406) 2021-02-01 14:24:02 +00:00
Ashley Hauck
3f0900c89d
Enable optimizer (#401)
* Enable optimizer

* Fix tests
2021-01-29 11:30:56 +00:00
XAMPPRocky
69b94bb6f9
Add initial arch module (#394) 2021-01-27 15:54:17 +00:00
Jesse
04ad2ad64f
fix: handle an ICE resulting from a dangling pointer (#342) 2021-01-20 12:52:06 +00:00
XAMPPRocky
9e7b9de28f
Add autolinks to silence rustdoc warnings (#363) 2021-01-05 12:14:34 +00:00
Jake Shadle
95a4cfab41
Update spirv-tools to 0.2.0 (#343)
* Update spirv-tools to 0.2.0

* Rustfmt
2020-12-14 09:43:23 +00:00
Eduard-Mihai Burtescu
9e99c05a76
Update to nightly-2020-12-11. (#338)
* Update to nightly-2020-12-11.

* Update for rustfmt changes (`cargo fmt --all`).

* Update `rustc_codegen_spirv::linker::test` for `rustc_interface` changes.

* Use `spirv_tools::util::{to,from}_binary` to pacify clippy.

* `#[allow(clippy::unnecessary_wraps)]` on `Result`-returning `fn run_thin`.
2020-12-11 10:40:35 +00:00
Eduard-Mihai Burtescu
ebf3dbee8d
Support "Unroll" Loop Control via function-scoped #[spirv(unroll_loops)]. (#337)
* Generalize the zombie serialization system to arbitrary custom decorations.

* Support "Unroll" Loop Control via function-scoped `#[spirv(unroll_loops)]`.

* Pacify the merciless clippy.
2020-12-10 19:57:15 +00:00
XAMPPRocky
c1dc273e70
Update version number (#322)
* Update version number

* Add lockfile
2020-12-04 16:50:19 +00:00
Ashley Hauck
a653c61b64
Get closer to testing NO_DCE in CI (#321)
* Get closer to testing NO_DCE in CI

The only remaining validation issues are due to the SROA pass not being
implemented yet

* Revert mistakenly included change
2020-12-04 15:05:13 +00:00
Eduard-Mihai Burtescu
6c7ca97e9b
Intercept panic calls and replace them with aborts. (#305)
* new_structurizer: fix infinite loops.

* intrinsics: use an infinite loop for `abort`.

* Don't deduplicate zombie values even with other zombies.

* Bring back `zombie_even_in_user_code` and use it for constants.

* Use global `OpVariable`s instead of undefs for `ConstantPointer`s.

* Intercept panic calls and replace them with aborts.
2020-12-03 18:40:24 +00:00
Ashley Hauck
d8d80d77f6
Add test for issue 283 (#302) 2020-12-02 17:50:48 +00:00
Eduard-Mihai Burtescu
e02beade35
New structurizer: now with ∞% more φ! (#287) 2020-12-02 11:05:04 +00:00
Eduard-Mihai Burtescu
adebc90070
Remove #[spirv(push_constant)] from function parameters. (#296) 2020-12-01 15:14:54 +00:00
Eduard-Mihai Burtescu
ae42a911a1
#[spirv(block)] for Block decorations on structs. (#295) 2020-12-01 14:28:49 +00:00
Eduard-Mihai Burtescu
340dfc4a76
spirv-builder: pass --target-dir to Cargo to avoid lock conflicts. (#293) 2020-12-01 14:09:36 +00:00