Mesa (master): i965/vec4: Allow cmod propagation when src0 is a uniform or shader input

Ian Romanick idr at kemper.freedesktop.org
Mon Mar 26 15:52:28 UTC 2018


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Mar 21 15:22:15 2018 -0700

i965/vec4: Allow cmod propagation when src0 is a uniform or shader input

No shader-db changes.  This source must have been written by a previous
instruction, so it cannot be a uniform or a shader input.  However, this
change allows the next commit to help more shaders.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/intel/compiler/brw_vec4_cmod_propagation.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_vec4_cmod_propagation.cpp b/src/intel/compiler/brw_vec4_cmod_propagation.cpp
index 0d72d82a57..7f1001b6d1 100644
--- a/src/intel/compiler/brw_vec4_cmod_propagation.cpp
+++ b/src/intel/compiler/brw_vec4_cmod_propagation.cpp
@@ -49,7 +49,8 @@ opt_cmod_propagation_local(bblock_t *block)
            inst->opcode != BRW_OPCODE_MOV) ||
           inst->predicate != BRW_PREDICATE_NONE ||
           !inst->dst.is_null() ||
-          inst->src[0].file != VGRF ||
+          (inst->src[0].file != VGRF && inst->src[0].file != ATTR &&
+           inst->src[0].file != UNIFORM) ||
           inst->src[0].abs)
          continue;
 




More information about the mesa-commit mailing list