translate: typo in emit_B8G8R8A8_UNORM
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 15 Apr 2008 13:40:16 +0000 (14:40 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 15 Apr 2008 13:40:16 +0000 (14:40 +0100)
src/gallium/auxiliary/translate/translate_generic.c

index 643f6430c5af92ede884cc59aa7f03d0d5b8cbe1..7e75ba8365ef7314284ce3abda9857dce0fa45f4 100644 (file)
@@ -231,10 +231,10 @@ static void
 emit_B8G8R8A8_UNORM( const float *attrib, void *ptr)
 {
    ubyte *out = (ubyte *)ptr;
-   out[2] = TO_8_UNORM(out[0]);
-   out[1] = TO_8_UNORM(out[1]);
-   out[0] = TO_8_UNORM(out[2]);
-   out[3] = TO_8_UNORM(out[3]);
+   out[2] = TO_8_UNORM(attrib[0]);
+   out[1] = TO_8_UNORM(attrib[1]);
+   out[0] = TO_8_UNORM(attrib[2]);
+   out[3] = TO_8_UNORM(attrib[3]);
 }
 
 static void