summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-03-14 02:13:25 +0100
committerAdmiral H. Curtiss <pikachu025@gmail.com>2023-03-14 02:13:25 +0100
commitaac9647ba2715b4a96fe301116a9f41cd8046441 (patch)
tree7b862784246c649b80f8a51036a575a3c88ff14c /Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp
parentddd2b598da8a1fdf1524e86272154f35451bf26e (diff)
Divide by MSAA for PerfQuery in all backends.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp b/Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp
index 983abc15c8..f2ae05bb99 100644
--- a/Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DPerfQuery.cpp
@@ -8,6 +8,7 @@
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoCommon/FramebufferManager.h"
#include "VideoCommon/VideoCommon.h"
+#include "VideoCommon/VideoConfig.h"
namespace DX11
{
@@ -114,8 +115,10 @@ void PerfQuery::FlushOne()
// NOTE: Reported pixel metrics should be referenced to native resolution
// TODO: Dropping the lower 2 bits from this count should be closer to actual
// hardware behavior when drawing triangles.
- const u64 native_res_result = result * EFB_WIDTH / g_framebuffer_manager->GetEFBWidth() *
- EFB_HEIGHT / g_framebuffer_manager->GetEFBHeight();
+ u64 native_res_result = 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);