Finish basic timer query support in GL backend
EXT_disjoint_timer_query is feature complete with the WebGL tests passing
with Chromium using ANGLE as a backend. There is some flakiness in the
timestamp query test on WebGL, but investigation revealed a bug on
Chromium's end and a fix is being made there. Since the extension is
feature complete, it is now enabled by default on OpenGL so that it can be
regression tested.
BUG=angleproject:1265
Change-Id: If018b7e3ae84aff7e40c73ff8e672a86689ae6c4
Reviewed-on: https://chromium-review.googlesource.com/324580
Tryjob-Request: Ian Ewell <ewell@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Ian Ewell <ewell@google.com>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index b835c1a..8693c6f 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -1065,6 +1065,11 @@
*params = mExtensions.maxLabelLength;
break;
+ // GL_EXT_disjoint_timer_query
+ case GL_GPU_DISJOINT_EXT:
+ *params = mRenderer->getGPUDisjoint();
+ break;
+
default:
mState.getIntegerv(getData(), pname, params);
break;
@@ -1092,6 +1097,11 @@
case GL_MAX_SERVER_WAIT_TIMEOUT:
*params = mCaps.maxServerWaitTimeout;
break;
+
+ // GL_EXT_disjoint_timer_query
+ case GL_TIMESTAMP_EXT:
+ *params = mRenderer->getTimestamp();
+ break;
default:
UNREACHABLE();
break;
@@ -1312,6 +1322,22 @@
*type = GL_FLOAT;
*numParams = 1;
return true;
+ case GL_TIMESTAMP_EXT:
+ if (!mExtensions.disjointTimerQuery)
+ {
+ return false;
+ }
+ *type = GL_INT_64_ANGLEX;
+ *numParams = 1;
+ return true;
+ case GL_GPU_DISJOINT_EXT:
+ if (!mExtensions.disjointTimerQuery)
+ {
+ return false;
+ }
+ *type = GL_INT;
+ *numParams = 1;
+ return true;
}
if (mExtensions.debug)