Skip to content

Commit

Permalink
D3D12 pixel history WIP
Browse files Browse the repository at this point in the history
Test written with visual parity to Vulkan version, and tests as added
are passing with both DXBC and DXIL. MSAA pixel history works with
basic tests.
  • Loading branch information
skarolewics committed Oct 28, 2023
1 parent aec25cf commit 439b739
Show file tree
Hide file tree
Showing 10 changed files with 2,992 additions and 102 deletions.
17 changes: 17 additions & 0 deletions renderdoc/driver/d3d12/d3d12_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4823,3 +4823,20 @@ 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
{
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 439b739

Please sign in to comment.