From 9d205e3542dbcec948725be74732745fc4dda95a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 3 Apr 2001 16:19:54 +0000 Subject: clear pixel value wasn't byteswapped for scissored clears in clear_32bit_ximage() --- src/mesa/drivers/x11/xm_dd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/mesa/drivers/x11/xm_dd.c') diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 2bb04ae5044..59c8e0cd795 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.19 2001/03/19 02:25:36 keithw Exp $ */ +/* $Id: xm_dd.c,v 1.20 2001/04/03 16:19:54 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -680,16 +680,16 @@ clear_32bit_ximage( GLcontext *ctx, GLboolean all, GLint x, GLint y, GLint width, GLint height ) { const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (all) { - register GLint n = xmesa->xm_buffer->width * xmesa->xm_buffer->height; - register GLuint *ptr4 = (GLuint *) xmesa->xm_buffer->backimage->data; - register GLuint pixel = (GLuint) xmesa->clearpixel; - if (xmesa->swapbytes) { - pixel = ((pixel >> 24) & 0x000000ff) + register GLuint pixel = (GLuint) xmesa->clearpixel; + if (xmesa->swapbytes) { + pixel = ((pixel >> 24) & 0x000000ff) | ((pixel >> 8) & 0x0000ff00) | ((pixel << 8) & 0x00ff0000) | ((pixel << 24) & 0xff000000); - } + } + if (all) { + register GLint n = xmesa->xm_buffer->width * xmesa->xm_buffer->height; + register GLuint *ptr4 = (GLuint *) xmesa->xm_buffer->backimage->data; if (pixel==0) { MEMSET( ptr4, pixel, 4*n ); } -- cgit v1.2.3