Remove hasSourceMapping from ShaderDebugTrace

* We expect to always have source mapping, from reflection data if nothing else.
This commit is contained in:
baldurk
2020-02-20 19:07:29 +00:00
parent 08e9d9b594
commit de7f9d8e1c
5 changed files with 13 additions and 34 deletions
+12 -22
View File
@@ -516,28 +516,19 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
ui->docking->setToolWindowProperties(
ui->constants, ToolWindowManager::HideCloseButton | ToolWindowManager::DisallowFloatWindow);
if(m_Trace->hasSourceMapping)
{
ui->callstack->setWindowTitle(tr("Callstack"));
ui->docking->addToolWindow(
ui->callstack, ToolWindowManager::AreaReference(
ToolWindowManager::RightOf, ui->docking->areaOf(ui->debugVars), 0.2f));
ui->docking->setToolWindowProperties(
ui->callstack, ToolWindowManager::HideCloseButton | ToolWindowManager::DisallowFloatWindow);
ui->callstack->setWindowTitle(tr("Callstack"));
ui->docking->addToolWindow(
ui->callstack, ToolWindowManager::AreaReference(ToolWindowManager::RightOf,
ui->docking->areaOf(ui->debugVars), 0.2f));
ui->docking->setToolWindowProperties(
ui->callstack, ToolWindowManager::HideCloseButton | ToolWindowManager::DisallowFloatWindow);
ui->sourceVars->setWindowTitle(tr("High-level Variables"));
ui->docking->addToolWindow(
ui->sourceVars, ToolWindowManager::AreaReference(ToolWindowManager::AddTo,
ui->docking->areaOf(ui->debugVars)));
ui->docking->setToolWindowProperties(
ui->sourceVars,
ToolWindowManager::HideCloseButton | ToolWindowManager::DisallowFloatWindow);
}
else
{
ui->callstack->hide();
ui->sourceVars->hide();
}
ui->sourceVars->setWindowTitle(tr("High-level Variables"));
ui->docking->addToolWindow(
ui->sourceVars, ToolWindowManager::AreaReference(ToolWindowManager::AddTo,
ui->docking->areaOf(ui->debugVars)));
ui->docking->setToolWindowProperties(
ui->sourceVars, ToolWindowManager::HideCloseButton | ToolWindowManager::DisallowFloatWindow);
m_Line2Insts.resize(m_ShaderDetails->debugInfo.files.count());
@@ -2367,7 +2358,6 @@ void ShaderViewer::updateDebugState()
}
}
if(m_Trace->hasSourceMapping)
{
RDTreeViewExpansionState expansion;
ui->sourceVars->saveExpansion(expansion, 0);
-3
View File
@@ -678,9 +678,6 @@ If this is ``None`` then the trace is invalid.
)");
ShaderDebugger *debugger = NULL;
DOCUMENT("A flag indicating whether this trace has source-variable mapping information");
bool hasSourceMapping = false;
DOCUMENT(R"(A ``list`` of :class:`LineColumnInfo` detailing which source lines each instruction
corresponds to
)");
@@ -2115,7 +2115,6 @@ ShaderDebugTrace *D3D11Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui
ret->constantBlocks = global.constantBlocks;
ret->inputs = state.inputs;
ret->hasSourceMapping = dxbc->GetDebugInfo() && dxbc->GetDebugInfo()->HasSourceMapping();
delete[] instData;
@@ -2867,7 +2866,6 @@ void ExtractInputsPS(PSInput IN, float4 debug_pixelPos : SV_Position,
ret->inputs = state.inputs;
ret->constantBlocks = global.constantBlocks;
ret->hasSourceMapping = dxbc->GetDebugInfo() && dxbc->GetDebugInfo()->HasSourceMapping();
SAFE_DELETE_ARRAY(initialData);
SAFE_DELETE_ARRAY(evalData);
@@ -2924,7 +2922,6 @@ ShaderDebugTrace *D3D11Replay::DebugThread(uint32_t eventId, const uint32_t grou
}
ret->constantBlocks = global.constantBlocks;
ret->hasSourceMapping = dxbc->GetDebugInfo() && dxbc->GetDebugInfo()->HasSourceMapping();
dxbc->FillTraceLineInfo(*ret);
@@ -1684,8 +1684,6 @@ void ExtractInputsPS(PSInput IN, float4 debug_pixelPos : SV_Position,
ret->constantBlocks = global.constantBlocks;
ret->inputs = state.inputs;
ret->hasSourceMapping = dxbc->GetDebugInfo() && dxbc->GetDebugInfo()->HasSourceMapping();
dxbc->FillTraceLineInfo(*ret);
return ret;
@@ -1744,8 +1742,6 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId, const uint32_t grou
ret->constantBlocks = global.constantBlocks;
ret->hasSourceMapping = dxbc->GetDebugInfo() && dxbc->GetDebugInfo()->HasSourceMapping();
dxbc->FillTraceLineInfo(*ret);
// add fake inputs for semantics
+1 -2
View File
@@ -407,7 +407,6 @@ void DoSerialise(SerialiserType &ser, ShaderDebugTrace &el)
SERIALISE_MEMBER(readWriteResources);
SERIALISE_MEMBER(sourceVars);
SERIALISE_MEMBER(lineInfo);
SERIALISE_MEMBER(hasSourceMapping);
// serialise the debugger pointer entirely opaquely, this is only used for replay proxying
uint64_t debugger = 0;
@@ -417,7 +416,7 @@ void DoSerialise(SerialiserType &ser, ShaderDebugTrace &el)
if(ser.IsReading())
el.debugger = (ShaderDebugger *)debugger;
SIZE_CHECK(160);
SIZE_CHECK(152);
}
template <typename SerialiserType>