From 2365a9caab4919bca4c7cb102e5869013fc0fe3f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 25 May 2022 23:50:59 +1000 Subject: [PATCH] D3D12/Texture: Fix incorrect resource state for fallback staging buffer --- common/D3D12/Texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/D3D12/Texture.cpp b/common/D3D12/Texture.cpp index 83d8bbf146..befb552c10 100644 --- a/common/D3D12/Texture.cpp +++ b/common/D3D12/Texture.cpp @@ -352,7 +352,7 @@ static ID3D12Resource* CreateStagingBuffer(u32 height, const void* data, u32 pit const D3D12_RESOURCE_DESC resource_desc = { D3D12_RESOURCE_DIMENSION_BUFFER, 0, upload_size, 1, 1, 1, DXGI_FORMAT_UNKNOWN, {1, 0}, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, D3D12_RESOURCE_FLAG_NONE}; - HRESULT hr = g_d3d12_context->GetAllocator()->CreateResource(&allocation_desc, &resource_desc, D3D12_RESOURCE_STATE_COPY_SOURCE, + HRESULT hr = g_d3d12_context->GetAllocator()->CreateResource(&allocation_desc, &resource_desc, D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, allocation.put(), IID_PPV_ARGS(resource.put())); if (FAILED(hr)) {