On Fri, Jun 12, 2009 at 5:33 AM, Allen Akin<a...@pobox.com> wrote: > On Thu, Jun 11, 2009 at 11:58:41AM -0600, Brian Paul wrote: > | Dave Airlie wrote: > | > 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. > | > | Do you have a patch for glean? Off-hand, I don't think adding a > | glFinish() would contradict the intention of the makeCurrent test - so > | the change sounds OK to me. > > I took a quick look at the docs and the test. > > The X and GL command streams aren't synchronized, so executing a > glFinish() isn't enough to guarantee that a drawable isn't shot down > while there are still GL commands pending. And any X client can destroy > the drawable independently, regardless of the GL commands in the queues > of other clients. > > If a glFinish() were required, in general, before destroying a drawable > or an RC, then that would be compelling. But I don't see any evidence > in the specs that that's the case.
Thanks Allen. All I've got is the glXMakeCurrent error to go on, 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. Now if something was meant to implicitly flush the command stream on window teardown then how would this ever happen. Things that marked GL as flushed in the X code are CopyContext SwapBuffers CopySubBuferMESA Flush Finish so destroying a window without calling one of these and then expecting to make current without an error seems to be what would throw those errors. However I'm not sure if there is some other operations we need to be setting the commands as flushed on. Dave. > > So a call to glFinish() in the test shouldn't be needed. It's not > sufficient by itself, and historically it doesn't seem to have been > necessary. Some other mechanism needs to be in place to make sure the > GL command queue is flushed. > > Of course I'm jumping in here, so I may have missed the point, in which > case my apologies. > > Allen > ------------------------------------------------------------------------------ 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