diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-11-20 00:09:56 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-04-29 00:46:31 +0200 |
commit | a16c2611316e534bda310f99319f4e8c74c49c92 (patch) | |
tree | 906e44bc1bfcd358ecf7510a99adff05394c2846 /src/video_core/renderer_vulkan/vk_buffer_cache.h | |
parent | Merge pull request #10051 from liamwhite/surface-capabilities (diff) | |
download | yuzu-a16c2611316e534bda310f99319f4e8c74c49c92.tar yuzu-a16c2611316e534bda310f99319f4e8c74c49c92.tar.gz yuzu-a16c2611316e534bda310f99319f4e8c74c49c92.tar.bz2 yuzu-a16c2611316e534bda310f99319f4e8c74c49c92.tar.lz yuzu-a16c2611316e534bda310f99319f4e8c74c49c92.tar.xz yuzu-a16c2611316e534bda310f99319f4e8c74c49c92.tar.zst yuzu-a16c2611316e534bda310f99319f4e8c74c49c92.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index 183b33632..05968e6a6 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h @@ -4,6 +4,7 @@ #pragma once #include "video_core/buffer_cache/buffer_cache.h" +#include "video_core/buffer_cache/memory_tracker_base.h" #include "video_core/engines/maxwell_3d.h" #include "video_core/renderer_vulkan/vk_compute_pass.h" #include "video_core/renderer_vulkan/vk_staging_buffer_pool.h" @@ -75,7 +76,9 @@ public: [[nodiscard]] StagingBufferRef UploadStagingBuffer(size_t size); - [[nodiscard]] StagingBufferRef DownloadStagingBuffer(size_t size); + [[nodiscard]] StagingBufferRef DownloadStagingBuffer(size_t size, bool deferred = false); + + void FreeDeferredStagingBuffer(StagingBufferRef& ref); void PreCopyBarrier(); @@ -142,6 +145,8 @@ private: struct BufferCacheParams { using Runtime = Vulkan::BufferCacheRuntime; using Buffer = Vulkan::Buffer; + using Async_Buffer = Vulkan::StagingBufferRef; + using MemoryTracker = VideoCommon::MemoryTrackerBase<VideoCore::RasterizerInterface>; static constexpr bool IS_OPENGL = false; static constexpr bool HAS_PERSISTENT_UNIFORM_BUFFER_BINDINGS = false; @@ -150,6 +155,7 @@ struct BufferCacheParams { static constexpr bool NEEDS_BIND_STORAGE_INDEX = false; static constexpr bool USE_MEMORY_MAPS = true; static constexpr bool SEPARATE_IMAGE_BUFFER_BINDINGS = false; + static constexpr bool IMPLEMENTS_ASYNC_DOWNLOADS = true; }; using BufferCache = VideoCommon::BufferCache<BufferCacheParams>; |