Add an error if an unknown global is processed

This commit is contained in:
baldurk
2020-02-24 16:51:53 +00:00
parent d034c91686
commit 4673f29da1
@@ -245,7 +245,8 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *apiWrapper, const Shader
}
// pick up uniform globals, which could be cbuffers
if(v.storage == StorageClass::Uniform && (decorations[v.id].flags & Decorations::BufferBlock) == 0)
else if(v.storage == StorageClass::Uniform &&
(decorations[v.id].flags & Decorations::BufferBlock) == 0)
{
ShaderVariable var;
var.name = GetRawName(v.id);
@@ -284,6 +285,14 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *apiWrapper, const Shader
globalSourceVars.push_back(sourceVar);
}
else
{
RDCERR("Unhandled type of uniform: %u", innertype.type);
}
}
else
{
RDCERR("Unhandled type of global variable: %s", ToStr(v.storage).c_str());
}
}