When setting up printf location only patch it into entry point function

This commit is contained in:
baldurk
2021-05-28 11:57:46 +01:00
parent 4d189b7f90
commit 778d91e42c
@@ -798,10 +798,13 @@ void AnnotateShader(const ShaderReflection &refl, const SPIRVPatchData &patchDat
while(it.opcode() == rdcspv::Op::Variable)
++it;
for(const rdcspv::Operation &op : locationGather)
if(funcId == entryID)
{
editor.AddOperation(it, op);
++it;
for(const rdcspv::Operation &op : locationGather)
{
editor.AddOperation(it, op);
++it;
}
}
// now patch accesses in the function body