From 34195832669f0eb7c4a80997cc524f8d10319307 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 3 May 2010 16:22:59 -0700 Subject: [PATCH] ir_to_mesa: Fix up src reg swizzling. --- ir_to_mesa.cpp | 7 ++++--- 1 file 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; } -- 2.30.2