Skip to content

Commit 204f003

Browse files
committed
Ensure safe state is used for RT builds on compute command buffers
1 parent 0859fd0 commit 204f003

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ bool WrappedID3D12GraphicsCommandList::PatchAccStructBlasAddress(
792792
// Here, we are uploading the old BLAS addresses, and comparing the BLAS
793793
// addresses in the TLAS and patching it with the corresponding new address.
794794

795+
BakedCmdListInfo &bakedCmdInfo = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID];
795796
D3D12RTManager *rtManager = GetResourceManager()->GetRTManager();
796797

797798
// Create a resource for patched instance desc; we don't
@@ -825,6 +826,9 @@ bool WrappedID3D12GraphicsCommandList::PatchAccStructBlasAddress(
825826
{
826827
needInitialTransition = true;
827828
}
829+
830+
if(bakedCmdInfo.type == D3D12_COMMAND_LIST_TYPE_COMPUTE)
831+
instanceResState = D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
828832
}
829833

830834
{

0 commit comments

Comments
 (0)