diff options
| author | Stenzek <stenzek@gmail.com> | 2016-11-30 22:34:36 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2016-11-30 23:14:36 +1000 |
| commit | 6a4eba1153b7fc858aca895f17b57dc03f089860 (patch) | |
| tree | d425d55180cc410e9c7ca157f4786f2a76a5b741 /Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp | |
| parent | 3adeacb78d6c313020ea6f2562f76856f9431ec1 (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/FramebufferManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp b/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp index f01f8ac25b..774afbf79d 100644 --- a/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp @@ -738,9 +738,7 @@ bool FramebufferManager::PopulateColorReadbackTexture() } // Wait until the copy is complete. - g_command_buffer_mgr->ExecuteCommandBuffer(false, true); - StateTracker::GetInstance()->InvalidateDescriptorSets(); - StateTracker::GetInstance()->SetPendingRebind(); + Util::ExecuteCurrentCommandsAndRestoreState(false, true); // Map to host memory. if (!m_color_readback_texture->IsMapped() && !m_color_readback_texture->Map()) @@ -822,9 +820,7 @@ bool FramebufferManager::PopulateDepthReadbackTexture() } // Wait until the copy is complete. - g_command_buffer_mgr->ExecuteCommandBuffer(false, true); - StateTracker::GetInstance()->InvalidateDescriptorSets(); - StateTracker::GetInstance()->SetPendingRebind(); + Util::ExecuteCurrentCommandsAndRestoreState(false, true); // Map to host memory. if (!m_depth_readback_texture->IsMapped() && !m_depth_readback_texture->Map()) @@ -1212,7 +1208,7 @@ void FramebufferManager::DrawPokeVertices(const EFBPokeVertex* vertices, size_t { // Kick a command buffer first. WARN_LOG(VIDEO, "Kicking command buffer due to no EFB poke space."); - Util::ExecuteCurrentCommandsAndRestoreState(true); + Util::ExecuteCurrentCommandsAndRestoreState(false); command_buffer = g_command_buffer_mgr->GetCurrentCommandBuffer(); if (!m_poke_vertex_stream_buffer->ReserveMemory(vertices_size, sizeof(EfbPokeData), true, true, |
