D3D12/Texture: Fix incorrect resource state for fallback staging buffer

This commit is contained in:
Connor McLaughlin authored and lightningterror committed 2022-05-26 00:04:46 +02:00
1 parent 425b5d0478
commit 2365a9caab
1 file changed
+1 -1
+1 -1
View File
@@ -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))
{