On 08/18/2012 12:44 AM, Tomeu Vizoso wrote:
On Sat, Aug 18, 2012 at 5:20 AM, Ian Romanick <i...@freedesktop.org> wrote:
On 08/17/2012 10:08 AM, Paulo Alcantara wrote:

The segmentation fault occurs when DRI2 is not loaded up and
dri2_setup_screen() function deferences dri2_dpy->dri2 (since it's NULL
at this point).

This patch fixes the segmentation fault by checking if dri2 pointer is
not NULL before deferencing it.

Which only happens with swrast, right?

But we do want to enable KHR_create_context when using swrast as well, don't we?

Possibly. The main utility of that extension is to create OpenGL 3.0+ or OpenGL ES 3.0 contexts. Neither is supported with swrast yet (right?).

driswrast uses a different vtable from dri2. Someone would have to add the version checking and the call to __DRIswrastExtensionRec::createContextAttribs. src/glx/drisw_glx.c should provide some guidance. When I implemented the KHR_create_context support I was lazy. I won't have time to come back to this for at least a few more weeks.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to