mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Handle encoding DXIL bytecode with multiple functions
* After each function we need to reset the IDs of any function-local constants since they may be referenced in other functions and need to be given new function-local IDs for reference.
This commit is contained in:
@@ -2687,6 +2687,16 @@ void LLVMOrderAccumulator::processFunction(const Function *f)
|
||||
|
||||
void LLVMOrderAccumulator::exitFunction()
|
||||
{
|
||||
// reset IDs for function constants, so that if they're used in a different function they get a new id
|
||||
for(size_t i = firstFuncConst; i < firstFuncConst + numFuncConsts; i++)
|
||||
{
|
||||
if(cast<Constant>(values[i]))
|
||||
{
|
||||
Value *value = (Value *)values[i];
|
||||
value->id = Value::UnvisitedID;
|
||||
}
|
||||
}
|
||||
|
||||
values.resize(functionWaterMark);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user