[Mesa-dev] [PATCH 1/3] mesa: add GREMEDY_string_marker

Ian Romanick idr at freedesktop.org
Mon Aug 17 10:12:59 PDT 2015


Two comments below.

On 08/10/2015 09:15 AM, Rob Clark wrote:
> From: Rob Clark <robclark at freedesktop.org>
> 
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
>  src/mapi/glapi/gen/GREMEDY_string_marker.xml | 18 ++++++++++++++++++
>  src/mapi/glapi/gen/Makefile.am               |  1 +
>  src/mapi/glapi/gen/gl_API.xml                |  2 ++
>  src/mesa/main/dd.h                           |  6 ++++++
>  src/mesa/main/debug.c                        | 14 ++++++++++++++
>  src/mesa/main/debug.h                        |  3 +++
>  src/mesa/main/extensions.c                   |  1 +
>  src/mesa/main/mtypes.h                       |  1 +
>  8 files changed, 46 insertions(+)
>  create mode 100644 src/mapi/glapi/gen/GREMEDY_string_marker.xml
> 
> diff --git a/src/mapi/glapi/gen/GREMEDY_string_marker.xml b/src/mapi/glapi/gen/GREMEDY_string_marker.xml
> new file mode 100644
> index 0000000..ffa3eac
> --- /dev/null
> +++ b/src/mapi/glapi/gen/GREMEDY_string_marker.xml
> @@ -0,0 +1,18 @@
> +<?xml version="1.0"?>
> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
> +
> +<!-- Note: no GLX protocol info yet. -->
> +
> +
> +<OpenGLAPI>
> +
> +<category name="GL_GREMEDY_string_marker" number="311">
> +
> +    <function name="StringMarkerGREMEDY">
> +        <param name="len" type="GLsizei"/>
> +        <param name="string" type="const GLvoid *"/>
> +    </function>

Is "make check" still happy?

> +
> +</category>
> +
> +</OpenGLAPI>
> diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
> index 7d9d1a6..405b71f 100644
> --- a/src/mapi/glapi/gen/Makefile.am
> +++ b/src/mapi/glapi/gen/Makefile.am
> @@ -186,6 +186,7 @@ API_XML = \
>  	EXT_texture_array.xml \
>  	EXT_texture_integer.xml \
>  	EXT_transform_feedback.xml \
> +	GREMEDY_string_marker.xml \
>  	INTEL_performance_query.xml \
>  	KHR_debug.xml \
>  	KHR_context_flush_control.xml \
> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
> index 658efa4..aea08bd 100644
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -12613,6 +12613,8 @@
>  
>  <xi:include href="EXT_framebuffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
>  
> +<xi:include href="GREMEDY_string_marker.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
> +
>  <xi:include href="EXT_packed_depth_stencil.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
>  
>  <xi:include href="EXT_provoking_vertex.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
> diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
> index 87eb63e..1fc4ca4 100644
> --- a/src/mesa/main/dd.h
> +++ b/src/mesa/main/dd.h
> @@ -787,6 +787,12 @@ struct dd_function_table {
>     void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
>     /*@}*/
>  
> +   /**
> +    * \name GREMEDY debug/marker functions
> +    */
> +   /*@{*/
> +   void (*EmitStringMarker)(struct gl_context *ctx, const GLchar *string, GLsizei len);
> +   /*@}*/
>  
>     /**
>      * \name Support for multiple T&L engines
> diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
> index 5ca7d5c..a640c0d 100644
> --- a/src/mesa/main/debug.c
> +++ b/src/mesa/main/debug.c
> @@ -655,3 +655,17 @@ _mesa_print_texture(struct gl_context *ctx, struct gl_texture_image *img)
>  
>     ctx->Driver.UnmapTextureImage(ctx, img, slice);
>  }
> +
> +void GLAPIENTRY
> +_mesa_StringMarkerGREMEDY(GLsizei len, const GLvoid * string)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   if (ctx->Driver.EmitStringMarker) {
> +      /* if length not specified, string will be null terminated: */
> +      if (len == 0)
> +         len = strlen(string);
> +      ctx->Driver.EmitStringMarker(ctx, string, len);
> +   } else {
> +      _mesa_warning(ctx, "StringMarkerGREMEDY unsupported");

This should generate GL_INVALID_OPERATION.

> +   }
> +}
> diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h
> index 902f595..a18ef8a 100644
> --- a/src/mesa/main/debug.h
> +++ b/src/mesa/main/debug.h
> @@ -74,4 +74,7 @@ _mesa_dump_image(const char *filename, const void *image, GLuint w, GLuint h,
>  extern void
>  _mesa_print_texture(struct gl_context *ctx, struct gl_texture_image *img);
>  
> +void GLAPIENTRY
> +_mesa_StringMarkerGREMEDY(GLsizei len, const GLvoid * string);
> +
>  #endif
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index d934d19..7181e18 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -364,6 +364,7 @@ static const struct extension extension_table[] = {
>     { "GL_ATI_texture_env_combine3",                o(ATI_texture_env_combine3),                GLL,            2002 },
>     { "GL_ATI_texture_float",                       o(ARB_texture_float),                       GL,             2002 },
>     { "GL_ATI_texture_mirror_once",                 o(ATI_texture_mirror_once),                 GL,             2006 },
> +   { "GL_GREMEDY_string_marker",                   o(GREMEDY_string_marker),                   GL,             2007 },
>     { "GL_IBM_multimode_draw_arrays",               o(dummy_true),                              GL,             1998 },
>     { "GL_IBM_rasterpos_clip",                      o(dummy_true),                              GLL,            1996 },
>     { "GL_IBM_texture_mirrored_repeat",             o(dummy_true),                              GLL,            1998 },
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 4e00fb6..383074a 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -3953,6 +3953,7 @@ struct gl_extensions
>     GLboolean ATI_texture_env_combine3;
>     GLboolean ATI_fragment_shader;
>     GLboolean ATI_separate_stencil;
> +   GLboolean GREMEDY_string_marker;
>     GLboolean INTEL_performance_query;
>     GLboolean MESA_pack_invert;
>     GLboolean MESA_ycbcr_texture;
> 



More information about the mesa-dev mailing list