On Fri, 2009-01-16 at 16:27 +0100, Matthias Hopf wrote:
> Full backtrace etc. in https://bugzilla.novell.com/show_bug.cgi?id=466806
> 
> In short, during glutCreateWindow() ->.. fbOpenWindow() ->
> MakeContextCurrent() is called, which calls driBindContext() with NULL
> draw and read pointers. The code looks like this should never happen,
> because the draw and read pointers are created in glxcurrent.c

I'm guessing this is a bug in freeglut.  For whatever reason, they've
started using glXMakeContextCurrent instead of glXMakeCurrent, but they
don't really understand the differences between the two.  This looks
like they're passing a Window to glXMakeContextCurrent as the drawable.
While this is valid for glXMakeCurrent, it is *not* valid for
glXMakeContextCurrent.  glXMakeContextCurrent must be passed a GLXWindow
created by glXCreateWindow.  Looking at the code in FetchDRIDrawable,
that would explain why it returns NULL.

Since glut always uses the same drawable for both read and draw, there
is absolutely no reason for it to us glXMakeContextCurrent.  It's just
silly.

That said, MakeContextCurrent should detect that FetchDRIDrawable has
returned NULL.  In that case, it should toss an error instead of calling
into the DRI driver.  I'll try to get a suitable patch out shortly.

> 375         if (gc && gc->driContext) {
> 376             __GLXDRIdrawable *pdraw = FetchDRIDrawable(dpy, draw, gc, 
> pre13);
> 377             __GLXDRIdrawable *pread = FetchDRIDrawable(dpy, read, gc, 
> pre13);
> 378
> 379             bindReturnValue =
> 380                 (gc->driContext->bindContext) (gc->driContext, pdraw,
> 
> from (seemingly) valid draw and read contexts. Just FetchDRIDrawable()
> returns NULL.
> 
> Now what would be the right way to fix this / the right way to determine
> what is actually going wrong here?
> 
> Thanks
> 
> Matthias
> 

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to