Skip to content

Commit

Permalink
Add occlusion and color/stencil callbacks for D3D12 pixel history
Browse files Browse the repository at this point in the history
  • Loading branch information
skarolewics committed Oct 28, 2023
1 parent aec25cf commit 41a8d5e
Show file tree
Hide file tree
Showing 3 changed files with 588 additions and 0 deletions.
18 changes: 18 additions & 0 deletions renderdoc/driver/d3d12/d3d12_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4823,3 +4823,21 @@ void WrappedID3D12Device::ReplayLog(uint32_t startEventID, uint32_t endEventID,
ExecuteLists();
}
}

void WrappedID3D12Device::ReplayDraw(ID3D12GraphicsCommandListX *cmd, const ActionDescription &action)
{
if(action.drawIndex == 0)
{
if(action.flags & ActionFlags::Indexed)
cmd->DrawIndexedInstanced(action.numIndices, action.numInstances, action.indexOffset,
action.baseVertex, action.instanceOffset);
else
cmd->DrawInstanced(action.numIndices, action.numInstances, action.vertexOffset,
action.instanceOffset);
}
else
{
// TODO: Support replay of single indirect draws
RDCERR("Indirect draws are NYI with ReplayDraw");
}
}
1 change: 1 addition & 0 deletions renderdoc/driver/d3d12/d3d12_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ class WrappedID3D12Device : public IFrameCapturer, public ID3DDevice, public ID3

RDResult ReadLogInitialisation(RDCFile *rdc, bool storeStructuredBuffers);
void ReplayLog(uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
void ReplayDraw(ID3D12GraphicsCommandListX *cmd, const ActionDescription &action);

void SetStructuredExport(uint64_t sectionVersion)
{
Expand Down
Loading

0 comments on commit 41a8d5e

Please sign in to comment.