[Mesa-dev] [PATCH 2/2] glapi: add function pointers for KHR_debug for gles
Ian Romanick
idr at freedesktop.org
Sat Aug 23 10:40:10 PDT 2014
On 08/21/2014 03:02 AM, Matthew Waters wrote:
> Signed-off-by: Matthew Waters <ystreet00 at gmail.com>
> ---
> src/mapi/glapi/gen/KHR_debug.xml | 73 +++++++++++++++++++++++++++++++++
> src/mesa/main/extensions.c | 2 +-
> src/mesa/main/tests/dispatch_sanity.cpp | 25 +++++++++++
> 3 files changed, 99 insertions(+), 1 deletion(-)
>
> diff --git a/src/mapi/glapi/gen/KHR_debug.xml b/src/mapi/glapi/gen/KHR_debug.xml
> index 48f7fa7..7376850 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" offset="assign" es1="1.0" es2="2.0">
You should not specify alias and offset. In this case, I think you just
want alias. alias means, "Give it the the same location as this other
function." offset='assign' means, "Find an unused location, and put
this function there." I don't know what the scripts will do when both
are specified, but it probably won't be the right thing. :)
> + <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" offset="assign" 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" offset="assign" es1="1.0" es2="2.0">
> + <param name="callback" type="GLDEBUGPROC"/>
> + <param name="userParam" type="const GLvoid *"/>
> + </function>
> +
> + <function name="GetDebugMessageLogKHR" alias="GetDebugMessageLog" offset="assign" 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" offset="assign" 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" offset="assign" es1="1.0" es2="2.0"/>
> +
> + <function name="ObjectLabelKHR" alias="ObjectLabel" offset="assign" 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" offset="assign" 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" offset="assign" 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" offset="assign" 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/extensions.c b/src/mesa/main/extensions.c
> index 553c01e..db0fc36 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -318,7 +318,7 @@ static const struct extension extension_table[] = {
> { "GL_OES_vertex_array_object", o(dummy_true), ES1 | ES2, 2010 },
>
> /* KHR extensions */
> - { "GL_KHR_debug", o(dummy_true), GL, 2012 },
> + { "GL_KHR_debug", o(dummy_true), GL | ES1 | ES2, 2012 },
>
> /* Vendor extensions */
> { "GL_3DFX_texture_compression_FXT1", o(TDFX_texture_compression_FXT1), GL, 1999 },
> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
> index 04fa86b..51b8084 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -1146,6 +1146,19 @@ const struct function gles11_functions_possible[] = {
> { "glUnmapBufferOES", 11, -1 },
> { "glVertexPointer", 11, _gloffset_VertexPointer },
> { "glViewport", 11, _gloffset_Viewport },
> +
> + /* 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 }
> };
>
> @@ -1369,6 +1382,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-dev
mailing list