summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/slang-ir-wgsl-legalize.cpp7
-rw-r--r--tests/compute/texture-simpler.slang2
2 files changed, 8 insertions, 1 deletions
diff --git a/source/slang/slang-ir-wgsl-legalize.cpp b/source/slang/slang-ir-wgsl-legalize.cpp
index 691810cbb..8ac58780d 100644
--- a/source/slang/slang-ir-wgsl-legalize.cpp
+++ b/source/slang/slang-ir-wgsl-legalize.cpp
@@ -154,6 +154,13 @@ WGSLSystemValueInfo LegalizeWGSLEntryPointContext::getSystemValueInfo(
}
break;
+ case SystemValueSemanticName::GroupIndex:
+ {
+ result.wgslSystemValueName = toSlice("local_invocation_index");
+ result.permittedTypes.add(builder.getUIntType());
+ }
+ break;
+
default:
{
m_sink->diagnose(
diff --git a/tests/compute/texture-simpler.slang b/tests/compute/texture-simpler.slang
index 777f13ef6..19803798f 100644
--- a/tests/compute/texture-simpler.slang
+++ b/tests/compute/texture-simpler.slang
@@ -5,7 +5,7 @@
//TEST(smoke,compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type -render-feature hardware-device
//TEST(smoke,compute):COMPARE_COMPUTE_EX:-cuda -compute -shaderobj -output-using-type
//TEST(smoke,compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -output-using-type
-//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
+//TEST(smoke,compute):COMPARE_COMPUTE:-wgpu -slang -compute -shaderobj -output-using-type
//TEST_INPUT: Texture2D(size=4, content = one):name t2D
Texture2D<float> t2D;