mesa: fix copy & paste bugs in pack_ubyte_SRGB8()
authorBrian Paul <brianp@vmware.com>
Thu, 6 Mar 2014 18:24:33 +0000 (11:24 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 6 Mar 2014 18:39:41 +0000 (11:39 -0700)
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/main/format_pack.c

index e0d2a185eb05259a7a8ea674a0a8bc231df3ecc2..89958f79ff5df016d022b6edd5ea776138a374ec 100644 (file)
@@ -1044,8 +1044,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