From 91a037b5e1374fe0574480a579bd36c71b75f9c2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 27 Aug 2010 11:05:47 -0700 Subject: [PATCH] i965: Fix destination writemasking in the new FS. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index a73509f2588..a2284e431a0 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -832,12 +832,11 @@ fs_visitor::visit(ir_assignment *ir) } for (i = 0; i < type_size(ir->lhs->type); i++) { - if (i < 4 && !(write_mask & (1 << i))) - continue; - - inst = emit(fs_inst(BRW_OPCODE_MOV, l, r)); - if (ir->condition) - inst->predicated = true; + if (i >= 4 || (write_mask & (1 << i))) { + inst = emit(fs_inst(BRW_OPCODE_MOV, l, r)); + if (ir->condition) + inst->predicated = true; + } l.reg_offset++; r.reg_offset++; } -- 2.30.2