Hi Xiong Zhang, > On 25 March 2015 at 08:05, Xiong Zhang <xiong.y.zh...@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 ?
[Zhang, Xiong Y] the patch lack of checking of OpenGL version >= 3.0, I will add 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. > [Zhang, Xiong Y] yes, Both patches resolve the same issues. I think it should be applied to Dri(1), drisw also > 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. > [Zhang, Xiong Y] yes, I want to push these to top level also to reduce replicate code. But There are two difficulties: 1. indirect glx and applegl glx are exception, they use a different bind() code structure as driX 2. Until call psc->core->bindContext(), we don't know whether glx_context is a bad context. And Psc->core->bindContext() should be called in driX_bind_context. I mean patch 3 couldn't move To glxCurrent.c > Cheers > Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev