From 59677daef7c8bbfa9f3546facb5dcc64472d921f Mon Sep 17 00:00:00 2001 From: Sebastian Tafuri Date: Mon, 27 Nov 2017 16:27:09 +0100 Subject: [PATCH] Respect the array type in Store operation --- hlsl/hlslParseHelper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index ce9afc7a..144275b4 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -3274,6 +3274,9 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte : EOpIndexIndirect; TIntermTyped* lValue = intermediate.addIndex(idxOp, argArray, offsetIdx, loc); + const TType derefType(argArray->getType(), 0); + lValue->setType(derefType); + TIntermTyped* rValue = (size == 1) ? argValue : intermediate.addIndex(EOpIndexDirect, argValue, idxConst, loc);