From e3148915982e41989da1c227c7d19b3d9e959b19 Mon Sep 17 00:00:00 2001 From: Gabriele Di Bari Date: Sat, 21 May 2022 17:00:24 +0200 Subject: [PATCH] handleEntryPointAttributes add EatInstance case --- glslang/HLSL/hlslParseHelper.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/glslang/HLSL/hlslParseHelper.cpp b/glslang/HLSL/hlslParseHelper.cpp index e9369a0f..ffa1d7a6 100644 --- a/glslang/HLSL/hlslParseHelper.cpp +++ b/glslang/HLSL/hlslParseHelper.cpp @@ -1754,6 +1754,18 @@ void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const T intermediate.setLocalSize(lid, sequence[lid]->getAsConstantUnion()->getConstArray()[0].getIConst()); break; } + case EatInstance: + { + int invocations; + + if (!it->getInt(invocations)) { + error(loc, "invalid instance", "", ""); + } else { + if (!intermediate.setInvocations(invocations)) + error(loc, "cannot change previously set instance attribute", "", ""); + } + break; + } case EatMaxVertexCount: { int maxVertexCount;