summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/spu/spu_colorpack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/cell/spu/spu_colorpack.h')
-rw-r--r--src/mesa/pipe/cell/spu/spu_colorpack.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_colorpack.h b/src/mesa/pipe/cell/spu/spu_colorpack.h
index 57ea3525c2..e9fee8a3a6 100644
--- a/src/mesa/pipe/cell/spu/spu_colorpack.h
+++ b/src/mesa/pipe/cell/spu/spu_colorpack.h
@@ -31,7 +31,6 @@
#define SPU_COLORPACK_H
-#include <vec_literal.h>
#include <spu_intrinsics.h>
@@ -39,9 +38,11 @@ static INLINE unsigned int
spu_pack_R8G8B8A8(vector float rgba)
{
vector unsigned int out = spu_convtu(rgba, 32);
- out = spu_shuffle(out, out, VEC_LITERAL(vector unsigned char,
- 0, 4, 8, 12, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0));
+
+ out = spu_shuffle(out, out, ((vector unsigned char) {
+ 0, 4, 8, 12, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0 }) );
+
return spu_extract(out, 0);
}
@@ -50,9 +51,9 @@ static INLINE unsigned int
spu_pack_A8R8G8B8(vector float rgba)
{
vector unsigned int out = spu_convtu(rgba, 32);
- out = spu_shuffle(out, out, VEC_LITERAL(vector unsigned char,
- 12, 0, 4, 8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0));
+ out = spu_shuffle(out, out, ((vector unsigned char) {
+ 12, 0, 4, 8, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0}) );
return spu_extract(out, 0);
}
@@ -61,9 +62,9 @@ static INLINE unsigned int
spu_pack_B8G8R8A8(vector float rgba)
{
vector unsigned int out = spu_convtu(rgba, 32);
- out = spu_shuffle(out, out, VEC_LITERAL(vector unsigned char,
- 8, 4, 0, 12, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0));
+ out = spu_shuffle(out, out, ((vector unsigned char) {
+ 8, 4, 0, 12, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0}) );
return spu_extract(out, 0);
}
@@ -82,11 +83,11 @@ spu_unpack_color(uint color)
{
vector unsigned int color_u4 = spu_splats(color);
color_u4 = spu_shuffle(color_u4, color_u4,
- VEC_LITERAL(vector unsigned char,
- 0, 0, 0, 0,
- 5, 5, 5, 5,
- 10, 10, 10, 10,
- 15, 15, 15, 15));
+ ((vector unsigned char) {
+ 0, 0, 0, 0,
+ 5, 5, 5, 5,
+ 10, 10, 10, 10,
+ 15, 15, 15, 15}) );
return spu_convtf(color_u4, 32);
}
@@ -96,11 +97,11 @@ 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));
+ ((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);
}