summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp9
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp9
2 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index 70f417fd2a8..5dd72559298 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -302,9 +302,12 @@ fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
(entry->dst.reg_offset + entry->regs_written) * 32)
return false;
- /* See resolve_ud_negate() and comment in brw_fs_emit.cpp. */
- if (inst->conditional_mod &&
- inst->src[arg].type == BRW_REGISTER_TYPE_UD &&
+ /* we can't generally copy-propagate UD negations because we
+ * can end up accessing the resulting values as signed integers
+ * instead. See also resolve_ud_negate() and comment in
+ * fs_generator::generate_code.
+ */
+ if (inst->src[arg].type == BRW_REGISTER_TYPE_UD &&
entry->src.negate)
return false;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index bf15941e102..e25c9953c1c 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -314,12 +314,11 @@ try_copy_propagate(struct brw_context *brw, vec4_instruction *inst,
if (inst->is_send_from_grf())
return false;
- /* We can't copy-propagate a UD negation into a condmod
- * instruction, because the condmod ends up looking at the 33-bit
- * signed accumulator value instead of the 32-bit value we wanted
+ /* we can't generally copy-propagate UD negations becuse we
+ * end up accessing the resulting values as signed integers
+ * instead. See also resolve_ud_negate().
*/
- if (inst->conditional_mod &&
- value.negate &&
+ if (value.negate &&
value.type == BRW_REGISTER_TYPE_UD)
return false;