mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-20 04:35:58 +00:00
Don't patch hitgroup/callable tables if not present
* The runtime seems to complain about an invalid address if it's at the end of a buffer even if the size is 0 bytes
This commit is contained in:
@@ -925,9 +925,9 @@ PatchedRayDispatch D3D12RaytracingResourceAndUtilHandler::PatchRayDispatch(
|
||||
|
||||
unwrappedCmd->CopyBufferRegion(scratchBuffer->Resource(), scratchBuffer->Offset() + hitOffs,
|
||||
res, offs, desc.HitGroupTable.SizeInBytes);
|
||||
}
|
||||
|
||||
ret.desc.HitGroupTable.StartAddress = scratchBuffer->Address() + hitOffs;
|
||||
ret.desc.HitGroupTable.StartAddress = scratchBuffer->Address() + hitOffs;
|
||||
}
|
||||
|
||||
if(desc.CallableShaderTable.SizeInBytes > 0)
|
||||
{
|
||||
@@ -946,9 +946,9 @@ PatchedRayDispatch D3D12RaytracingResourceAndUtilHandler::PatchRayDispatch(
|
||||
|
||||
unwrappedCmd->CopyBufferRegion(scratchBuffer->Resource(), scratchBuffer->Offset() + callOffs,
|
||||
res, offs, desc.CallableShaderTable.SizeInBytes);
|
||||
}
|
||||
|
||||
ret.desc.CallableShaderTable.StartAddress = scratchBuffer->Address() + callOffs;
|
||||
ret.desc.CallableShaderTable.StartAddress = scratchBuffer->Address() + callOffs;
|
||||
}
|
||||
|
||||
barrier.Transition.pResource = scratchBuffer->Resource();
|
||||
barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
|
||||
|
||||
Reference in New Issue
Block a user