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

This commit is contained in:
Connor McLaughlin 2022-05-25 23:50:59 +10:00 committed by lightningterror
parent 425b5d0478
commit 2365a9caab
1 changed files with 1 additions and 1 deletions

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))
{