summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-09-06 18:34:45 -0700
committerGitHub <noreply@github.com>2023-09-06 18:34:45 -0700
commit135a5db8d3a7cafa3a43076f8b6f9b8615bd9491 (patch)
tree31c1c41998f84d9f58872acc5fe851b5739fb40e /tests
parent891a6cf376c6b2560231502614b37c332f44ddea (diff)
Update prebuilt glslang binaries (#3189)
* Update prebuilt glslang binaries * Add test for GL_EXT_texture_shadow_lod functions. * fix --------- Co-authored-by: Yong He <yhe@nvidia.com>
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