Fix use before build in demos project

This commit is contained in:
baldurk
2024-11-15 16:47:38 +00:00
parent c3287ee4fa
commit 322a0698f7
+4 -1
View File
@@ -261,7 +261,10 @@ void miss(inout RayPayload payload)
tables->GetGPUVirtualAddress() + D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 2;
rayDispatch.HitGroupTable.StrideInBytes = 0;
rayDispatch.HitGroupTable.SizeInBytes = D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES;
cmd4->DispatchRays(&rayDispatch);
// first frame the TLAS hasn't been built yet
if(curFrame > 1)
cmd4->DispatchRays(&rayDispatch);
ResourceBarrier(cmd);