mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-29 18:24:18 +00:00
16 lines
362 B
Rust
16 lines
362 B
Rust
// Test `OpImageWrite`
|
|
// build-pass
|
|
// compile-flags: -C target-feature=+StorageImageWriteWithoutFormat
|
|
|
|
use spirv_std::{arch, Image};
|
|
|
|
#[spirv(fragment)]
|
|
pub fn main(
|
|
texels: glam::Vec2,
|
|
#[spirv(descriptor_set = 0, binding = 0)] image: &Image!(2D, type=f32, sampled=false),
|
|
) {
|
|
unsafe {
|
|
image.write(glam::UVec2::new(0, 1), texels);
|
|
}
|
|
}
|