From: Eric Anholt Date: Fri, 27 Aug 2010 18:05:47 +0000 (-0700) Subject: i965: Fix destination writemasking in the new FS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91a037b5e1374fe0574480a579bd36c71b75f9c2;p=mesa.git i965: Fix destination writemasking in the new FS. --- 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++; }