OSDN Git Service

cell: fix shuffle in spu_unpack_B8G8R8A8()
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 11 Sep 2008 15:55:39 +0000 (09:55 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 11 Sep 2008 16:39:29 +0000 (10:39 -0600)
src/gallium/drivers/cell/spu/spu_colorpack.h

index e9fee8a..fd8dc6d 100644 (file)
@@ -79,14 +79,14 @@ spu_pack_color_shuffle(vector float rgba, vector unsigned char shuffle)
 
 
 static INLINE vector float
-spu_unpack_color(uint color)
+spu_unpack_B8G8R8A8(uint color)
 {
    vector unsigned int color_u4 = spu_splats(color);
    color_u4 = spu_shuffle(color_u4, color_u4,
                           ((vector unsigned char) {
-                             0, 0, 0, 0,
-                             5, 5, 5, 5,
                              10, 10, 10, 10,
+                             5, 5, 5, 5,
+                             0, 0, 0, 0,
                              15, 15, 15, 15}) );
    return spu_convtf(color_u4, 32);
 }