Skip to content

Commit 16ebf22

Browse files
committed
Fix #332 for matrices accessing columns via array-index-operator
1 parent 95c8004 commit 16ebf22

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/SHADERed/Objects/Debug/ExpressionCompiler.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -684,10 +684,7 @@ namespace ed {
684684
resType = m_module->type<spvgentwo::vector_t<float, 4>*>();
685685

686686
if (resType != nullptr) {
687-
spvgentwo::Instruction* tempVar = bb->opVariable(obj->getResultTypeInstr(), spvgentwo::spv::StorageClass::Function);
688-
bb->opStore(tempVar, obj);
689-
spvgentwo::Instruction* vecPtr = bb->opAccessChain(resType, tempVar, m_visit(a_access->Indices[0]));
690-
687+
spvgentwo::Instruction* vecPtr = bb->opAccessChain(resType, obj, m_visit(a_access->Indices[0]));
691688
return bb->opLoad(vecPtr);
692689
}
693690
} else if (obj->getType()->isArray() || obj->getType()->isStruct()) {

0 commit comments

Comments
 (0)