From: Brian Date: Mon, 4 Feb 2008 23:05:13 +0000 (-0700) Subject: Cell: added spu_unpack_A8R8G8B8() X-Git-Tag: 062012170305~17580^2~390^2~2721 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5068b573c417bdb317e1938585bebfe931bda049;p=profile%2Fivi%2Fmesa.git Cell: added spu_unpack_A8R8G8B8() --- diff --git a/src/mesa/pipe/cell/spu/spu_colorpack.h b/src/mesa/pipe/cell/spu/spu_colorpack.h index 0c93c06..57ea352 100644 --- a/src/mesa/pipe/cell/spu/spu_colorpack.h +++ b/src/mesa/pipe/cell/spu/spu_colorpack.h @@ -91,4 +91,19 @@ spu_unpack_color(uint color) } +static INLINE vector float +spu_unpack_A8R8G8B8(uint color) +{ + vector unsigned int color_u4 = spu_splats(color); + color_u4 = spu_shuffle(color_u4, color_u4, + VEC_LITERAL(vector unsigned char, + 5, 5, 5, 5, + 10, 10, 10, 10, + 15, 15, 15, 15, + 0, 0, 0, 0)); + + return spu_convtf(color_u4, 32); +} + + #endif /* SPU_COLORPACK_H */