Mesa (master): i965: Fix the vector/ expression splitting for the write_mask change.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Sep 22 21:16:11 UTC 2010
Module: Mesa
Branch: master
Commit: d74bab1fb67fe1334fd80eaf0d4e224fc6d96f22
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d74bab1fb67fe1334fd80eaf0d4e224fc6d96f22
Author: Eric Anholt <eric at anholt.net>
Date: Wed Sep 22 14:14:30 2010 -0700
i965: Fix the vector/expression splitting for the write_mask change.
+113 piglits.
---
.../dri/i965/brw_fs_channel_expressions.cpp | 5 +----
.../drivers/dri/i965/brw_fs_vector_splitting.cpp | 3 ---
2 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index 4786140..eba8a76 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -128,10 +128,7 @@ ir_channel_expressions_visitor::assign(ir_assignment *ir, int elem, ir_rvalue *v
*/
assert(ir->write_mask == (1 << ir->lhs->type->components()) - 1);
- /* Smear the float across all the channels for the masked write. */
- val_swiz = new(mem_ctx) ir_swizzle(val, 0, 0, 0, 0,
- ir->lhs->type->components());
- assign = new(mem_ctx) ir_assignment(lhs, val_swiz, NULL, (1 << elem));
+ assign = new(mem_ctx) ir_assignment(lhs, val, NULL, (1 << elem));
ir->insert_before(assign);
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
index 00d5c20..d4da86b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
@@ -281,9 +281,6 @@ ir_vector_splitting_visitor::visit_leave(ir_assignment *ir)
if (rhs) {
new_rhs = new(mem_ctx) ir_dereference_variable(rhs->components[i]);
- /* If we're writing into a writemask, smear it out to that channel. */
- if (!lhs)
- new_rhs = new(mem_ctx) ir_swizzle(new_rhs, i, i, i, i, i + 1);
} else {
new_rhs = new(mem_ctx) ir_swizzle(ir->rhs->clone(mem_ctx, NULL),
i, i, i, i, 1);
More information about the mesa-commit
mailing list