summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-03-29 17:44:45 -0700
committerMatt Turner <mattst88@gmail.com>2014-04-15 09:24:09 -0700
commit4dcfb924176eea4f0ac892c8ec8d38090dd59d2a (patch)
tree487eda48926ddf45d80e43978b0671a32deb309d
parentd877c643bea7a40e37d13d8a967c06fd006d1622 (diff)
i965/gs: Add dummy source to prepare_channel_masks instruction.
The generator uses its destination as a source implicitly, which breaks some assumptions in dead code elimination. Giving the instruction a source allows us to reason about it better.
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index 13d6d385a2f..1321a94d658 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -408,7 +408,8 @@ vec4_gs_visitor::emit_control_data_bits()
src_reg channel_mask(this, glsl_type::uint_type);
inst = emit(SHL(dst_reg(channel_mask), one, channel));
inst->force_writemask_all = true;
- emit(GS_OPCODE_PREPARE_CHANNEL_MASKS, dst_reg(channel_mask));
+ emit(GS_OPCODE_PREPARE_CHANNEL_MASKS, dst_reg(channel_mask),
+ channel_mask);
emit(GS_OPCODE_SET_CHANNEL_MASKS, mrf_reg, channel_mask);
}