summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-04 16:05:13 -0700
committerBen Skeggs <skeggsb@gmail.com>2008-02-15 13:50:30 +1100
commit71e6cd0b66be784aa3feb86101b7a62d17735f56 (patch)
tree48265df6ae46d19a9572abd5d2640f4f80f5ab92 /src/mesa/pipe
parent2f8268aa02949828b8b14c252e2cc4e8f61c5f4e (diff)
Cell: added spu_unpack_A8R8G8B8()
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/cell/spu/spu_colorpack.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_colorpack.h b/src/mesa/pipe/cell/spu/spu_colorpack.h
index 0c93c06562..57ea3525c2 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 */