Implement alpha buffer copy for SwapBuffers().
authorBrian <brian@yutani.localnet.net>
Sat, 24 Mar 2007 00:01:31 +0000 (18:01 -0600)
committerBrian <brian@yutani.localnet.net>
Sat, 24 Mar 2007 00:01:31 +0000 (18:01 -0600)
commit8e1c3bd0b4c599bae5b64cd51cec1d74266f30fb
tree445854d36005acc98e795213e5e39eb2c3fd8bba
parent654a3084398c5ab3ac1491bcdc5703221a268d03
Implement alpha buffer copy for SwapBuffers().

Nicolai writes:
When the pixmap pixel format has no alpha channel, the x11 driver
(software rendering) adds a wrapped alpha channel on request.

During SwapBuffers, this alpha channel is not copied from back to
front, which means that the front buffer doesn't really contain the
contents that the back buffer previously contained.

A subsequent glReadPixels from the front buffer will return an
incorrect result. The following patch attempts to fix this.
src/mesa/drivers/x11/xm_api.c
src/mesa/drivers/x11/xmesaP.h
src/mesa/main/renderbuffer.c
src/mesa/main/renderbuffer.h