From: Michel Dänzer Date: Fri, 26 Mar 2010 15:29:59 +0000 (+0100) Subject: dri/swrast: Fix frontbuffer rendering. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7996f0fc2c167c84552701be7a48d20a897e7978;p=mesa.git dri/swrast: Fix frontbuffer rendering. Was broken since the endianness fixes. (cherry picked from commit 4cf14fa80bda5f4ea65bef3a64e748e064d0bde1) --- diff --git a/src/mesa/drivers/dri/swrast/swrast_spantemp.h b/src/mesa/drivers/dri/swrast/swrast_spantemp.h index 879a0c12e76..84873617147 100644 --- a/src/mesa/drivers/dri/swrast/swrast_spantemp.h +++ b/src/mesa/drivers/dri/swrast/swrast_spantemp.h @@ -37,7 +37,7 @@ #define _SWRAST_SPANTEMP_ONCE static INLINE void -PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p ) +PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLvoid *p ) { __DRIcontext *ctx = swrast_context(glCtx); __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer); @@ -168,7 +168,8 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb, if (mask) { for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x + i, y, src[i]); PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel); } @@ -200,7 +201,8 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb, if (mask) { for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); #ifdef STORE_PIXEL_RGB STORE_PIXEL_RGB(pixel, x + i, y, src[i]); #else @@ -240,7 +242,8 @@ NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb, if (mask) { for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x + i, y, src); PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel); } @@ -272,7 +275,8 @@ NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb, ASSERT(mask); for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x[i], y[i], src[i]); PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel); } @@ -294,7 +298,8 @@ NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb, ASSERT(mask); for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x[i], y[i], src); PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel); }