summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-03 16:22:59 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:05:19 -0700
commit34195832669f0eb7c4a80997cc524f8d10319307 (patch)
tree919511bd617cc93a8be150deff18ea3cca8e2846
parentc554d7cedee51bc170916c554c5f3dda51b3ab1e (diff)
ir_to_mesa: Fix up src reg swizzling.
-rw-r--r--ir_to_mesa.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index feb7f454679..11665a93e78 100644
--- a/ir_to_mesa.cpp
+++ b/ir_to_mesa.cpp
@@ -339,10 +339,10 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
{
struct mbtree *tree;
int size_swizzles[4] = {
- MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W),
- MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z),
- MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y),
MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X),
+ MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y),
+ MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z),
+ MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W),
};
ir_variable *var = ir->var->as_variable();
@@ -493,6 +493,7 @@ mesa_src_reg_from_ir_src_reg(ir_to_mesa_src_reg reg)
mesa_reg.File = reg.file;
assert(reg.index < (1 << INST_INDEX_BITS) - 1);
mesa_reg.Index = reg.index;
+ mesa_reg.Swizzle = reg.swizzle;
return mesa_reg;
}