summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/ir-glsl-legalize.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/ir-glsl-legalize.cpp b/source/slang/ir-glsl-legalize.cpp
index aa6eb187f..6dcfdefd6 100644
--- a/source/slang/ir-glsl-legalize.cpp
+++ b/source/slang/ir-glsl-legalize.cpp
@@ -353,6 +353,9 @@ GLSLSystemValueInfo* getGLSLSystemValueInfo(
else if(semanticName == "sv_primitiveid")
{
name = "gl_PrimitiveID";
+
+ auto builder = context->getBuilder();
+ requiredType = builder->getBasicType(BaseType::Int);
}
else if (semanticName == "sv_rendertargetarrayindex")
{