mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-23 06:40:49 +00:00
vk: Minor frame management improvements
This commit is contained in:
parent
27af05da1a
commit
a36d3af3b4
@ -2325,7 +2325,9 @@ void VKGSRender::queue_swap_request()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
close_and_submit_command_buffer({ m_current_frame->present_semaphore }, m_current_command_buffer->submit_fence);
|
close_and_submit_command_buffer({ m_current_frame->present_semaphore },
|
||||||
|
m_current_command_buffer->submit_fence,
|
||||||
|
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_current_frame->swap_command_buffer->pending = true;
|
m_current_frame->swap_command_buffer->pending = true;
|
||||||
@ -3092,9 +3094,6 @@ void VKGSRender::reinitialize_swapchain()
|
|||||||
present(&ctx);
|
present(&ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Wait for completion
|
|
||||||
vkDeviceWaitIdle(*m_device);
|
|
||||||
|
|
||||||
//Remove any old refs to the old images as they are about to be destroyed
|
//Remove any old refs to the old images as they are about to be destroyed
|
||||||
m_framebuffers_to_clean.clear();
|
m_framebuffers_to_clean.clear();
|
||||||
|
|
||||||
@ -3183,8 +3182,8 @@ void VKGSRender::flip(int buffer)
|
|||||||
{
|
{
|
||||||
if (m_draw_calls > 0)
|
if (m_draw_calls > 0)
|
||||||
{
|
{
|
||||||
//Unreachable
|
// This can be 'legal' if the window was being resized and no polling happened because of renderer_unavailable flag
|
||||||
fmt::throw_exception("Possible data corruption on frame context storage detected");
|
LOG_ERROR(RSX, "Possible data corruption on frame context storage detected");
|
||||||
}
|
}
|
||||||
|
|
||||||
//There were no draws and back-to-back flips happened
|
//There were no draws and back-to-back flips happened
|
||||||
@ -3240,6 +3239,7 @@ void VKGSRender::flip(int buffer)
|
|||||||
|
|
||||||
//Prepare surface for new frame. Set no timeout here so that we wait for the next image if need be
|
//Prepare surface for new frame. Set no timeout here so that we wait for the next image if need be
|
||||||
verify(HERE), m_current_frame->present_image == UINT32_MAX;
|
verify(HERE), m_current_frame->present_image == UINT32_MAX;
|
||||||
|
verify(HERE), m_current_frame->swap_command_buffer == nullptr;
|
||||||
|
|
||||||
u64 timeout = m_swapchain->get_swap_image_count() <= VK_MAX_ASYNC_FRAMES? 0ull: 100000000ull;
|
u64 timeout = m_swapchain->get_swap_image_count() <= VK_MAX_ASYNC_FRAMES? 0ull: 100000000ull;
|
||||||
while (VkResult status = m_swapchain->acquire_next_swapchain_image(m_current_frame->present_semaphore, timeout, &m_current_frame->present_image))
|
while (VkResult status = m_swapchain->acquire_next_swapchain_image(m_current_frame->present_semaphore, timeout, &m_current_frame->present_image))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user