mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Use chunk offset not relative EID for AS patchbuffer lookup
* EIDs can change after initial recording of a command buffer, due to resizing indirect executes, causing loading and active replaying to disagree on the relative EID of a build. Chunk offsets are always fixed and we only need a unique incrementing counter.
This commit is contained in:
@@ -1006,17 +1006,18 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BuildRaytracingAccelerationStru
|
||||
m_Cmd->m_LastCmdListID = GetResID(pCommandList);
|
||||
BakedCmdListInfo &bakedCmdInfo = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID];
|
||||
BakedCmdListInfo::PatchRaytracing &patchInfo =
|
||||
bakedCmdInfo.m_patchRaytracingInfo[bakedCmdInfo.curEventID];
|
||||
bakedCmdInfo.m_patchRaytracingInfo[m_Cmd->m_CurChunkOffset & 0xffffffff];
|
||||
|
||||
D3D12AccelerationStructure *accStructAtDstOffset = NULL;
|
||||
|
||||
if(D3D12_Debug_RT_Auditing())
|
||||
{
|
||||
RDCLOG("Recording %s dynamic build to %llx on %s",
|
||||
RDCLOG("Recording %s dynamic build to %llx on %s at EID %u offset %u",
|
||||
AccStructDesc.Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL
|
||||
? "tlas"
|
||||
: "blas",
|
||||
AccStructDesc.DestAccelerationStructureData, ToStr(m_Cmd->m_LastCmdListID).c_str());
|
||||
AccStructDesc.DestAccelerationStructureData, ToStr(m_Cmd->m_LastCmdListID).c_str(),
|
||||
bakedCmdInfo.curEventID, m_Cmd->m_CurChunkOffset & 0xffffffff);
|
||||
|
||||
ResourceId destASBId;
|
||||
D3D12BufferOffset destASBOffset;
|
||||
|
||||
Reference in New Issue
Block a user