[Mesa-dev] [PATCH 1/3] dri3_glx.c: Pass NULL DRI drawables into driver for None GLX drawables

Emil Velikov emil.l.velikov at gmail.com
Wed Mar 25 08:51:43 PDT 2015


Hi Xiong Zhang,
On 25 March 2015 at 08:05, Xiong Zhang <xiong.y.zhang at intel.com> wrote:
> GLX_ARB_create_context spec says:
> If either <draw> or <read> are not a valid GLX drawable, a GLXBadDrawable
> error is generated, unless <draw> and <read> are both None and the OpenGL
> version supported by <ctx> is 3.0 or greater.
>
> So when both <draw> and <read> are None, it could pass NULL drawable into
> driver instead of returing GLXBadDrawable.
>
I'm a bit fresh in the area, but where do we check that the OpenGL
version supported is 3.0 or greater ? Is there an assumption that all
dri2/3 modules support it ?

A similar commit has landed for dri2 in mesa 10.2 f658150639c(glx:
Pass NULL DRI drawables into the DRI driver for None GLX drawables).
Shouldn't a similar one be due for dri(1), drisw etc ? Not suggesting
that you should prep one, just asking.

>From a quick look - if it wasn't for indirect glx, most of these (and
patch 2/3) changes could be pushed one level up to
glxcurrent.c:MakeContextCurrent. Bit unfortunate about the duplication
but that's another story.

Cheers
Emil


More information about the mesa-dev mailing list