mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 23:46:41 +00:00
Add variable debug variables when we have debug info
* We don't want to wait until the first store to do this, since the source variables are added at the appropriate scope - even before the first store.
This commit is contained in:
@@ -184,9 +184,14 @@ void ThreadState::EnterFunction(const rdcarray<Id> &arguments)
|
||||
|
||||
frame->locals.resize(numVars);
|
||||
|
||||
// don't add source vars for variables, we'll add it on the first store
|
||||
ShaderDebugState *state = m_State;
|
||||
m_State = NULL;
|
||||
|
||||
// don't add variables if we don't have debug info, we'll add it on the first store to reduce
|
||||
// noise on unoptimised shaders with lots of variables and no scope information. However if we
|
||||
// have debug info we'll add the variable immediately because the source variable will only be
|
||||
// added at the correct scope and we want to display that before it's stored to.
|
||||
if(!debugger.HasDebugInfo())
|
||||
m_State = NULL;
|
||||
|
||||
size_t i = 0;
|
||||
// handle any variable declarations
|
||||
|
||||
@@ -289,6 +289,7 @@ public:
|
||||
const DataType &GetTypeForId(Id ssaId);
|
||||
const Decorations &GetDecorations(Id typeId);
|
||||
bool IsDebugExtInstSet(Id id) const;
|
||||
bool HasDebugInfo() const { return m_DebugInfo.valid; }
|
||||
rdcstr GetRawName(Id id) const;
|
||||
rdcstr GetHumanName(Id id);
|
||||
void AddSourceVars(rdcarray<SourceVariableMapping> &sourceVars, const ShaderVariable &var, Id id);
|
||||
|
||||
Reference in New Issue
Block a user