diff options
author | Ian Romanick <idr@us.ibm.com> | 2004-05-07 22:46:37 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2004-05-07 22:46:37 +0000 |
commit | c94a96bae4225f6c31b5908f633703c03aee7079 (patch) | |
tree | b36bd89a611780b2a79f93de4b099339386d5f2d /src/mesa/drivers/dri/i830/i830_span.c | |
parent | 3d769b81faea6a066c07c4e5ee0df9cf12870b92 (diff) |
Add support for GLX_SGI_make_current_read.
Diffstat (limited to 'src/mesa/drivers/dri/i830/i830_span.c')
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_span.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i830/i830_span.c b/src/mesa/drivers/dri/i830/i830_span.c index 28610923e3..9076b34423 100644 --- a/src/mesa/drivers/dri/i830/i830_span.c +++ b/src/mesa/drivers/dri/i830/i830_span.c @@ -27,12 +27,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_span.c,v 1.4 2002/12/10 01:26:53 dawes Exp $ */ -/* - * Author: - * Jeff Hartmann <jhartmann@2d3d.com> +/** + * \file i830_span.c + * + * Heavily based on the I810 driver, which was written by Keith Whitwell. * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell <keith@tungstengraphics.com> + * \author Jeff Hartmann <jhartmann@2d3d.com> + * \author Keith Whitwell <keith@tungstengraphics.com> */ #include "glheader.h" @@ -52,7 +53,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOCAL_VARS \ i830ContextPtr imesa = I830_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + __DRIdrawablePrivate *dPriv = imesa->mesa_drawable; \ i830ScreenPrivate *i830Screen = imesa->i830Screen; \ GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ GLuint height = dPriv->h; \ @@ -67,7 +68,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOCAL_DEPTH_VARS \ i830ContextPtr imesa = I830_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + __DRIdrawablePrivate *dPriv = imesa->mesa_drawable; \ i830ScreenPrivate *i830Screen = imesa->i830Screen; \ GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ GLuint height = dPriv->h; \ @@ -267,6 +268,13 @@ static void i830SetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, GLuint bufferBit) { i830ContextPtr imesa = I830_CONTEXT(ctx); + + assert( (colorBuffer == imesa->driDrawable->driverPrivate) + || (colorBuffer == imesa->driReadable->driverPrivate) ); + + imesa->mesa_drawable = (colorBuffer == imesa->driDrawable->driverPrivate) + ? imesa->driDrawable : imesa->driReadable; + if (bufferBit == DD_FRONT_LEFT_BIT) { imesa->drawMap = (char *)imesa->driScreen->pFB; imesa->readMap = (char *)imesa->driScreen->pFB; |