Ensure safe state is used for RT builds on compute command buffers

This commit is contained in:
baldurk
2025-02-11 14:06:01 +00:00
parent 0859fd0a95
commit 204f003f2b
@@ -792,6 +792,7 @@ bool WrappedID3D12GraphicsCommandList::PatchAccStructBlasAddress(
// Here, we are uploading the old BLAS addresses, and comparing the BLAS
// addresses in the TLAS and patching it with the corresponding new address.
BakedCmdListInfo &bakedCmdInfo = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID];
D3D12RTManager *rtManager = GetResourceManager()->GetRTManager();
// Create a resource for patched instance desc; we don't
@@ -825,6 +826,9 @@ bool WrappedID3D12GraphicsCommandList::PatchAccStructBlasAddress(
{
needInitialTransition = true;
}
if(bakedCmdInfo.type == D3D12_COMMAND_LIST_TYPE_COMPUTE)
instanceResState = D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
}
{