summaryrefslogtreecommitdiff
path: root/tests/glsl
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-11-18 15:21:13 -0800
committerGitHub <noreply@github.com>2024-11-18 15:21:13 -0800
commit75d65d36608cf4653490f0a04a17d1ee057b47a6 (patch)
tree58375b909b88d5ba772a2ff34d66a5571dbef6e9 /tests/glsl
parentec5e019fa9732b99b75b2a3ca4f2ff5a7a3d2f33 (diff)
Remove "GL_EXT_samplerless_texture_functions" from combined sampler functions. (#5585)
Diffstat (limited to 'tests/glsl')
-rw-r--r--tests/glsl/sampler-fetch.slang20
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