mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-15 06:20:41 +00:00
Add "DXC DXIL" disassembly target
Default to using DXBC/DXIL disassembly target which shows RD DXIL disassembly "DXC DXIL" disassembly target shows the DXC style DXIL disassembly which was the default in RenderDoc before the RD DXIL disassembly view existed
This commit is contained in:
@@ -339,7 +339,7 @@ rdcstr D3D11Replay::DisassembleShader(ResourceId pipeline, const ShaderReflectio
|
||||
DXBC::DXBCContainer *dxbc = it->second->GetDXBC();
|
||||
|
||||
if(target == DXBCDisassemblyTarget || target.empty())
|
||||
return dxbc->GetDisassembly(true);
|
||||
return dxbc->GetDisassembly(false);
|
||||
|
||||
return StringFormat::Fmt("; Invalid disassembly target %s", target.c_str());
|
||||
}
|
||||
|
||||
@@ -1466,7 +1466,7 @@ ShaderDebugTrace *D3D11Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui
|
||||
if(!dxbc)
|
||||
return new ShaderDebugTrace;
|
||||
|
||||
dxbc->GetDisassembly(true);
|
||||
dxbc->GetDisassembly(false);
|
||||
|
||||
D3D11RenderState *rs = m_pImmediateContext->GetCurrentPipelineState();
|
||||
|
||||
@@ -1857,7 +1857,7 @@ ShaderDebugTrace *D3D11Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
|
||||
if(!dxbc)
|
||||
return new ShaderDebugTrace;
|
||||
|
||||
dxbc->GetDisassembly(true);
|
||||
dxbc->GetDisassembly(false);
|
||||
|
||||
DXBC::DXBCContainer *prevdxbc = NULL;
|
||||
|
||||
@@ -2599,7 +2599,7 @@ ShaderDebugTrace *D3D11Replay::DebugThread(uint32_t eventId,
|
||||
if(!dxbc)
|
||||
return new ShaderDebugTrace;
|
||||
|
||||
dxbc->GetDisassembly(true);
|
||||
dxbc->GetDisassembly(false);
|
||||
|
||||
D3D11RenderState *rs = m_pImmediateContext->GetCurrentPipelineState();
|
||||
|
||||
|
||||
@@ -972,7 +972,7 @@ void D3D12Replay::PatchQuadWritePS(D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC &pi
|
||||
if(!D3D12_Debug_OverlayDumpDirPath().empty())
|
||||
FileIO::WriteAll(D3D12_Debug_OverlayDumpDirPath() + "/after_quadps.dxbc", patchedPs);
|
||||
|
||||
DXBC::DXBCContainer(patchedPs, rdcstr(), GraphicsAPI::D3D12, ~0U, ~0U).GetDisassembly(true);
|
||||
DXBC::DXBCContainer(patchedPs, rdcstr(), GraphicsAPI::D3D12, ~0U, ~0U).GetDisassembly(false);
|
||||
|
||||
pipeDesc.PS.pShaderBytecode = patchedPs.data();
|
||||
pipeDesc.PS.BytecodeLength = patchedPs.size();
|
||||
|
||||
@@ -56,6 +56,7 @@ static const char *LiveDriverDisassemblyTarget = "Live driver disassembly";
|
||||
ID3DDevice *GetD3D12DeviceIfAlloc(IUnknown *dev);
|
||||
|
||||
static const char *DXBCDXILDisassemblyTarget = "DXBC/DXIL";
|
||||
static const char *DXCDXILDisassemblyTarget = "DXC DXIL";
|
||||
|
||||
D3D12Replay::D3D12Replay(WrappedID3D12Device *d)
|
||||
{
|
||||
@@ -539,6 +540,8 @@ rdcarray<rdcstr> D3D12Replay::GetDisassemblyTargets(bool withPipeline)
|
||||
|
||||
// DXBC/DXIL is always first
|
||||
ret.push_back(DXBCDXILDisassemblyTarget);
|
||||
// DXC DXIL
|
||||
ret.push_back(DXCDXILDisassemblyTarget);
|
||||
|
||||
if(!m_ISAChecked && m_TexRender.BlendPipe)
|
||||
{
|
||||
@@ -581,6 +584,9 @@ rdcstr D3D12Replay::DisassembleShader(ResourceId pipeline, const ShaderReflectio
|
||||
DXBC::DXBCContainer *dxbc = sh->GetDXBC();
|
||||
|
||||
if(target == DXBCDXILDisassemblyTarget || target.empty())
|
||||
return dxbc->GetDisassembly(false);
|
||||
|
||||
if(target == DXCDXILDisassemblyTarget)
|
||||
return dxbc->GetDisassembly(true);
|
||||
|
||||
if(target == LiveDriverDisassemblyTarget)
|
||||
|
||||
@@ -1519,7 +1519,7 @@ ShaderDebugTrace *D3D12Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui
|
||||
return new ShaderDebugTrace;
|
||||
}
|
||||
|
||||
dxbc->GetDisassembly(true);
|
||||
dxbc->GetDisassembly(false);
|
||||
|
||||
const ActionDescription *action = m_pDevice->GetAction(eventId);
|
||||
|
||||
@@ -1901,7 +1901,7 @@ ShaderDebugTrace *D3D12Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
|
||||
return new ShaderDebugTrace;
|
||||
}
|
||||
|
||||
dxbc->GetDisassembly(true);
|
||||
dxbc->GetDisassembly(false);
|
||||
|
||||
// Fetch the previous stage's disassembly, to match outputs to PS inputs
|
||||
DXBCContainer *prevDxbc = NULL;
|
||||
@@ -2725,7 +2725,7 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId,
|
||||
return new ShaderDebugTrace;
|
||||
}
|
||||
|
||||
dxbc->GetDisassembly(true);
|
||||
dxbc->GetDisassembly(false);
|
||||
|
||||
InterpretDebugger *interpreter = new InterpretDebugger;
|
||||
interpreter->eventId = eventId;
|
||||
|
||||
Reference in New Issue
Block a user