diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-08-06 20:49:34 +0200 |
---|---|---|
committer | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-08-06 20:54:58 +0200 |
commit | b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61 (patch) | |
tree | eab3d5b675ddac021b1c2c31c6f3d2cea41ef569 /src/video_core/renderer_vulkan/vk_texture_cache.cpp | |
parent | Compute Replicate (diff) | |
download | yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.gz yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.bz2 yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.lz yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.xz yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.tar.zst yuzu-b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_texture_cache.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index b3e17c332..51be57b19 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -846,7 +846,15 @@ void TextureCacheRuntime::Finish() { } StagingBufferRef TextureCacheRuntime::UploadStagingBuffer(size_t size) { - return staging_buffer_pool.Request(size, MemoryUsage::Upload); + static StagingBufferRef result; + static size_t last_size = 0; + if (size == last_size) { + return result; + } + LOG_ERROR(Debug, "Called"); + last_size = size; + result = staging_buffer_pool.Request(size, MemoryUsage::Upload); + return result; } StagingBufferRef TextureCacheRuntime::DownloadStagingBuffer(size_t size, bool deferred) { |