rust-gpu/tests/ui/image/format.rs
XAMPPRocky f88ae5b28a
Add Const Generic Image Type (#359)
* Add parameterized Image type

* nits

* Update crates/spirv-std/src/lib.rs

* Update crates/rustc_codegen_spirv/src/symbols.rs

* Update crates/rustc_codegen_spirv/src/symbols.rs

* Update symbols.rs
2021-04-28 09:47:40 +02:00

13 lines
278 B
Rust

// build-pass
use spirv_std::{arch, Image};
#[spirv(fragment)]
pub fn main(
#[spirv(descriptor_set = 0, binding = 0)] image: &Image!(2D, format=rgba32f, sampled),
output: &mut glam::Vec4,
) {
let texel = image.fetch(glam::IVec2::new(0, 1));
*output = texel;
}