diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-12-20 18:46:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 18:46:41 +0100 |
commit | 76701185adfcad9413e6a356a260d7b49e672860 (patch) | |
tree | ca70319f1b3f1ca7cd3ad053cc8c8d1298c375a0 | |
parent | Merge pull request #12417 from liamwhite/arm64-gcc-fix (diff) | |
parent | vk_query_cache: Fix prefix sum max_accumulation_limit logic (diff) | |
download | yuzu-76701185adfcad9413e6a356a260d7b49e672860.tar yuzu-76701185adfcad9413e6a356a260d7b49e672860.tar.gz yuzu-76701185adfcad9413e6a356a260d7b49e672860.tar.bz2 yuzu-76701185adfcad9413e6a356a260d7b49e672860.tar.lz yuzu-76701185adfcad9413e6a356a260d7b49e672860.tar.xz yuzu-76701185adfcad9413e6a356a260d7b49e672860.tar.zst yuzu-76701185adfcad9413e6a356a260d7b49e672860.zip |
-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 078777cdd..95954ade7 100644 --- a/src/video_core/renderer_vulkan/vk_query_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp @@ -289,12 +289,15 @@ public: } if (has_multi_queries) { - size_t intermediary_buffer_index = ObtainBuffer<false>(num_slots_used); + const size_t min_accumulation_limit = + std::min(first_accumulation_checkpoint, num_slots_used); + const size_t max_accumulation_limit = + std::max(last_accumulation_checkpoint, num_slots_used); + const size_t intermediary_buffer_index = ObtainBuffer<false>(num_slots_used); resolve_buffers.push_back(intermediary_buffer_index); queries_prefix_scan_pass->Run(*accumulation_buffer, *buffers[intermediary_buffer_index], *buffers[resolve_buffer_index], num_slots_used, - std::min(first_accumulation_checkpoint, num_slots_used), - last_accumulation_checkpoint); + min_accumulation_limit, max_accumulation_limit); } else { scheduler.RequestOutsideRenderPassOperationContext(); |