diff options
| author | degasus <wickmarkus@web.de> | 2014-01-17 16:49:51 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-01-17 16:49:51 +0100 |
| commit | 5a599d472e49ef364748b880c379617635622280 (patch) | |
| tree | 00aaf55b551d650373fd6e0987f381c812be6c42 /Source/Core/VideoBackends/OGL/PerfQuery.cpp | |
| parent | 355df60abdfab7c2476f5fa7848329c69da066a3 (diff) | |
| parent | e932a349e85be407e6106f0ca63a0c104a276880 (diff) | |
Merge branch 'GLExtensions'
Diffstat (limited to 'Source/Core/VideoBackends/OGL/PerfQuery.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/PerfQuery.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/PerfQuery.cpp b/Source/Core/VideoBackends/OGL/PerfQuery.cpp index 7cb408b62e..c1c5eda36d 100644 --- a/Source/Core/VideoBackends/OGL/PerfQuery.cpp +++ b/Source/Core/VideoBackends/OGL/PerfQuery.cpp @@ -1,3 +1,8 @@ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include "GLInterface.h" #include "RenderBase.h" #include "GLUtil.h" #include "PerfQuery.h" @@ -41,7 +46,7 @@ void PerfQuery::EnableQuery(PerfQueryGroup type) { auto& entry = m_query_buffer[(m_query_read_pos + m_query_count) % ArraySize(m_query_buffer)]; - glBeginQuery(GL_SAMPLES_PASSED, entry.query_id); + glBeginQuery(GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL ? GL_SAMPLES_PASSED : GL_ANY_SAMPLES_PASSED, entry.query_id); entry.query_type = type; ++m_query_count; @@ -56,7 +61,7 @@ void PerfQuery::DisableQuery(PerfQueryGroup type) // stop query if (type == PQG_ZCOMP_ZCOMPLOC || type == PQG_ZCOMP) { - glEndQuery(GL_SAMPLES_PASSED); + glEndQuery(GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL ? GL_SAMPLES_PASSED : GL_ANY_SAMPLES_PASSED); } } |
