mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-18 03:35:57 +00:00
Don't try to patch empty TLAS builds
This commit is contained in:
@@ -797,7 +797,8 @@ bool WrappedID3D12GraphicsCommandList::PatchAccStructBlasAddress(
|
||||
const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *accStructInput,
|
||||
ID3D12GraphicsCommandList4 *dxrCmd, BakedCmdListInfo::PatchRaytracing *patchRaytracing)
|
||||
{
|
||||
if(accStructInput->Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL)
|
||||
if(accStructInput->Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL &&
|
||||
accStructInput->Inputs.NumDescs > 0)
|
||||
{
|
||||
// Here, we are uploading the old BLAS addresses, and comparing the BLAS
|
||||
// addresses in the TLAS and patching it with the corresponding new address.
|
||||
@@ -981,7 +982,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BuildRaytracingAccelerationStru
|
||||
{
|
||||
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
|
||||
{
|
||||
if(AccStructDesc.Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL)
|
||||
if(AccStructDesc.Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL &&
|
||||
AccStructDesc.Inputs.NumDescs > 0)
|
||||
{
|
||||
patchInfo.m_patched = false;
|
||||
PatchAccStructBlasAddress(&AccStructDesc, dxrCmd, &patchInfo);
|
||||
@@ -1005,7 +1007,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BuildRaytracingAccelerationStru
|
||||
}
|
||||
else
|
||||
{
|
||||
if(AccStructDesc.Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL)
|
||||
if(AccStructDesc.Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL &&
|
||||
AccStructDesc.Inputs.NumDescs > 0)
|
||||
{
|
||||
uint64_t totalInstancesSize =
|
||||
(uint64_t)(AccStructDesc.Inputs.NumDescs * sizeof(D3D12_RAYTRACING_INSTANCE_DESC));
|
||||
|
||||
Reference in New Issue
Block a user