i965/fs: Don't constant propagate into integer math instructions.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_fs_copy_propagation.cpp
index af54debc213930f76364c594d4c281fdf98f40f4..9542d6a20ce83d66d1eab9e71ba88bb34a402f74 100644 (file)
@@ -499,9 +499,13 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
          progress = true;
          break;
 
-      case SHADER_OPCODE_POW:
       case SHADER_OPCODE_INT_QUOTIENT:
       case SHADER_OPCODE_INT_REMAINDER:
+         /* FINISHME: Promote non-float constants and remove this. */
+         if (devinfo->gen < 8)
+            break;
+         /* fallthrough */
+      case SHADER_OPCODE_POW:
          /* Allow constant propagation into src1 regardless of generation, and
           * let constant combining promote the constant on Gen < 8.
           */