[Mesa-dev] [PATCH] glxinfo: print debug/no-error contex flags
Eric Engestrom
eric.engestrom at imgtec.com
Fri Jun 30 16:49:15 UTC 2017
On Friday, 2017-06-30 10:44:19 -0600, Brian Paul wrote:
> v2: define the GLCONTEXT_FLAG_x values if glext.h isn't new enough, per Emil.
> ---
> src/xdemos/glinfo_common.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/src/xdemos/glinfo_common.c b/src/xdemos/glinfo_common.c
> index fe7b9c9..23f430f 100644
> --- a/src/xdemos/glinfo_common.c
> +++ b/src/xdemos/glinfo_common.c
> @@ -30,6 +30,18 @@
> #define snprintf _snprintf
> #endif
>
> +#ifdef GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT
s/#ifdef/#ifndef/g
> +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
> +#endif
> +#ifdef GL_CONTEXT_FLAG_DEBUG_BIT
> +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
> +#endif
> +#ifdef GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB
> +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
> +#endif
> +#ifdef GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR
> +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
> +#endif
>
> /**
> * Return the GL enum name for a numeric value.
> @@ -715,12 +727,10 @@ const char *
> context_flags_string(int mask)
> {
> const static struct bit_info bits[] = {
> -#ifdef GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT
> { GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT, "forward-compatible" },
> -#endif
> -#ifdef GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB
> { GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB, "robust-access" },
> -#endif
> + { GL_CONTEXT_FLAG_DEBUG_BIT, "debug" },
> + { GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR, "no-error" },
> };
>
> return bitmask_to_string(bits, ELEMENTS(bits), mask);
> --
> 1.9.1
>
More information about the mesa-dev
mailing list