Michael Vance wrote:
> 
> Does the XMesaBufferList ever get reset to NULL when the last context
> is destroyed?
> 
> I'm seeing lockups in XSync() inside of XMesaGarbageCollect() after
> creating, then destroying, then trying to create again... the first
> time through, XMesaBufferList is NULL, I would assume this would be
> true the second time, also?

Yes, XMesaBufferList should be set to NULL when the last XMesaBuffer
is removed from the list.

>From free_xmesa_buffer():

   for (b=XMesaBufferList; b; b=b->Next) {
      if (b==buffer) {
         /* unlink bufer from list */
         if (prev)
            prev->Next = buffer->Next;
         else
            XMesaBufferList = buffer->Next;   <=== here


The indicated line will cause XMesaBufferList to be set to
NULL if buffer was the only buffer in the list (since its
Next pointer will be NULL).

Do you have a test program?

-Brian


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to