diff options
| author | 2023-12-18 12:37:55 -0500 | |
|---|---|---|
| committer | 2023-12-18 12:37:55 -0500 | |
| commit | a2b567dfd644da122cc2ed21788952c2cfd44a1c (patch) | |
| tree | aa971c503fc29ec8cf9678e17284ba15bb9aa673 /src | |
| parent | Merge pull request #12184 from Kelebek1/system_settings (diff) | |
| download | yuzu-a2b567dfd644da122cc2ed21788952c2cfd44a1c.tar.gz yuzu-a2b567dfd644da122cc2ed21788952c2cfd44a1c.tar.xz yuzu-a2b567dfd644da122cc2ed21788952c2cfd44a1c.zip | |
vk_query_cache: Fix prefix sum max_accumulation_limit logic
Diffstat (limited to 'src')
| -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: | |||
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | if (has_multi_queries) { | 291 | if (has_multi_queries) { |
| 292 | size_t intermediary_buffer_index = ObtainBuffer<false>(num_slots_used); | 292 | const size_t min_accumulation_limit = |
| 293 | std::min(first_accumulation_checkpoint, num_slots_used); | ||
| 294 | const size_t max_accumulation_limit = | ||
| 295 | std::max(last_accumulation_checkpoint, num_slots_used); | ||
| 296 | const size_t intermediary_buffer_index = ObtainBuffer<false>(num_slots_used); | ||
| 293 | resolve_buffers.push_back(intermediary_buffer_index); | 297 | resolve_buffers.push_back(intermediary_buffer_index); |
| 294 | queries_prefix_scan_pass->Run(*accumulation_buffer, *buffers[intermediary_buffer_index], | 298 | queries_prefix_scan_pass->Run(*accumulation_buffer, *buffers[intermediary_buffer_index], |
| 295 | *buffers[resolve_buffer_index], num_slots_used, | 299 | *buffers[resolve_buffer_index], num_slots_used, |
| 296 | std::min(first_accumulation_checkpoint, num_slots_used), | 300 | min_accumulation_limit, max_accumulation_limit); |
| 297 | last_accumulation_checkpoint); | ||
| 298 | 301 | ||
| 299 | } else { | 302 | } else { |
| 300 | scheduler.RequestOutsideRenderPassOperationContext(); | 303 | scheduler.RequestOutsideRenderPassOperationContext(); |