From 21f869192c5f477db3b1bd455210718d976ab97b Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 3 Apr 2020 15:19:16 +0100 Subject: [PATCH] D3D12 created initial states don't need to be copied * This would require proper barriers and special handling for e.g. readback resources, and the only time we create initial states is when the resource was created mid-frame (since all pre-frame resources are dirty, so would have initial states prepared). That means it's zero initialised, so our zero- initialised created state is fine. --- renderdoc/driver/d3d12/d3d12_initstate.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_initstate.cpp b/renderdoc/driver/d3d12/d3d12_initstate.cpp index 8930de198..2cce4484a 100644 --- a/renderdoc/driver/d3d12/d3d12_initstate.cpp +++ b/renderdoc/driver/d3d12/d3d12_initstate.cpp @@ -830,12 +830,6 @@ void D3D12ResourceManager::Create_InitialState(ResourceId id, ID3D12DeviceChild } else { - ID3D12GraphicsCommandList *list = Unwrap(m_Device->GetInitialStateList()); - - copy->SetName(L"Create_InitialState blank"); - - list->CopyResource(Unwrap(copy), Unwrap(res)); - D3D12InitialContents initContents(D3D12InitialContents::ForceCopy, type); initContents.resourceType = Resource_Resource; initContents.resource = copy;