AIGLX: Zero-copy texture-from-pixmap.

When available, use the 2D driver texOffsetStart hook and the 3D driver
setTexOffset hook to save the overhead of passing the pixmap data to
glTex(Sub)Image.

The basic idea is to update the driver specific 'offset' for bound pixmaps
before dispatching a GLX render request and to flush immediately afterwards
if there are any pixmaps bound. This should ensure that the 3D driver can
use pixmaps for texturing directly regardless of the X server moving them
around.
This commit is contained in:
Michel Dänzer 2007-05-22 10:51:53 +02:00
commit 6324bfc468
5 changed files with 219 additions and 86 deletions

View file

@ -106,11 +106,11 @@ __glXMesaDrawableSwapBuffers(__GLXdrawable *base)
* why we need to re-take the lock and swap in the server context
* before calling XMesaSwapBuffers() here. /me shakes head. */
__glXenterServer();
__glXenterServer(GL_FALSE);
XMesaSwapBuffers(glxPriv->xm_buf);
__glXleaveServer();
__glXleaveServer(GL_FALSE);
return GL_TRUE;
}