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

Emil Velikov emil.l.velikov at gmail.com
Mon Dec 7 10:39:01 PST 2015


On 7 December 2015 at 16:45, Rob Clark <robdclark at gmail.com> 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/mapi/glapi/gen/gl_genexec.py             |  1 +
>  src/mesa/main/dd.h                           |  6 ++++++
>  src/mesa/main/errors.c                       | 13 +++++++++++++
>  src/mesa/main/errors.h                       |  3 +++
>  src/mesa/main/extensions_table.h             |  2 ++
>  src/mesa/main/mtypes.h                       |  1 +
>  src/mesa/main/tests/dispatch_sanity.cpp      |  3 +++

We normally split these up into separate commits - glapi, extension
boolean and rest. If others prefer things as is, so be it.

> --- a/src/mapi/glapi/gen/Makefile.am
> +++ b/src/mapi/glapi/gen/Makefile.am
> @@ -187,6 +187,7 @@ API_XML = \
>         EXT_texture_array.xml \
>         EXT_texture_integer.xml \
>         EXT_transform_feedback.xml \
> +       GREMEDY_string_marker.xml \
Thank you !

> --- a/src/mapi/glapi/gen/gl_genexec.py
> +++ b/src/mapi/glapi/gen/gl_genexec.py
> @@ -65,6 +65,7 @@ header = """/**
>  #include "main/context.h"
>  #include "main/convolve.h"
>  #include "main/copyimage.h"
> +#include "main/debug.h"
Something feels wrong here. This shouldn't really be part of this
patch should it ?

> --- a/src/mesa/main/errors.c
> +++ b/src/mesa/main/errors.c
> @@ -1276,6 +1276,19 @@ _mesa_free_errors_data(struct gl_context *ctx)
>     mtx_destroy(&ctx->DebugMutex);
>  }
>
> +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);
Don't know who decided to make len signed and why, although we really
should bail out on negative length. Even if the spec does not say
anything on the topic.

-Emil


More information about the mesa-dev mailing list