Respect the array type in Store operation

This commit is contained in:
Sebastian Tafuri 2017-11-27 16:27:09 +01:00
parent 792a94809b
commit 59677daef7

View File

@ -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);