Mesa (master): glapi: add function pointers for KHR_debug for gles

Emil Velikov evelikov at kemper.freedesktop.org
Wed Oct 7 14:13:47 UTC 2015


Module: Mesa
Branch: master
Commit: ae6ff72f5a56d71887bd2c59128868f71e5e2e01
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae6ff72f5a56d71887bd2c59128868f71e5e2e01

Author: Matthew Waters <ystreet00 at gmail.com>
Date:   Mon Sep 14 18:35:46 2015 +0100

glapi: add function pointers for KHR_debug for gles

v2 [Emil Velikov]
 - Rebase.
 - Correct version in gles11 dispatch_sanity.
 - Move the extension enable to a separate patch.

Signed-off-by: Matthew Waters <ystreet00 at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 src/mapi/glapi/gen/KHR_debug.xml        |   73 +++++++++++++++++++++++++++++++
 src/mesa/main/tests/dispatch_sanity.cpp |   25 +++++++++++
 2 files changed, 98 insertions(+)

diff --git a/src/mapi/glapi/gen/KHR_debug.xml b/src/mapi/glapi/gen/KHR_debug.xml
index 77956d6..e4a5a5b 100644
--- a/src/mapi/glapi/gen/KHR_debug.xml
+++ b/src/mapi/glapi/gen/KHR_debug.xml
@@ -145,6 +145,79 @@
     <param name="label" type="GLchar *"/>
   </function>
 
+  <!-- ES extension has different suffixes -->
+  <function name="DebugMessageControlKHR" alias="DebugMessageControl" es1="1.0" es2="2.0">
+    <param name="source" type="GLenum"/>
+    <param name="type" type="GLenum"/>
+    <param name="severity" type="GLenum"/>
+    <param name="count" type="GLsizei" counter="true"/>
+    <param name="ids" type="const GLuint *" count="count"/>
+    <param name="enabled" type="GLboolean"/>
+  </function>
+
+  <function name="DebugMessageInsertKHR" alias="DebugMessageInsert" es1="1.0" es2="2.0">
+    <param name="source" type="GLenum"/>
+    <param name="type" type="GLenum"/>
+    <param name="id" type="GLuint"/>
+    <param name="severity" type="GLenum"/>
+    <param name="length" type="GLsizei"/>
+    <param name="buf" type="const GLchar *"/>
+  </function>
+
+  <function name="DebugMessageCallbackKHR" alias="DebugMessageCallback" es1="1.0" es2="2.0">
+    <param name="callback" type="GLDEBUGPROC"/>
+    <param name="userParam" type="const GLvoid *"/>
+  </function>
+
+  <function name="GetDebugMessageLogKHR" alias="GetDebugMessageLog" es1="1.0" es2="2.0">
+    <return type="GLuint"/>
+    <param name="count" type="GLuint"/>
+    <param name="bufsize" type="GLsizei"/>
+    <param name="sources" type="GLenum *" output="true"/>
+    <param name="types" type="GLenum *" output="true"/>
+    <param name="ids" type="GLuint *" output="true"/>
+    <param name="severities" type="GLenum *" output="true"/>
+    <param name="lengths" type="GLsizei *" output="true"/>
+    <param name="messageLog" type="GLchar *" output="true"/>
+  </function>
+
+  <function name="PushDebugGroupKHR" alias="PushDebugGroup" es1="1.0" es2="2.0">
+    <param name="source" type="GLenum"/>
+    <param name="id" type="GLuint"/>
+    <param name="length" type="GLsizei"/>
+    <param name="message" type="const GLchar *"/>
+  </function>
+
+  <function name="PopDebugGroupKHR" alias="PopDebugGroup" es1="1.0" es2="2.0"/>
+
+  <function name="ObjectLabelKHR" alias="ObjectLabel" es1="1.0" es2="2.0">
+    <param name="identifier" type="GLenum"/>
+    <param name="name" type="GLuint"/>
+    <param name="length" type="GLsizei"/>
+    <param name="label" type="const GLchar *"/>
+  </function>
+
+  <function name="GetObjectLabelKHR" alias="GetObjectLabel" es1="1.0" es2="2.0">
+    <param name="identifier" type="GLenum"/>
+    <param name="name" type="GLuint"/>
+    <param name="bufSize" type="GLsizei"/>
+    <param name="length" type="GLsizei *"/>
+    <param name="label" type="GLchar *"/>
+  </function>
+
+  <function name="ObjectPtrLabelKHR" alias="ObjectPtrLabel" es1="1.0" es2="2.0">
+    <param name="ptr" type="const GLvoid *"/>
+    <param name="length" type="GLsizei"/>
+    <param name="label" type="const GLchar *"/>
+  </function>
+
+  <function name="GetObjectPtrLabelKHR" alias="GetObjectPtrLabel" es1="1.0" es2="2.0">
+    <param name="ptr" type="const GLvoid *"/>
+    <param name="bufSize" type="GLsizei"/>
+    <param name="length" type="GLsizei *"/>
+    <param name="label" type="GLchar *"/>
+  </function>
+
 </category>
 
 </OpenGLAPI>
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index b19c6d7..ac2d233 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -2039,6 +2039,19 @@ const struct function gles11_functions_possible[] = {
    { "glUnmapBufferOES", 11, -1 },
    { "glVertexPointer", 11, _gloffset_VertexPointer },
    { "glViewport", 11, _gloffset_Viewport },
+
+   /* GL_KHR_debug */
+   { "glPushDebugGroupKHR", 11, -1 },
+   { "glPopDebugGroupKHR", 11, -1 },
+   { "glDebugMessageCallbackKHR", 11, -1 },
+   { "glDebugMessageControlKHR", 11, -1 },
+   { "glDebugMessageInsertKHR", 11, -1 },
+   { "glGetDebugMessageLogKHR", 11, -1 },
+   { "glGetObjectLabelKHR", 11, -1 },
+   { "glGetObjectPtrLabelKHR", 11, -1 },
+   { "glObjectLabelKHR", 11, -1 },
+   { "glObjectPtrLabelKHR", 11, -1 },
+
    { NULL, 0, -1 }
 };
 
@@ -2262,6 +2275,18 @@ const struct function gles2_functions_possible[] = {
    { "glEndPerfQueryINTEL", 20, -1 },
    { "glGetPerfQueryDataINTEL", 20, -1 },
 
+   /* GL_KHR_debug */
+   { "glPushDebugGroupKHR", 20, -1 },
+   { "glPopDebugGroupKHR", 20, -1 },
+   { "glDebugMessageCallbackKHR", 20, -1 },
+   { "glDebugMessageControlKHR", 20, -1 },
+   { "glDebugMessageInsertKHR", 20, -1 },
+   { "glGetDebugMessageLogKHR", 20, -1 },
+   { "glGetObjectLabelKHR", 20, -1 },
+   { "glGetObjectPtrLabelKHR", 20, -1 },
+   { "glObjectLabelKHR", 20, -1 },
+   { "glObjectPtrLabelKHR", 20, -1 },
+
    { NULL, 0, -1 }
 };
 




More information about the mesa-commit mailing list