GS/DX12: Use correct state for texture staging buffers

This commit is contained in:
Connor McLaughlin 2022-05-28 22:16:29 +10:00 committed by refractionpcsx2
parent 52a3777aae
commit eeb09c54d8
2 changed files with 3 additions and 3 deletions

View File

@ -498,7 +498,7 @@ void Context::ExecuteCommandList(bool wait_for_completion)
}
// Update fence when GPU has completed.
hr = m_command_queue->Signal(m_fence.get(), m_current_fence_value);
hr = m_command_queue->Signal(m_fence.get(), res.ready_fence_value);
pxAssertRel(SUCCEEDED(hr), "Signal fence");
MoveToNextCommandList();
@ -555,9 +555,9 @@ void Context::DestroyPendingResources(CommandListResources& cmdlist)
for (const auto& it : cmdlist.pending_resources)
{
it.second->Release();
if (it.first)
it.first->Release();
it.second->Release();
}
cmdlist.pending_resources.clear();
}

View File

@ -128,7 +128,7 @@ ID3D12Resource* GSTexture12::AllocateUploadStagingBuffer(const void* data, u32 p
const D3D12_RESOURCE_DESC resource_desc = {
D3D12_RESOURCE_DIMENSION_BUFFER, 0, buffer_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))
{