mirror of https://github.com/RPCS3/rpcs3.git
vk: Check frame descriptors before rendering in case of a flip request between begin() and end()
- There is no reason to delay async flip requests since most of the work can be handled during rendering anyway
This commit is contained in:
parent
1464069476
commit
69c090b14a
|
@ -925,30 +925,6 @@ void VKGSRender::begin()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
init_buffers(rsx::framebuffer_creation_context::context_draw);
|
init_buffers(rsx::framebuffer_creation_context::context_draw);
|
||||||
|
|
||||||
if (!framebuffer_status_valid)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (m_current_frame->flags & frame_context_state::dirty)
|
|
||||||
{
|
|
||||||
check_present_status();
|
|
||||||
|
|
||||||
if (m_current_frame->swap_command_buffer)
|
|
||||||
{
|
|
||||||
// Borrow time by using the auxilliary context
|
|
||||||
m_aux_frame_context.grab_resources(*m_current_frame);
|
|
||||||
m_current_frame = &m_aux_frame_context;
|
|
||||||
}
|
|
||||||
else if (m_current_frame->used_descriptors)
|
|
||||||
{
|
|
||||||
m_current_frame->descriptor_pool.reset(0);
|
|
||||||
m_current_frame->used_descriptors = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
verify(HERE), !m_current_frame->swap_command_buffer;
|
|
||||||
|
|
||||||
m_current_frame->flags &= ~frame_context_state::dirty;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VKGSRender::update_draw_state()
|
void VKGSRender::update_draw_state()
|
||||||
|
@ -1206,6 +1182,28 @@ void VKGSRender::end()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for frame resource status here because it is possible for an async flip to happen between begin/end
|
||||||
|
if (UNLIKELY(m_current_frame->flags & frame_context_state::dirty))
|
||||||
|
{
|
||||||
|
check_present_status();
|
||||||
|
|
||||||
|
if (UNLIKELY(m_current_frame->swap_command_buffer))
|
||||||
|
{
|
||||||
|
// Borrow time by using the auxilliary context
|
||||||
|
m_aux_frame_context.grab_resources(*m_current_frame);
|
||||||
|
m_current_frame = &m_aux_frame_context;
|
||||||
|
}
|
||||||
|
else if (m_current_frame->used_descriptors)
|
||||||
|
{
|
||||||
|
m_current_frame->descriptor_pool.reset(0);
|
||||||
|
m_current_frame->used_descriptors = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
verify(HERE), !m_current_frame->swap_command_buffer;
|
||||||
|
|
||||||
|
m_current_frame->flags &= ~frame_context_state::dirty;
|
||||||
|
}
|
||||||
|
|
||||||
m_profiler.start();
|
m_profiler.start();
|
||||||
|
|
||||||
// Check for data casts
|
// Check for data casts
|
||||||
|
|
Loading…
Reference in New Issue