summaryrefslogtreecommitdiffstats
path: root/gpu/GLES2
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-17 23:48:27 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-17 23:48:27 +0000
commit6a25ae42f4c34047298ad5bf26ec14e6bafb5805 (patch)
tree18c94e94db86a3892a00de8fef82f324ec117b9e /gpu/GLES2
parentc53d16f1736e97da9d8de7c55b2c861aab9080b2 (diff)
downloadchromium_src-6a25ae42f4c34047298ad5bf26ec14e6bafb5805.zip
chromium_src-6a25ae42f4c34047298ad5bf26ec14e6bafb5805.tar.gz
chromium_src-6a25ae42f4c34047298ad5bf26ec14e6bafb5805.tar.bz2
Re-land: gpu: Add CHROMIUM_sync_query extension.
This adds a GL_COMMANDS_COMPLETED_CHROMIUM query target that provide a finer granularity of synchronizing GL command completion than offered by glFinish(). BUG=269808,356871,273274 TEST=gpu_unittests --gtest_filter=GLES2DecoderManualInitTest.BeginEndQueryEXTCommandsCompletedCHROMIUM Review URL: https://codereview.chromium.org/238933003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/GLES2')
-rw-r--r--gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt53
-rw-r--r--gpu/GLES2/gl2extchromium.h9
2 files changed, 62 insertions, 0 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt
new file mode 100644
index 0000000..98763d0
--- /dev/null
+++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt
@@ -0,0 +1,53 @@
+Name
+
+ CHROMIUM_sync_query
+
+Name Strings
+
+ GL_CHROMIUM_sync_query
+
+Version
+
+ Last Modifed Date: April 15, 2014
+
+Dependencies
+
+ OpenGL ES 2.0 is required.
+
+ EXT_occlusion_query_boolean is required.
+
+Overview
+
+ This extension provides a query mechanism that allow for synchronization
+ between the host CPU and the GPU, which may be accessing the same
+ resources (typically memory).
+
+ This extension is useful in conjunction with CHROMIUM_map_image to
+ determine when it is safe to access a mapped image. Once the result of
+ a COMMANDS_COMPLETED_CHROMIUM query is available, all drawing commands
+ issued before the query must have finished. This ensures that the memory
+ corresponding to the issued commands can be safely modified (assuming no
+ other outstanding drawing commands are issued subsequent to the query).
+
+New Procedures and Functions
+
+ None.
+
+Errors
+
+ None.
+
+New Tokens
+
+ Accepted by the <target> parameter of BeginQueryEXT, EndQueryEXT,
+ and GetQueryivEXT:
+
+ COMMANDS_COMPLETED_CHROMIUM 0x84F7
+
+New State
+
+ None.
+
+Revision History
+
+ 4/15/2014 Documented the extension
diff --git a/gpu/GLES2/gl2extchromium.h b/gpu/GLES2/gl2extchromium.h
index db4f12f..0bdf717 100644
--- a/gpu/GLES2/gl2extchromium.h
+++ b/gpu/GLES2/gl2extchromium.h
@@ -692,6 +692,15 @@ typedef void(GL_APIENTRYP PFNGLSCHEDULEOVERLAYPLANECHROMIUMPROC)(
GLfloat uv_height);
#endif /* GL_CHROMIUM_schedule_overlay_plane */
+/* GL_CHROMIUM_sync_query */
+#ifndef GL_CHROMIUM_sync_query
+#define GL_CHROMIUM_sync_query 1
+
+#ifndef GL_COMMANDS_COMPLETED_CHROMIUM
+#define GL_COMMANDS_COMPLETED_CHROMIUM 0x84F7
+#endif
+#endif /* GL_CHROMIUM_sync_query */
+
#ifdef __cplusplus
}
#endif