Comment about thread safety requirements in Spirv debugger ids container

This commit is contained in:
Jake Turner
2025-10-03 15:20:57 +01:00
parent d7f7be63a9
commit a0db9d5a1f
3 changed files with 3 additions and 0 deletions
@@ -209,6 +209,7 @@ private:
T dummy;
};
// This must be a thread safe container
template <typename T>
class DenseIdMap : public rdcarray<T>
{
@@ -329,6 +329,7 @@ void ThreadState::EnterFunction(const rdcarray<Id> &arguments)
SkipIgnoredInstructions();
}
// This must be thread safe : it is called from multiple threads
const ShaderVariable &ThreadState::GetSrc(Id id) const
{
return ids[id];
@@ -286,6 +286,7 @@ struct ThreadState
// thread-local private variables
rdcarray<ShaderVariable> privates;
// This must be a thread safe container
// every ID's variable, if a pointer it may be pointing at a ShaderVariable stored elsewhere
DenseIdMap<ShaderVariable> ids;