diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c index feebdb5fdef..c7b5404af7e 100644 --- a/src/mesa/main/format_pack.c +++ b/src/mesa/main/format_pack.c @@ -1039,8 +1039,8 @@ pack_ubyte_SRGB8(const GLubyte src[4], void *dst) { GLubyte *d = ((GLubyte *) dst); d[2] = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - d[1] = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - d[0] = linear_ubyte_to_srgb_ubyte(src[RCOMP]); + d[1] = linear_ubyte_to_srgb_ubyte(src[GCOMP]); + d[0] = linear_ubyte_to_srgb_ubyte(src[BCOMP]); } static void