Mesa (master): i965/gs: Add dummy source to prepare_channel_masks instruction.
Matt Turner
mattst88 at kemper.freedesktop.org
Tue Apr 15 17:24:39 UTC 2014
Module: Mesa
Branch: master
Commit: 4dcfb924176eea4f0ac892c8ec8d38090dd59d2a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4dcfb924176eea4f0ac892c8ec8d38090dd59d2a
Author: Matt Turner <mattst88 at gmail.com>
Date: Sat Mar 29 17:44:45 2014 -0700
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.
---
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 13d6d38..1321a94 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);
}
More information about the mesa-commit
mailing list