mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 16:50:44 +00:00
Fix operation folding checking instruction, not argument
This commit is contained in:
@@ -967,9 +967,10 @@ struct SPVModule
|
||||
SPVInstruction *arg = instr->op->arguments[a];
|
||||
|
||||
// don't fold up too complex an operation
|
||||
if(instr->op)
|
||||
if(arg->op)
|
||||
{
|
||||
if(instr->op->complexity > 1 || instr->op->arguments.size() > 2)
|
||||
// allow access chains to have multiple arguments
|
||||
if(arg->op->complexity > 1 || (arg->op->arguments.size() > 2 && arg->opcode != spv::OpAccessChain))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user