* 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
* 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
* Basic type constraints for all non-reserved SPIR-V instructions.
* inline asm!: support writing _ in lieu of return types, for basic inference.
* Demonstrate using result type inference in inline asm!.
* inline asm!: allow inferring the result type of OpSampledImage.
The variable name `dim` is used to represent dim, image_format, and
access_qualifier in parse_image(). This might cause confusion for
someone trying to read and understand symbols.rs. This commit changes
names of variables to better reflect their purpose.
Co-authored-by: Adrian Herath <adrianisuru@manjaro.hsd1.il.comcast.net>
* Feedback
* cleanup
* Cleanup
* cleanup
* Feedback
* fmt cmon man, I need to format my code manually? pffff
* More feedback! fmt is no longer useless as well
* removed newline
* more if guards
* removed import
* MORE feedback
* fromiterator is gone!
* Removed debug line
* 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`.
* Generalize the zombie serialization system to arbitrary custom decorations.
* Support "Unroll" Loop Control via function-scoped `#[spirv(unroll_loops)]`.
* Pacify the merciless clippy.
* Add support for sampled images
Combined image samplers are allowed as resources and require a generic parameter indicating the underlying image type.
* fix formatting issues
* address review comments
* fix formatting issues
* 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
* 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.
* remove saturate from spirv_std MathExt and rename pow to powf
* update to latest glam
* update glam again and add `std` feature to `spirv-std` to support cpu runner
* re-remove spirv-tools-sys submodule
* fixup! Merge branch 'main' into powf-saturate
* Use libm instead of MathExt
* Fix lint for unused import when compiling with std
Co-authored-by: khyperia <github@khyperia.com>
* Add compile error when both use-compiled-tools and use-installed-tools are enabled
The compile error is located in the build.rs for rustc-codegen-spirv so that the error happens early, rather than after compiling spirv-tools.
* lint
* lint
* Update DILocation and update trait impls for nightly
* rustc_codegen_spirv: Update mir Scalar handling to nightly 2020-11-04
3a7970848cdf4d717d0b
* More changes to compile on the latest nightly
* Remove unused import warnings
Co-authored-by: Marijn Suijten <marijns95@gmail.com>
* Created examples/ wgpu-example-compute-runner + wgpu-example-compute-shader.
* Working compute example, can compile and run, set local_size. Validated changes do not break rendering example.
* Added complete list of ExecutionMode's to be specified underneath ExecutionModel. Replaced SpirvAttribute::Entry ExecutionModel with an Entry struct, which includes a Vec of ExecutionMode, ExecutionModeExtra to be submitted in entry.rs. Compute example runs. Passes all tests.
* Changed Cargo license info for compute examples. Simplified compute runner to be more similar to other wgpu example. Split of entry logic in symbol.rs to separate function. Fixed issue in builder/mod.rs.
* Pulled in reorganization changes to crates + examples. In symbols.rs moved really_unsafe_ignore_bitcasts to its own Symbol match. In entry.rs, entry stubs now return the fn_id, so that entry_stub() can add the execution modes in one place. Passed all tests.
* cargo fmt
* Removed duplicate examples. Fixed cargo fmt bug in compute runner.