diff options
Diffstat (limited to 'Source/Core/VideoBackends/OGL/PerfQuery.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/PerfQuery.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/OGL/PerfQuery.cpp b/Source/Core/VideoBackends/OGL/PerfQuery.cpp index 30a6e1781b..77471cee19 100644 --- a/Source/Core/VideoBackends/OGL/PerfQuery.cpp +++ b/Source/Core/VideoBackends/OGL/PerfQuery.cpp @@ -6,24 +6,23 @@ #include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" -#include "Common/GL/GLContext.h" -#include "Common/GL/GLUtil.h" +#include "Common/GL/GLExtensions/GLExtensions.h" #include "VideoBackends/OGL/PerfQuery.h" -#include "VideoCommon/RenderBase.h" +#include "VideoBackends/OGL/Render.h" #include "VideoCommon/VideoConfig.h" namespace OGL { std::unique_ptr<PerfQueryBase> GetPerfQuery() { - if (g_main_gl_context->IsGLES() && GLExtensions::Supports("GL_NV_occlusion_query_samples")) + 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>(); - - if (g_main_gl_context->IsGLES()) + else if (is_gles) return std::make_unique<PerfQueryGL>(GL_ANY_SAMPLES_PASSED); - - return std::make_unique<PerfQueryGL>(GL_SAMPLES_PASSED); + else + return std::make_unique<PerfQueryGL>(GL_SAMPLES_PASSED); } PerfQuery::PerfQuery() : m_query_read_pos() |
