From 8e2c063d6219b01037d1cb5bdb009000e52d8479 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 3 Nov 2018 00:17:00 +1000 Subject: TextureCache: Implement deferred/batched EFB copies --- Source/Core/VideoBackends/Vulkan/TextureCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/Vulkan/TextureCache.cpp') diff --git a/Source/Core/VideoBackends/Vulkan/TextureCache.cpp b/Source/Core/VideoBackends/Vulkan/TextureCache.cpp index 334b3f9b1a..dd61cce377 100644 --- a/Source/Core/VideoBackends/Vulkan/TextureCache.cpp +++ b/Source/Core/VideoBackends/Vulkan/TextureCache.cpp @@ -98,8 +98,8 @@ void TextureCache::ConvertTexture(TCacheEntry* destination, TCacheEntry* source, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); } -void TextureCache::CopyEFB(u8* dst, const EFBCopyParams& params, u32 native_width, - u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride, +void TextureCache::CopyEFB(AbstractStagingTexture* dst, const EFBCopyParams& params, + u32 native_width, u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride, const EFBRectangle& src_rect, bool scale_by_half, float y_scale, float gamma, bool clamp_top, bool clamp_bottom, const CopyFilterCoefficientArray& filter_coefficients) -- cgit v1.2.3 From 66b6e72c5ec49484966520d13b92a844b359e794 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 5 Nov 2018 23:09:34 +1000 Subject: Vulkan: Submit fewer command buffers in deferred EFB copies mode --- Source/Core/VideoBackends/Vulkan/TextureCache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/Vulkan/TextureCache.cpp') diff --git a/Source/Core/VideoBackends/Vulkan/TextureCache.cpp b/Source/Core/VideoBackends/Vulkan/TextureCache.cpp index dd61cce377..e9b92ba1e1 100644 --- a/Source/Core/VideoBackends/Vulkan/TextureCache.cpp +++ b/Source/Core/VideoBackends/Vulkan/TextureCache.cpp @@ -126,7 +126,6 @@ void TextureCache::CopyEFB(AbstractStagingTexture* dst, const EFBCopyParams& par // The barrier has to happen after the render pass, not inside it, as we are going to be // reading from the texture immediately afterwards. StateTracker::GetInstance()->EndRenderPass(); - StateTracker::GetInstance()->OnReadback(); // Transition to shader resource before reading. VkImageLayout original_layout = src_texture->GetLayout(); @@ -139,6 +138,8 @@ void TextureCache::CopyEFB(AbstractStagingTexture* dst, const EFBCopyParams& par // Transition back to original state src_texture->TransitionToLayout(g_command_buffer_mgr->GetCurrentCommandBuffer(), original_layout); + + StateTracker::GetInstance()->OnEFBCopyToRAM(); } bool TextureCache::SupportsGPUTextureDecode(TextureFormat format, TLUTFormat palette_format) -- cgit v1.2.3