summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index abeb44a4083..6d76686ab5d 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1882,10 +1882,13 @@ glsl_to_tgsi_visitor::visit(ir_assignment *ir)
st_src_reg condition = this->result;
for (i = 0; i < type_size(ir->lhs->type); i++) {
+ st_src_reg l_src = st_src_reg(l);
+ l_src.swizzle = swizzle_for_size(ir->lhs->type->vector_elements);
+
if (switch_order) {
- emit(ir, TGSI_OPCODE_CMP, l, condition, st_src_reg(l), r);
+ emit(ir, TGSI_OPCODE_CMP, l, condition, l_src, r);
} else {
- emit(ir, TGSI_OPCODE_CMP, l, condition, r, st_src_reg(l));
+ emit(ir, TGSI_OPCODE_CMP, l, condition, r, l_src);
}
l.index++;