diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2023-03-15 15:20:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-15 15:20:11 +0100 |
| commit | 91fca0783edc73d5f027cb4e151b319f03ee5ce4 (patch) | |
| tree | ace3697be316fe552109bc37f24cec4376aa46cb /Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp | |
| parent | b43f83286674e97d472e0b2d1361c21c50d4bfe3 (diff) | |
| parent | aac9647ba2715b4a96fe301116a9f41cd8046441 (diff) | |
Merge pull request #11647 from AdmiralCurtiss/perfquery-inconsistency
Fix PerfQuery inconsistencies across backends.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp b/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp index d16c8c379b..c6aee79327 100644 --- a/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKPerfQuery.cpp @@ -17,6 +17,7 @@ #include "VideoBackends/Vulkan/VulkanContext.h" #include "VideoCommon/FramebufferManager.h" #include "VideoCommon/VideoCommon.h" +#include "VideoCommon/VideoConfig.h" namespace Vulkan { @@ -218,9 +219,11 @@ void PerfQuery::ReadbackQueries(u32 query_count) entry.has_value = false; // NOTE: Reported pixel metrics should be referenced to native resolution - const u64 native_res_result = static_cast<u64>(m_query_result_buffer[i]) * EFB_WIDTH / - g_framebuffer_manager->GetEFBWidth() * EFB_HEIGHT / - g_framebuffer_manager->GetEFBHeight(); + u64 native_res_result = static_cast<u64>(m_query_result_buffer[i]) * EFB_WIDTH / + g_framebuffer_manager->GetEFBWidth() * EFB_HEIGHT / + g_framebuffer_manager->GetEFBHeight(); + if (g_ActiveConfig.iMultisamples > 1) + native_res_result /= g_ActiveConfig.iMultisamples; m_results[entry.query_group].fetch_add(static_cast<u32>(native_res_result), std::memory_order_relaxed); } |
