Skip to content

Commit

Permalink
Fix dfranx#332 for matrices accessing columns via array-index-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
swp-ariaci committed Jan 24, 2025
1 parent 95c8004 commit 0b14b3c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/SHADERed/Objects/Debug/ExpressionCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,7 @@ namespace ed {
resType = m_module->type<spvgentwo::vector_t<float, 4>*>();

if (resType != nullptr) {
spvgentwo::Instruction* tempVar = bb->opVariable(obj->getResultTypeInstr(), spvgentwo::spv::StorageClass::Function);
bb->opStore(tempVar, obj);
spvgentwo::Instruction* vecPtr = bb->opAccessChain(resType, tempVar, m_visit(a_access->Indices[0]));

spvgentwo::Instruction* vecPtr = bb->opAccessChain(resType, obj, m_visit(a_access->Indices[0]));
return bb->opLoad(vecPtr);
}
} else if (obj->getType()->isArray() || obj->getType()->isStruct()) {
Expand Down

0 comments on commit 0b14b3c

Please sign in to comment.