diff --git a/Libraries/D3D12RaytracingFallback/src/UberShaderRayTracingProgram.cpp b/Libraries/D3D12RaytracingFallback/src/UberShaderRayTracingProgram.cpp index 012990bc3..93cf24b6c 100644 --- a/Libraries/D3D12RaytracingFallback/src/UberShaderRayTracingProgram.cpp +++ b/Libraries/D3D12RaytracingFallback/src/UberShaderRayTracingProgram.cpp @@ -258,8 +258,11 @@ namespace FallbackLayer AccelerationStructuresEntries[entriesAdded++] = entry.second; } - pCommandList->SetComputeRoot32BitConstants( - m_patchRootSignatureParameterStart + AccelerationStructuresList, (UINT)(AccelerationStructuresEntries.size() * (SizeOfInUint32(*AccelerationStructuresEntries.data()))), AccelerationStructuresEntries.data(), 0); + if (!AccelerationStructuresEntries.empty()) + { + pCommandList->SetComputeRoot32BitConstants( + m_patchRootSignatureParameterStart + AccelerationStructuresList, (UINT)(AccelerationStructuresEntries.size() * (SizeOfInUint32(*AccelerationStructuresEntries.data()))), AccelerationStructuresEntries.data(), 0); + } #ifdef DEBUG m_pPredispatchCallback(pCommandList, m_patchRootSignatureParameterStart);