mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-17 21:17:09 +00:00
Fix copy of loop variable in SPIRV by using reference
This commit is contained in:
@@ -330,7 +330,7 @@ void ThreadState::ProcessScopeChange(const rdcarray<Id> &oldLive, const rdcarray
|
||||
|
||||
const rdcarray<Id> &liveGlobals = debugger.GetLiveGlobals();
|
||||
|
||||
for(const Id id : oldLive)
|
||||
for(const Id &id : oldLive)
|
||||
{
|
||||
if(liveGlobals.contains(id))
|
||||
continue;
|
||||
@@ -338,7 +338,7 @@ void ThreadState::ProcessScopeChange(const rdcarray<Id> &oldLive, const rdcarray
|
||||
m_State->changes.push_back({debugger.GetPointerValue(ids[id])});
|
||||
}
|
||||
|
||||
for(const Id id : newLive)
|
||||
for(const Id &id : newLive)
|
||||
{
|
||||
if(liveGlobals.contains(id))
|
||||
continue;
|
||||
|
||||
@@ -2376,9 +2376,9 @@ void Debugger::RegisterOp(Iter it)
|
||||
{
|
||||
// don't automatically kill function parameters and variables. They will be manually killed when
|
||||
// returning from a function's scope
|
||||
for(const Id id : curFunction->parameters)
|
||||
for(const Id &id : curFunction->parameters)
|
||||
idDeathOffset[id] = ~0U;
|
||||
for(const Id id : curFunction->variables)
|
||||
for(const Id &id : curFunction->variables)
|
||||
idDeathOffset[id] = ~0U;
|
||||
|
||||
curFunction = NULL;
|
||||
|
||||
Reference in New Issue
Block a user