Use the correct state for creating whole memory buffers on D3D12

This commit is contained in:
baldurk
2025-09-30 11:25:43 +01:00
parent a92e0d2669
commit 2018b5d790
+2 -3
View File
@@ -183,9 +183,8 @@ WrappedID3D12Heap::WrappedID3D12Heap(ID3D12Heap *real, WrappedID3D12Device *devi
else if(desc.Properties.Type == D3D12_HEAP_TYPE_READBACK)
state = D3D12_RESOURCE_STATE_COPY_DEST;
HRESULT hr =
device->GetReal()->CreatePlacedResource(real, 0, &resDesc, D3D12_RESOURCE_STATE_COMMON, NULL,
__uuidof(ID3D12Resource), (void **)&m_WholeMem);
HRESULT hr = device->GetReal()->CreatePlacedResource(
real, 0, &resDesc, state, NULL, __uuidof(ID3D12Resource), (void **)&m_WholeMem);
RDCASSERT(SUCCEEDED(hr));
}