> So glXMakeCurrent says > > GLXBadCurrentWindow is generated if there are pending GL commands for > the previous context and the current drawable is a window that is no > longer valid. > > This appears to be true, we don't seem to have cleared all the pending > GL commands > before, so we get this error. > > Adding a glFinish into the glean test exit path, gets it past this, > but I've no idea if this is correct. > > I then hit a GLXBadContext soon afterwards which suggest something > more is going wrong. > > Probably need someone with some knowledge of GLX to tell me more.
Okay attached two patches (one is a resend of some previous work - its in radeon-rewrite). With these in mesa and a glFinish in the tbinding.cpp glean no longer dies in the makeCurrent test case. However Brian you had a comment in dri_util.c about not unbinding things properly due to swapbuffers on an unbound window, can you put a glean test together for that? so we can test it properly, as the hack that was in place seems to not be the best idea. Holding a pointer to a drawable object with no reference on it is definitely a path to accessing freed memory. The other open question is whether the glFinish in the glean test case is actually necessary, from reading the glXMakeCurrent manpage is appears it might be, or something else needs to make sure outstanding GL commands on the context are flushed before the window is destroyed. Dave. > > Brian? Ian? > > Dave. > >>> >>> [airl...@pegasus piglit]$ ./bin/glean -o -r dave -t makeCurrent >>> makeCurrent: PASS rgba8, db, z24, s8, win+pmap, id 33 >>> X Error of failed request: GLXBadCurrentWindow >>> Major opcode of failed request: 152 (GLX) >>> Minor opcode of failed request: 5 (X_GLXMakeCurrent) >>> Serial number of failed request: 103 >>> Current serial number in output stream: 103 >>> >>> this is better than what I was getting before I fixed it which was my >>> X server crashing. >>> >>> However I'm just wondering if anyone knows what the proper behaviour >>> is here, glean test needs fixing? >>> or our GLX implementation needs fixing? >> >> The patch is definitely a step in the right direction, but I suspect >> glean is right though and that something else is wrong in the glx code. >> I'll try to take a look. >> >> cheers, >> Kristian >> >> >> >
0001-dri-attempt-to-actually-refcount-the-__DRIDrawable.patch
Description: Binary data
0001-GLX-attempt-to-fix-glean-makeCurrent-test-cases.patch
Description: Binary data
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects
-- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel