diff --git a/common/D3D12/Context.cpp b/common/D3D12/Context.cpp index 94a6d52d13..4545dd5baa 100644 --- a/common/D3D12/Context.cpp +++ b/common/D3D12/Context.cpp @@ -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(); } diff --git a/pcsx2/GS/Renderers/DX12/GSTexture12.cpp b/pcsx2/GS/Renderers/DX12/GSTexture12.cpp index d38ea35a6a..7346d9a38f 100644 --- a/pcsx2/GS/Renderers/DX12/GSTexture12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSTexture12.cpp @@ -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)) {