diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/glsl/sampler-fetch.slang | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/glsl/sampler-fetch.slang b/tests/glsl/sampler-fetch.slang new file mode 100644 index 000000000..6d6f98cd7 --- /dev/null +++ b/tests/glsl/sampler-fetch.slang @@ -0,0 +1,20 @@ +//TEST:SIMPLE(filecheck=CHECK): -target glsl -stage compute -entry testMain +//TEST:SIMPLE(filecheck=SPV): -target spirv -stage compute -entry testMain -emit-spirv-via-glsl + +// We shouldn't be using GL_EXT_samplerless_texture_functions extension. +// CHECK-NOT: GL_EXT_samplerless_texture_functions + +// SPV: OpImageFetch + +Sampler2D sampler; + +RWStructuredBuffer<float4> outputBuffer; + +[NumThreads(1,1,1)] +void testMain() +{ + uint w, h, l; + sampler.GetDimensions(0, w, h, l); + var result = sampler.Load(int3(1,1,1), int2(1,2)); + outputBuffer[0] = result + float(w); +}
\ No newline at end of file |
