Fix a bug with variables in loop coming into existence multiple times

This commit is contained in:
baldurk
2022-07-22 16:10:59 +01:00
parent e6100167aa
commit aafd0ec788
@@ -345,6 +345,8 @@ void ThreadState::SetDst(Id id, const ShaderVariable &val)
if(m_State && ContainsNaNInf(val))
m_State->flags |= ShaderEvents::GeneratedNanOrInf;
ShaderVariable prev = ids[id];
ids[id] = val;
ids[id].name = GetRawName(id);
@@ -366,6 +368,7 @@ void ThreadState::SetDst(Id id, const ShaderVariable &val)
if(m_State)
{
ShaderVariableChange change;
change.before = prev;
change.after = debugger.GetPointerValue(ids[id]);
m_State->changes.push_back(change);