On Fri, Aug 23, 2013 at 9:02 AM, Paul Berry <stereotype...@gmail.com> wrote:
> Shouldn't we make a similar change to brw_vec4_copy_propagation.cpp?

Yes, thanks.

I've folded this change into the patch:

--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -95,9 +95,20 @@ try_constant_propagation(vec4_instruction *inst,
int arg, src_reg *values[4])
       inst->src[arg] = value;
       return true;

+   case BRW_OPCODE_SHL:
+   case BRW_OPCODE_SHR:
+      if (arg == 1) {
+         inst->src[arg] = value;
+         return true;
+      }
+      break;
+
    case BRW_OPCODE_MACH:
    case BRW_OPCODE_MUL:
    case BRW_OPCODE_ADD:
+   case BRW_OPCODE_OR:
+   case BRW_OPCODE_AND:
+   case BRW_OPCODE_XOR:
       if (arg == 1) {
         inst->src[arg] = value;
         return true;

(Don't you love the subtle differences between the vec4 and fs? like
progress = true; ... return progress; vs return true or that it's
try_constant_propagate in the fs backend and try_constant_propagation
in the vec4 backend.)
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to