diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-02-09 19:59:16 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-09 19:59:16 +1300 |
| commit | ccf92a3e56764d6378c436a8040519a5bffc3372 (patch) | |
| tree | e2b330b225044e1901e77a6ed147cf21b9d7ac0e /Source/Core/VideoBackends/OGL/OGLPerfQuery.cpp | |
| parent | 72b22ef0a54f841b1c52d49cf0e00d3b12c29ac7 (diff) | |
| parent | 5c1b3ac61d7e660a9d1c206dbd0e615d637d3272 (diff) | |
Merge pull request #11522 from phire/KillRendererWithFire
Kill Renderer (with phire)
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLPerfQuery.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLPerfQuery.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLPerfQuery.cpp b/Source/Core/VideoBackends/OGL/OGLPerfQuery.cpp index 550b837de8..6303464251 100644 --- a/Source/Core/VideoBackends/OGL/OGLPerfQuery.cpp +++ b/Source/Core/VideoBackends/OGL/OGLPerfQuery.cpp @@ -8,15 +8,15 @@ #include "Common/CommonTypes.h" #include "Common/GL/GLExtensions/GLExtensions.h" -#include "VideoBackends/OGL/OGLRender.h" +#include "VideoBackends/OGL/OGLGfx.h" +#include "VideoCommon/FramebufferManager.h" #include "VideoCommon/VideoCommon.h" #include "VideoCommon/VideoConfig.h" namespace OGL { -std::unique_ptr<PerfQueryBase> GetPerfQuery() +std::unique_ptr<PerfQueryBase> GetPerfQuery(bool is_gles) { - const bool is_gles = static_cast<Renderer*>(g_renderer.get())->IsGLES(); if (is_gles && GLExtensions::Supports("GL_NV_occlusion_query_samples")) return std::make_unique<PerfQueryGLESNV>(); else if (is_gles) @@ -165,7 +165,7 @@ void PerfQueryGL::FlushOne() // TODO: Dropping the lower 2 bits from this count should be closer to actual // hardware behavior when drawing triangles. result = static_cast<u64>(result) * EFB_WIDTH * EFB_HEIGHT / - (g_renderer->GetTargetWidth() * g_renderer->GetTargetHeight()); + (g_framebuffer_manager->GetEFBWidth() * g_framebuffer_manager->GetEFBHeight()); // Adjust for multisampling if (g_ActiveConfig.iMultisamples > 1) @@ -264,8 +264,9 @@ void PerfQueryGLESNV::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 = static_cast<u64>(result) * EFB_WIDTH * EFB_HEIGHT / - (g_renderer->GetTargetWidth() * g_renderer->GetTargetHeight()); + const u64 native_res_result = + static_cast<u64>(result) * EFB_WIDTH * EFB_HEIGHT / + (g_framebuffer_manager->GetEFBWidth() * g_framebuffer_manager->GetEFBHeight()); m_results[entry.query_group].fetch_add(static_cast<u32>(native_res_result), std::memory_order_relaxed); |
