From: Brian Paul Date: Thu, 12 Mar 2009 15:30:08 +0000 (-0600) Subject: mesa: fix transposed red/blue in store_texel_rgb888/bgr888() functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=862dccd56054196dc5adf1377f682d0138fa1789;p=mesa.git mesa: fix transposed red/blue in store_texel_rgb888/bgr888() functions --- diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h index f9f9d5b1f8e..d5f0b761e7d 100644 --- a/src/mesa/main/texformat_tmp.h +++ b/src/mesa/main/texformat_tmp.h @@ -719,9 +719,9 @@ static void store_texel_rgb888(struct gl_texture_image *texImage, { const GLubyte *rgba = (const GLubyte *) texel; GLubyte *dst = TEXEL_ADDR(GLubyte, texImage, i, j, k, 3); - dst[0] = rgba[RCOMP]; + dst[0] = rgba[BCOMP]; dst[1] = rgba[GCOMP]; - dst[2] = rgba[BCOMP]; + dst[2] = rgba[RCOMP]; } #endif @@ -745,9 +745,9 @@ static void store_texel_bgr888(struct gl_texture_image *texImage, { const GLubyte *rgba = (const GLubyte *) texel; GLubyte *dst = TEXEL_ADDR(GLubyte, texImage, i, j, k, 3); - dst[0] = rgba[BCOMP]; + dst[0] = rgba[RCOMP]; dst[1] = rgba[GCOMP]; - dst[2] = rgba[RCOMP]; + dst[2] = rgba[BCOMP]; } #endif