dawn-cmake/test/let/handles/texture_sampler.wgsl.expected.msl
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

17 lines
493 B
Plaintext

#include <metal_stdlib>
using namespace metal;
fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_1 [[texture(0)]], sampler tint_symbol_2 [[sampler(1)]]) {
texture2d<float, access::sample> const x = tint_symbol_1;
sampler const a = tint_symbol_2;
(void) 1;
texture2d<float, access::sample> const y = x;
sampler const b = a;
(void) 2;
texture2d<float, access::sample> const z = y;
sampler const c = b;
(void) z.sample(c, float2(1.0f, 2.0f));
return;
}