i965/vec4: Allow cmod propagation when src0 is a uniform or shader input
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 21 Mar 2018 22:22:15 +0000 (15:22 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 26 Mar 2018 15:50:43 +0000 (08:50 -0700)
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@intel.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/compiler/brw_vec4_cmod_propagation.cpp

index 0d72d82a578b95634f5349447aca06b8fb03568b..7f1001b6d1213b7bf47f7d58a0ac9f4922c64092 100644 (file)
@@ -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;