dawn-cmake/test/let/handles/texture_sampler.wgsl
Ben Clayton 6e8ace016e test: Add a case for resources used through lets
A hypothetical case discussed in the WG call, which I wasn't entirely sure was going to work. It does.

Change-Id: I855f1e02af2fe62214e3fb964f6937e3d88016eb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59021
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-07-20 20:25:38 +00:00

16 lines
281 B
WebGPU Shading Language

[[group(0), binding(0)]] var t : texture_2d<f32>;
[[group(0), binding(1)]] var s : sampler;
[[stage(fragment)]]
fn main() {
let x = t;
let a = s;
ignore(1);
let y = x;
let b = a;
ignore(2);
let z = y;
let c = b;
ignore(textureSample(z, c, vec2<f32>(1., 2.)));
}