diff options
| author | Yong He <yonghe@outlook.com> | 2023-09-06 18:34:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-06 18:34:45 -0700 |
| commit | 135a5db8d3a7cafa3a43076f8b6f9b8615bd9491 (patch) | |
| tree | 31c1c41998f84d9f58872acc5fe851b5739fb40e | |
| parent | 891a6cf376c6b2560231502614b37c332f44ddea (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>
| -rw-r--r-- | deps/target-deps.json | 2 | ||||
| -rw-r--r-- | source/slang/slang-stdlib-textures.cpp | 2 | ||||
| -rw-r--r-- | tests/expected-failure.txt | 1 | ||||
| -rw-r--r-- | tests/hlsl-intrinsic/texture-lod-shadow.slang | 15 |
4 files changed, 19 insertions, 1 deletions
diff --git a/deps/target-deps.json b/deps/target-deps.json index 6c0880c78..cf9267bf9 100644 --- a/deps/target-deps.json +++ b/deps/target-deps.json @@ -16,7 +16,7 @@ }, { "name" : "slang-glslang", - "baseUrl" : "https://github.com/shader-slang/slang-glslang/releases/download/v12.3.1-b/slang-glslang-12.3.1-b-", + "baseUrl" : "https://github.com/shader-slang/slang-glslang/releases/download/v13.0.0.x-e/slang-glslang-13.0.0.x-e-", "optional" : true, "packages" : { diff --git a/source/slang/slang-stdlib-textures.cpp b/source/slang/slang-stdlib-textures.cpp index e5af1367f..bec3a7155 100644 --- a/source/slang/slang-stdlib-textures.cpp +++ b/source/slang/slang-stdlib-textures.cpp @@ -948,6 +948,7 @@ void TextureTypeInfo::writeSampleFunctions() cat("texture($p, vec", arrCoordCount + 1, "($2, $3))") ); + sb << "__glsl_extension(GL_EXT_texture_shadow_lod)\n"; writeFunc( "float", "SampleCmpLevelZero", @@ -980,6 +981,7 @@ void TextureTypeInfo::writeSampleFunctions() cat("textureOffset($p, vec", arrCoordCount + 1, "($2, $3), $4)") ); + sb << "__glsl_extension(GL_EXT_texture_shadow_lod)\n"; writeFunc( "float", "SampleCmpLevelZero", 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 |
