mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
GS/DX12: Don't move to next command list until after wait
This commit is contained in:
committed by
lightningterror
parent
3a57bb46ab
commit
1fdc000815
@@ -343,12 +343,14 @@ bool GSDevice12::CreateCommandLists()
|
||||
|
||||
void GSDevice12::MoveToNextCommandList()
|
||||
{
|
||||
m_current_command_list = (m_current_command_list + 1) % NUM_COMMAND_LISTS;
|
||||
m_current_fence_value++;
|
||||
const int next_command_list = (m_current_command_list + 1) % NUM_COMMAND_LISTS;
|
||||
|
||||
// We may have to wait if this command list hasn't finished on the GPU.
|
||||
CommandListResources& res = m_command_lists[m_current_command_list];
|
||||
CommandListResources& res = m_command_lists[next_command_list];
|
||||
WaitForFence(res.ready_fence_value, false);
|
||||
|
||||
m_current_command_list = next_command_list;
|
||||
m_current_fence_value++;
|
||||
res.ready_fence_value = m_current_fence_value;
|
||||
res.init_command_list_used = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user