diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2018-10-24 14:51:21 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-24 14:51:21 +1100 |
| commit | c4d1e4adffcd380cc87b841069ce2fe8b62d7b60 (patch) | |
| tree | c61a0a07c14ccc3c1f7247bdcc82927a82c145bb /Source/Core/VideoBackends/OGL/PerfQuery.cpp | |
| parent | 9c9d598ec006527bc47aea306e5171d03c12c5f5 (diff) | |
| parent | 2c6d96433c322b50470705d43005fd6308506d49 (diff) | |
Merge pull request #7450 from stenzek/glcontext
GLInterface refactoring/cleanup and runtime platform selection
Diffstat (limited to 'Source/Core/VideoBackends/OGL/PerfQuery.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/PerfQuery.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/Core/VideoBackends/OGL/PerfQuery.cpp b/Source/Core/VideoBackends/OGL/PerfQuery.cpp index b3b5df2265..77471cee19 100644 --- a/Source/Core/VideoBackends/OGL/PerfQuery.cpp +++ b/Source/Core/VideoBackends/OGL/PerfQuery.cpp @@ -6,25 +6,23 @@ #include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" -#include "Common/GL/GLInterfaceBase.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 (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3 && - 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 (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3) + 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() @@ -266,4 +264,4 @@ void PerfQueryGLESNV::FlushResults() FlushOne(); } -} // namespace +} // namespace OGL |
