diff --git a/renderdoc/driver/d3d12/d3d12_initstate.cpp b/renderdoc/driver/d3d12/d3d12_initstate.cpp index d1e02625c..f94e212db 100644 --- a/renderdoc/driver/d3d12/d3d12_initstate.cpp +++ b/renderdoc/driver/d3d12/d3d12_initstate.cpp @@ -157,6 +157,14 @@ bool D3D12ResourceManager::Prepare_InitialState(ID3D12DeviceChild *res) m_Device->Evict(1, &pageable); } + else + { +#if ENABLED(SINGLE_FLUSH_VALIDATE) + m_Device->CloseInitialStateList(); + m_Device->ExecuteLists(NULL, true); + m_Device->FlushLists(true); +#endif + } SetInitialContents(GetResID(r), D3D12InitialContents(copyDst)); return true; @@ -344,6 +352,14 @@ bool D3D12ResourceManager::Prepare_InitialState(ID3D12DeviceChild *res) if(nonresident) m_Device->Evict(1, &pageable); } + else + { +#if ENABLED(SINGLE_FLUSH_VALIDATE) + m_Device->CloseInitialStateList(); + m_Device->ExecuteLists(NULL, true); + m_Device->FlushLists(true); +#endif + } SAFE_RELEASE(arrayTexture); SAFE_DELETE_ARRAY(layouts);