summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/Renderer.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-03-17 15:59:22 +1000
committerStenzek <stenzek@gmail.com>2019-03-29 20:54:44 +1000
commit427dd45151eddc920d681c4711a3cdbd7e363f82 (patch)
tree66c6f384a0f5a03f9e0cd2472e393b7281ae8ce7 /Source/Core/VideoBackends/Vulkan/Renderer.cpp
parentf3fadd730218429a5f6472283d16d30d7e276f8d (diff)
Vulkan: Simplify command buffer fence tracking
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/Renderer.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/Renderer.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
index 8b560be15d..a4db679ecb 100644
--- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp
+++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
@@ -315,7 +315,7 @@ void Renderer::PresentBackbuffer()
// Because this final command buffer is rendering to the swap chain, we need to wait for
// the available semaphore to be signaled before executing the buffer. This final submission
// can happen off-thread in the background while we're preparing the next frame.
- g_command_buffer_mgr->SubmitCommandBuffer(true, m_swap_chain->GetSwapChain(),
+ g_command_buffer_mgr->SubmitCommandBuffer(true, false, m_swap_chain->GetSwapChain(),
m_swap_chain->GetCurrentImageIndex());
// New cmdbuffer, so invalidate state.
@@ -327,11 +327,7 @@ void Renderer::ExecuteCommandBuffer(bool submit_off_thread, bool wait_for_comple
StateTracker::GetInstance()->EndRenderPass();
PerfQuery::GetInstance()->FlushQueries();
- // If we're waiting for completion, don't bother waking the worker thread.
- const VkFence pending_fence = g_command_buffer_mgr->GetCurrentCommandBufferFence();
- g_command_buffer_mgr->SubmitCommandBuffer(submit_off_thread && wait_for_completion);
- if (wait_for_completion)
- g_command_buffer_mgr->WaitForFence(pending_fence);
+ g_command_buffer_mgr->SubmitCommandBuffer(submit_off_thread, wait_for_completion);
StateTracker::GetInstance()->InvalidateCachedState();
}
@@ -550,10 +546,6 @@ void Renderer::UnbindTexture(const AbstractTexture* texture)
void Renderer::ResetSamplerStates()
{
- // Ensure none of the sampler objects are in use.
- // This assumes that none of the samplers are in use on the command list currently being recorded.
- g_command_buffer_mgr->WaitForGPUIdle();
-
// Invalidate all sampler states, next draw will re-initialize them.
for (u32 i = 0; i < m_sampler_states.size(); i++)
{