summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-09-19 06:47:29 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-09-19 06:47:29 +0200
commit4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd (patch)
tree4d798c1b6e30b9f6f8f3568a3927ce58e41812e0 /src/video_core/renderer_vulkan
parentrenderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore (diff)
downloadyuzu-4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd.tar
yuzu-4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd.tar.gz
yuzu-4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd.tar.bz2
yuzu-4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd.tar.lz
yuzu-4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd.tar.xz
yuzu-4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd.tar.zst
yuzu-4f5bbe56ba1a590f4f266945d29b4bc9a04c23fd.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_query_cache.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp
index 28a793f97..ee2d871e3 100644
--- a/src/video_core/renderer_vulkan/vk_query_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp
@@ -76,7 +76,16 @@ VKQueryCache::VKQueryCache(VideoCore::RasterizerInterface& rasterizer,
QueryType::SamplesPassed},
} {}
-VKQueryCache::~VKQueryCache() = default;
+VKQueryCache::~VKQueryCache() {
+ // TODO(Rodrigo): This is a hack to destroy all HostCounter instances before the base class
+ // destructor is called. The query cache should be redesigned to have a proper ownership model
+ // instead of using shared pointers.
+ for (size_t query_type = 0; query_type < VideoCore::NumQueryTypes; ++query_type) {
+ auto& stream = Stream(static_cast<QueryType>(query_type));
+ stream.Update(false);
+ stream.Reset();
+ }
+}
std::pair<VkQueryPool, u32> VKQueryCache::AllocateQuery(QueryType type) {
return query_pools[static_cast<std::size_t>(type)].Commit();