mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-25 16:25:25 +00:00
f88ae5b28a
* 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
13 lines
272 B
Rust
13 lines
272 B
Rust
// build-pass
|
|
|
|
use spirv_std::{arch, Image};
|
|
|
|
#[spirv(fragment)]
|
|
pub fn main(
|
|
#[spirv(descriptor_set = 0, binding = 0)] image: &Image!(2D, type=f32, sampled),
|
|
output: &mut glam::Vec4,
|
|
) {
|
|
let texel = image.fetch(glam::IVec2::new(0, 1));
|
|
*output = texel;
|
|
}
|