[Mesa-dev] [PATCH 10/15] mesa: Implement KHR_debug ObjectLabel functions

Brian Paul brianp at vmware.com
Mon Aug 26 07:54:34 PDT 2013


On 08/26/2013 04:43 AM, Timothy Arceri wrote:
>
> Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
>   src/mesa/main/objectlabel.c |  277 +++++++++++++++++++++++++++++++++++++++++++
>   src/mesa/main/objectlabel.h |   61 ++++++++++
>   2 files changed, 338 insertions(+)
>   create mode 100644 src/mesa/main/objectlabel.c
>   create mode 100644 src/mesa/main/objectlabel.h
>
> diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c
> new file mode 100644
> index 0000000..78f9b33
> --- /dev/null
> +++ b/src/mesa/main/objectlabel.c
> @@ -0,0 +1,277 @@
> +/*
> + * Mesa 3-D graphics library
> + *
> + * Copyright (C) 2013  Timothy Arceri   All Rights Reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included
> + * in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +
> +#include "arrayobj.h"
> +#include "bufferobj.h"
> +#include "context.h"
> +#include "dlist.h"
> +#include "enums.h"
> +#include "fbobject.h"
> +#include "objectlabel.h"
> +#include "queryobj.h"
> +#include "samplerobj.h"
> +#include "shaderobj.h"
> +#include "syncobj.h"
> +#include "texobj.h"
> +#include "transformfeedback.h"
> +
> +
> +/**
> + * Helper for _mesa_ObjectLabel() and _mesa_ObjectPtrLabel().
> + */
> +static void
> +set_label(struct gl_context *ctx, char **labelPtr, const char *label,
> +          int length, const char *caller)
> +{
> +   if (*labelPtr) {
> +      /* free old label string */
> +      free(*labelPtr);
> +   }
> +
> +   if (label) {
> +   /* set new label string */

Indentation





More information about the mesa-dev mailing list