* 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>
* 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
* 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.
* 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)]
* 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
* 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
* 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
* 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
* 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.
* 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.