projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f8268a
)
Cell: added spu_unpack_A8R8G8B8()
author
Brian
<brian.paul@tungstengraphics.com>
Mon, 4 Feb 2008 23:05:13 +0000
(16:05 -0700)
committer
Ben Skeggs
<skeggsb@gmail.com>
Fri, 15 Feb 2008 02:50:30 +0000
(13:50 +1100)
src/mesa/pipe/cell/spu/spu_colorpack.h
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/cell/spu/spu_colorpack.h
b/src/mesa/pipe/cell/spu/spu_colorpack.h
index 0c93c0656278a08d02e58b274667782ee28eca01..57ea3525c27bef7d7dd43967b038f82cff03f8e0 100644
(file)
--- 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 */