Mesa (master): i965: Fix destination writemasking in the new FS.

Eric Anholt anholt at kemper.freedesktop.org
Fri Aug 27 19:28:52 UTC 2010


Module: Mesa
Branch: master
Commit: 91a037b5e1374fe0574480a579bd36c71b75f9c2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=91a037b5e1374fe0574480a579bd36c71b75f9c2

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Aug 27 11:05:47 2010 -0700

i965: Fix destination writemasking in the new FS.

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |   11 +++++------
 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 a73509f..a2284e4 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++;
    }




More information about the mesa-commit mailing list