i965: Use sample barycentric coordinates with per sample shading
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vec4_copy_propagation.cpp
index d009a08e8bd9fe37e68b077d1edb82d2187822fd..c8feff84d5676c545d621aa8f0102e0f024dd882 100644 (file)
@@ -95,9 +95,10 @@ try_constant_propagation(vec4_instruction *inst, int arg, src_reg *values[4])
       inst->src[arg] = value;
       return true;
 
+   case BRW_OPCODE_BFI1:
+   case BRW_OPCODE_ASR:
    case BRW_OPCODE_SHL:
    case BRW_OPCODE_SHR:
-   case BRW_OPCODE_ADDC:
    case BRW_OPCODE_SUBB:
       if (arg == 1) {
          inst->src[arg] = value;
@@ -111,6 +112,7 @@ try_constant_propagation(vec4_instruction *inst, int arg, src_reg *values[4])
    case BRW_OPCODE_OR:
    case BRW_OPCODE_AND:
    case BRW_OPCODE_XOR:
+   case BRW_OPCODE_ADDC:
       if (arg == 1) {
         inst->src[arg] = value;
         return true;
@@ -238,6 +240,9 @@ vec4_visitor::try_copy_propagation(vec4_instruction *inst, int arg,
    if (is_3src_inst && value.file == UNIFORM)
       return false;
 
+   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
@@ -362,7 +367,7 @@ vec4_visitor::opt_copy_propagation()
    }
 
    if (progress)
-      live_intervals_valid = false;
+      invalidate_live_intervals();
 
    return progress;
 }