summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/TextureEncoder.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/TextureEncoder.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/TextureEncoder.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/TextureEncoder.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/TextureEncoder.cpp b/Source/Core/VideoBackends/Vulkan/TextureEncoder.cpp
index 404b30b09c..77a443a9e0 100644
--- a/Source/Core/VideoBackends/Vulkan/TextureEncoder.cpp
+++ b/Source/Core/VideoBackends/Vulkan/TextureEncoder.cpp
@@ -121,9 +121,7 @@ void TextureEncoder::EncodeTextureToRam(VkImageView src_texture, u8* dest_ptr, u
render_width, render_height, 0, 0);
// Block until the GPU has finished copying to the staging texture.
- g_command_buffer_mgr->ExecuteCommandBuffer(false, true);
- StateTracker::GetInstance()->InvalidateDescriptorSets();
- StateTracker::GetInstance()->SetPendingRebind();
+ Util::ExecuteCurrentCommandsAndRestoreState(false, true);
// Copy from staging texture to the final destination, adjusting pitch if necessary.
m_download_texture->ReadTexels(0, 0, render_width, render_height, dest_ptr, memory_stride);