summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-11-30 22:34:36 +1000
committerStenzek <stenzek@gmail.com>2016-11-30 23:14:36 +1000
commit6a4eba1153b7fc858aca895f17b57dc03f089860 (patch)
treed425d55180cc410e9c7ca157f4786f2a76a5b741 /Source/Core/VideoBackends/Vulkan/StateTracker.cpp
parent3adeacb78d6c313020ea6f2562f76856f9431ec1 (diff)
Vulkan: Replace explicit command buffer submits with wrapper function
Should we ever introduce anything else that has to be done when a command buffer is executed (e.g. invalidating constants from previous commit), we don't have to update all the callers.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/StateTracker.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/StateTracker.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
index 40a32b0087..67583782c9 100644
--- a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
+++ b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp
@@ -710,11 +710,7 @@ bool StateTracker::Bind(bool rebind_all /*= false*/)
{
// We can fail to allocate descriptors if we exhaust the pool for this command buffer.
WARN_LOG(VIDEO, "Failed to get a descriptor set, executing buffer");
-
- // Try again after executing the current buffer.
- g_command_buffer_mgr->ExecuteCommandBuffer(false, false);
- InvalidateDescriptorSets();
- SetPendingRebind();
+ Util::ExecuteCurrentCommandsAndRestoreState(false, false);
if (!UpdateDescriptorSet())
{
// Something strange going on.
@@ -777,10 +773,7 @@ void StateTracker::OnDraw()
m_scheduled_command_buffer_kicks.end(), m_draw_counter))
{
// Kick a command buffer on the background thread.
- EndRenderPass();
- g_command_buffer_mgr->ExecuteCommandBuffer(true, false);
- InvalidateDescriptorSets();
- SetPendingRebind();
+ Util::ExecuteCurrentCommandsAndRestoreState(true);
}
}