From: Daniel Borca Date: Tue, 28 Mar 2006 21:40:14 +0000 (+0000) Subject: Match pixel addresses with `compute_row_addresses' in RGB mode (also obey RGB/UNSIGNE... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c61763b5d26fdde05d3f301b8c0bdb609cd5b16f;p=mesa.git Match pixel addresses with `compute_row_addresses' in RGB mode (also obey RGB/UNSIGNED_BYTE rule). --- diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 1c203ec8b62..8afd0a71769 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -235,7 +235,7 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ - GLchan *P = osmesa->rowaddr[Y] + 4 * (X) + GLchan *P = osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ @@ -254,7 +254,7 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ - GLchan *P = osmesa->rowaddr[Y] + 4 * (X) + GLchan *P = osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \