summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-04-03 16:19:54 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-04-03 16:19:54 +0000
commit9d205e3542dbcec948725be74732745fc4dda95a (patch)
tree700e8720c638ec1ddfae32a7eb908e52629bed8a /src/mesa/drivers/x11/xm_dd.c
parent373aea11c83332eaa61607f7b48df43f46f4fb9a (diff)
clear pixel value wasn't byteswapped for scissored clears in clear_32bit_ximage()
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 2bb04ae504..59c8e0cd79 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 );
}