summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/expected-failure.txt1
-rw-r--r--tests/hlsl-intrinsic/texture-lod-shadow.slang15
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/expected-failure.txt b/tests/expected-failure.txt
index df773a46b..281d79391 100644
--- a/tests/expected-failure.txt
+++ b/tests/expected-failure.txt
@@ -6,3 +6,4 @@ tests/compute/ray-tracing-inline.slang.1 (vk)
tests/language-feature/constants/constexpr-loop.slang.1 (vk)
tests/optimization/func-resource-result/func-resource-result-complex.slang.1 (vk)
tests/type/texture-sampler/texture-sampler-2d.slang (vk)
+tests/hlsl-intrinsic/texture-lod-shadow.slang.1 \ No newline at end of file
diff --git a/tests/hlsl-intrinsic/texture-lod-shadow.slang b/tests/hlsl-intrinsic/texture-lod-shadow.slang
new file mode 100644
index 000000000..bc78a9382
--- /dev/null
+++ b/tests/hlsl-intrinsic/texture-lod-shadow.slang
@@ -0,0 +1,15 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-via-glsl -entry computeMain -profile glsl_450 -stage compute
+//DISABLED_TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly -entry computeMain -profile glsl_450 -stage compute
+
+Texture2DArray t2dArray;
+RWStructuredBuffer<float4> result;
+SamplerComparisonState s;
+
+// CHECK: OpSourceExtension "GL_EXT_texture_shadow_lod"
+// CHECK: %{{[0-9]*}} = OpImageSampleDrefExplicitLod %float %{{[0-9]*}} %{{[0-9]*}} %float_0_5 Lod|ConstOffset %float_0 %{{[0-9]*}}
+
+[numthreads(1,1,1)]
+void computeMain()
+{
+ result[0] = t2dArray.SampleCmpLevelZero(s, float3(1, 2, 3), 0.5, int2(0, 0));
+} \ No newline at end of file