rust-gpu
rust-gpu copied to clipboard
🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧
While trying to get `texpresso` to compile to SPIR-V I very early on encountered an error about a missing `OpCapability Int8`. After some searching around I eventually found out how...
### Expected Behaviour Successful compilation ### Example & Steps To Reproduce ```rust #![no_std] #[track_caller] fn panic() { panic!("owo") } #[spirv_std::spirv(fragment)] pub fn main() { panic(); } ``` produces ``` error:...
While the GPU provides hardware for texture sampling and interpolation, on other targets (i.e. CPU in general) it's necessary to emulate that. Currently, the `Image` and `Sampler` APIs don't provide...
Initializing arrays seems to replace 0i32 with 0u32 when using [0i32; N]. Example (see https://github.com/charles-r-earp/rust-gpu/tree/array-init for compiletests). ``` ; SPIR-V ; Version: 1.3 ; Generator: Google rspirv; 0 ; Bound:...
I'm barely getting started but since the [documentation](https://embarkstudios.github.io/rust-gpu/book/writing-shader-crates.html#writing-shader-crates) recommends to file issues, here is one. ### Example & Steps To Reproduce - `cargo run --bin wgpu_runner` (I guess it should...
SpirV allows defining `import` and `export` [[0](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Linkage_Type)] for linking separate Shader modules [[1](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_linkage)] post compilation. Apparently SpirV linking is already used within rust-gpu, but not exposed. Therefore we can't use...
Remove internal and unsupported compilation targets from public docs
This PR adds the `ScalarOrVector` trait which represents types that can be either a scalar or a vector! Motivation: I am currently adding support for subgroup operations, and for example...
### Expected Behaviour The code should compile ### Example & Steps To Reproduce code: ```rust #[spirv(fragment)] pub fn main(x: (usize, ())) { drop(&x.1); } ``` result: ``` error: Cannot cast...
Add official documentation that one should have ```toml [workspace] resolver = "2" ``` in their root `cargo.toml` to make sure dependencies are resolved correctly and that crates compiled with different...