Ticket #10894 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

glXBindTexImageEXT is not compliant -> fixed as of 1 Oct 2012 (4.2 and later)

Reported by: smspillaz Owned by:
Component: guest additions Version: VirtualBox 4.1.20
Keywords: Cc:
Guest type: Linux Host type: all


glXBindTexImageEXT opens a new X connection on the first time it is invoked when the client may have a server grab. This is not compliant with the specification:

  1. Should users be required to re-bind the drawable to a texture after

the drawable has been rendered to?

It is difficult to define what the contents of the texture would be if we don't require this. Also, requiring this would allow implementations to perform an implicit copy at this point if they could not support texturing directly out of renderable memory.

The problem with defining the contents of the texture after rendering has occured to the associated drawable is that there is no way to synchronize the use of the buffer as a source and as a destination. Direct OpenGL rendering is not necessarily done in the same command stream as X rendering. At the time the pixmap is used as the source for a texturing operation, it could be in a state halfway through a copyarea operation in which half of it is say, white, and half is the result of the copyarea operation. How is this defined? Worse, some other OpenGL application could be halfway through a frame of rendering when the composite manager sources from it. The buffer might just contain the results of a "glClear" operation at that point.

To gurantee tear-free rendering, a composite manager would run as follows:

-receive request for compositing: XGrabServer() glXWaitX() or XSync() glXBindTexImageEXT()

<Do rendering/compositing>

glXReleaseTexImageEXT() XUngrabServer()

This results in a deadlock on startup with recent versions of compiz.

A patch to fix this is attached.


do_xdamage_init_a_bit_earlier.patch Download (867 bytes) - added by smspillaz 7 years ago.

Change History

Changed 7 years ago by smspillaz

comment:1 Changed 7 years ago by michael

  • Summary changed from glXBindTexImageEXT is not compliant to glXBindTexImageEXT is not compliant -> fixed as of 1 Oct 2012 (4.2 and later)

Thanks for pointing that out. I made a similar change (your patch didn't actually compile) to trunk and 4.2 today.

comment:2 Changed 7 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed some time ago.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use