[Mesa-dev] [PATCH 1/2] glx: add support for GLX_ARB_create_context_no_error
Adam Jackson
ajax at redhat.com
Thu Aug 31 18:14:50 UTC 2017
On Thu, 2017-08-03 at 20:07 +0200, Grigori Goronzy wrote:
> @@ -592,4 +601,45 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
> return true;
> }
>
> +_X_HIDDEN bool
> +dri2_check_no_error(uint32_t flags, struct glx_context *share_context,
> + int major, unsigned *error)
> +{
> + Bool noError = flags & __DRI_CTX_FLAG_NO_ERROR;
Right here you should have:
if (!noError)
return true;
> +
> + /* The KHR_no_error specs say:
> + *
> + * Requires OpenGL ES 2.0 or OpenGL 2.0.
> + */
> + if (major < 2) {
> + *error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE;
> + return false;
> + }
... because if you don't, this will break creating any GL 1.x context,
regardless of whether no_error was requested.
- ajax
More information about the mesa-dev
mailing list