diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2018-11-07 09:32:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-07 09:32:37 +0100 |
| commit | dac58a859ca30262b79f72036f1e78ea54be83c4 (patch) | |
| tree | 9567559377284d746b77b07a14a01518017c99d4 /Source/Core/VideoBackends/Vulkan/TextureCache.cpp | |
| parent | 710b893b914bcc1e812f1a63fdb9a143ff682561 (diff) | |
| parent | a45f977d265bb4360ca0b4a7fd189f4a30362f61 (diff) | |
Merge pull request #7539 from stenzek/batched-efb-copies
TextureCache: Deferred/batched EFB copies
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/TextureCache.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/TextureCache.cpp b/Source/Core/VideoBackends/Vulkan/TextureCache.cpp index 334b3f9b1a..e9b92ba1e1 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) @@ -126,7 +126,6 @@ void TextureCache::CopyEFB(u8* dst, const EFBCopyParams& params, u32 native_widt // 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(u8* dst, const EFBCopyParams& params, u32 native_widt // 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) |
