Merge 1554e4ab6c
into 53b54406bd
This commit is contained in:
commit
89c9852081
|
@ -440,7 +440,6 @@ void CommandBufferManager::SubmitCommandBuffer(u32 command_buffer_index,
|
|||
nullptr};
|
||||
|
||||
m_last_present_result = vkQueuePresentKHR(g_vulkan_context->GetPresentQueue(), &present_info);
|
||||
m_last_present_done.Set();
|
||||
if (m_last_present_result != VK_SUCCESS)
|
||||
{
|
||||
// VK_ERROR_OUT_OF_DATE_KHR is not fatal, just means we need to recreate our swap chain.
|
||||
|
|
|
@ -4,20 +4,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <Common/WorkQueueThread.h>
|
||||
#include "Common/BlockingLoop.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "Common/Semaphore.h"
|
||||
|
||||
#include "VideoBackends/Vulkan/Constants.h"
|
||||
|
||||
|
@ -92,7 +84,6 @@ public:
|
|||
// Was the last present submitted to the queue a failure? If so, we must recreate our swapchain.
|
||||
bool CheckLastPresentFail() { return m_last_present_failed.TestAndClear(); }
|
||||
VkResult GetLastPresentResult() const { return m_last_present_result; }
|
||||
bool CheckLastPresentDone() { return m_last_present_done.TestAndClear(); }
|
||||
|
||||
// Schedule a vulkan resource for destruction later on. This will occur when the command buffer
|
||||
// is next re-used, and the GPU has finished working with the specified resource.
|
||||
|
@ -164,7 +155,6 @@ private:
|
|||
Common::WorkQueueThreadSP<PendingCommandBufferSubmit> m_submit_thread;
|
||||
VkSemaphore m_present_semaphore = VK_NULL_HANDLE;
|
||||
Common::Flag m_last_present_failed;
|
||||
Common::Flag m_last_present_done;
|
||||
VkResult m_last_present_result = VK_SUCCESS;
|
||||
bool m_use_threaded_submission = false;
|
||||
u32 m_descriptor_set_count = DESCRIPTOR_SETS_PER_POOL;
|
||||
|
|
|
@ -3,14 +3,9 @@
|
|||
|
||||
#include "VideoBackends/Vulkan/VKGfx.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/EnumUtils.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
@ -225,8 +220,7 @@ bool VKGfx::BindBackbuffer(const ClearColor& clear_color)
|
|||
{
|
||||
StateTracker::GetInstance()->EndRenderPass();
|
||||
|
||||
if (!g_command_buffer_mgr->CheckLastPresentDone())
|
||||
g_command_buffer_mgr->WaitForWorkerThreadIdle();
|
||||
g_command_buffer_mgr->WaitForWorkerThreadIdle();
|
||||
|
||||
// Handle host window resizes.
|
||||
CheckForSurfaceChange();
|
||||
|
|
Loading…
Reference in New Issue