diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-27 03:11:31 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:29 +0200 |
commit | 53acdda772a8b7650c46ba9d998119b8c8e30844 (patch) | |
tree | 5f98a9a19093704513fffd17dc7326cdbf5e6f91 /src/video_core/renderer_vulkan/vk_query_cache.cpp | |
parent | vk_compute_pass: Fix -Wshadow warning (diff) | |
download | yuzu-53acdda772a8b7650c46ba9d998119b8c8e30844.tar yuzu-53acdda772a8b7650c46ba9d998119b8c8e30844.tar.gz yuzu-53acdda772a8b7650c46ba9d998119b8c8e30844.tar.bz2 yuzu-53acdda772a8b7650c46ba9d998119b8c8e30844.tar.lz yuzu-53acdda772a8b7650c46ba9d998119b8c8e30844.tar.xz yuzu-53acdda772a8b7650c46ba9d998119b8c8e30844.tar.zst yuzu-53acdda772a8b7650c46ba9d998119b8c8e30844.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_query_cache.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_query_cache.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp index 7cadd5147..1dd78328c 100644 --- a/src/video_core/renderer_vulkan/vk_query_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp @@ -114,10 +114,13 @@ void HostCounter::EndQuery() { } u64 HostCounter::BlockingQuery() const { - if (tick >= cache.GetScheduler().CurrentTick()) { - cache.GetScheduler().Flush(); + auto& scheduler{cache.GetScheduler()}; + if (tick >= scheduler.CurrentTick()) { + scheduler.Flush(); + // This may not be necessary, but it's better to play it safe and assume drivers don't + // support wait before signal on vkGetQueryPoolResults + scheduler.WaitWorker(); } - u64 data; const VkResult query_result = cache.GetDevice().GetLogical().GetQueryResults( query.first, query.second, 1, sizeof(data), &data, sizeof(data), |