[Mesa-dev] [PATCH] egl/dri: Don't invoke dri2_dpy->flush if it's NULL.

Kristian Høgsberg krh at bitplanet.net
Thu Feb 7 08:56:17 PST 2013

On Thu, Feb 7, 2013 at 3:37 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
> ----- Original Message -----
>> On Wed, Feb 6, 2013 at 4:30 PM, Kristian Høgsberg <krh at bitplanet.net>
>> wrote:
>> > On Tue, Feb 5, 2013 at 8:43 AM,  <jfonseca at vmware.com> wrote:
>> >> From: José Fonseca <jfonseca at vmware.com>
>> >>
>> >> I'd like to test Mesa OpenGL ES along side with NVIDIA libGL
>> >> drivers. But
>> >> without this change, I get a NULL pointer dereference.
>> >
>> > Which DRI driver doesn't support the flush extension?  EGL is
>> > expected
>> > to flush before swap buffer (and we can't rely on glFLush since
>> > that
>> > may be optimized to not do anything) so we have to have this DRI
>> > driver entry point.  The EGL DRI loader shouldn't load a DRI driver
>> > that doesn't support the flush extension in the first place, of
>> > course.
> I was using EGL GLES swrast, but on a system with proprietary NVIDIA drivers installed.

Ok, right, swrast doesn't have a flush extension and we don't look for
it in case of swrast.  Maybe it would be clearer to do

   if (!dri2_dpy->swrast)

to make it clearer that we don't require the flush extension for
swrast.  Though a deferred/tile sw rasterizer would need a flush
extension too to know when to kick off the rendering.  Anyway since we
do make sure we have a flush extension in the !swrast case, I guess
what you have now is fine.


More information about the mesa-dev mailing list