D3D12 Pixel History support for direct DispatchMesh draws

D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_MESH is not supported
This commit is contained in:
Jake Turner
2024-02-14 07:50:20 +00:00
parent 893142d7f0
commit 045a71082b
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -4844,7 +4844,10 @@ void WrappedID3D12Device::ReplayDraw(ID3D12GraphicsCommandListX *cmd, const Acti
{
if(action.drawIndex == 0)
{
if(action.flags & ActionFlags::Indexed)
if(action.flags & ActionFlags::MeshDispatch)
cmd->DispatchMesh(action.dispatchDimension[0], action.dispatchDimension[1],
action.dispatchDimension[2]);
else if(action.flags & ActionFlags::Indexed)
cmd->DrawIndexedInstanced(action.numIndices, action.numInstances, action.indexOffset,
action.baseVertex, action.instanceOffset);
else
@@ -2262,7 +2262,11 @@ struct D3D12PixelHistoryPerFragmentCallback : D3D12PixelHistoryCallback
pipeDesc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ZERO;
}
if(pipeDesc.GS.pShaderBytecode != NULL || pipeDesc.GS.BytecodeLength > 0)
if(pipeDesc.MS.pShaderBytecode != NULL || pipeDesc.MS.BytecodeLength > 0)
{
RDCWARN("Can't get primitive ID at event %u due to mesh shader usage", eid);
}
else if(pipeDesc.GS.pShaderBytecode != NULL || pipeDesc.GS.BytecodeLength > 0)
{
RDCWARN("Can't get primitive ID at event %u due to geometry shader usage", eid);
}