summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-27 11:05:47 -0700
committerEric Anholt <[email protected]>2010-08-27 12:02:15 -0700
commit91a037b5e1374fe0574480a579bd36c71b75f9c2 (patch)
treee9d86d4138395c64d09005f400c555714c14e474 /src
parent0435cb348aaa8f2d8163a38517a098e27a81adef (diff)
i965: Fix destination writemasking in the new FS.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp11
1 files 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++;
}