Remap addresses to live in indirect dispatch on replay

This commit is contained in:
baldurk
2024-06-18 16:46:12 +01:00
parent a8281e91da
commit f74a119e05
2 changed files with 7 additions and 1 deletions
@@ -1491,7 +1491,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DispatchRays(SerialiserType &se
m_Cmd->m_RayDispatches.push_back(patchedDispatch.resources);
uint32_t eventId = m_Cmd->HandlePreCallback(list, ActionFlags::DispatchRay);
// this can't work yet as the shader records have not been patched
Unwrap4(list)->DispatchRays(&patchedDispatch.desc);
if(eventId && m_Cmd->m_ActionCallback->PostDraw(eventId, list))
{
+7
View File
@@ -1043,6 +1043,13 @@ rdcpair<ID3D12Resource *, UINT64> D3D12DebugManager::PatchExecuteIndirect(
}
case D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_RAYS:
{
argOffsets.push_back(
offset + offsetof(D3D12_DISPATCH_RAYS_DESC, RayGenerationShaderRecord.StartAddress));
argOffsets.push_back(offset +
offsetof(D3D12_DISPATCH_RAYS_DESC, MissShaderTable.StartAddress));
argOffsets.push_back(offset + offsetof(D3D12_DISPATCH_RAYS_DESC, HitGroupTable.StartAddress));
argOffsets.push_back(offset +
offsetof(D3D12_DISPATCH_RAYS_DESC, CallableShaderTable.StartAddress));
offset += sizeof(D3D12_DISPATCH_RAYS_DESC);
break;
}