summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D12/D3D12PerfQuery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/D3D12PerfQuery.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D12/D3D12PerfQuery.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/D3D12/D3D12PerfQuery.cpp b/Source/Core/VideoBackends/D3D12/D3D12PerfQuery.cpp
index 933f118ce9..da9a6e6546 100644
--- a/Source/Core/VideoBackends/D3D12/D3D12PerfQuery.cpp
+++ b/Source/Core/VideoBackends/D3D12/D3D12PerfQuery.cpp
@@ -13,6 +13,7 @@
#include "VideoBackends/D3D12/DX12Context.h"
#include "VideoCommon/FramebufferManager.h"
#include "VideoCommon/VideoCommon.h"
+#include "VideoCommon/VideoConfig.h"
namespace DX12
{
@@ -244,9 +245,11 @@ void PerfQuery::AccumulateQueriesFromBuffer(u32 query_count)
std::memcpy(&result, mapped_ptr + (index * sizeof(PerfQueryDataType)), sizeof(result));
// NOTE: Reported pixel metrics should be referenced to native resolution
- const u64 native_res_result = static_cast<u64>(result) * EFB_WIDTH /
- g_framebuffer_manager->GetEFBWidth() * EFB_HEIGHT /
- g_framebuffer_manager->GetEFBHeight();
+ u64 native_res_result = static_cast<u64>(result) * 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);
}