i965/fs: Disallow constant propagation into POW on Gen 6.
authorMatt Turner <mattst88@gmail.com>
Sat, 25 Apr 2015 08:50:04 +0000 (01:50 -0700)
committerMatt Turner <mattst88@gmail.com>
Sat, 25 Apr 2015 09:15:35 +0000 (02:15 -0700)
Fixes assertion failures in three piglit tests on Gen 6 since commit
0087cf23e.

src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp

index 9542d6a20ce83d66d1eab9e71ba88bb34a402f74..c9ce2bd4513647b12db6cf0ecd1d90dd309d9ad2 100644 (file)
@@ -506,9 +506,15 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
             break;
          /* fallthrough */
       case SHADER_OPCODE_POW:
-         /* Allow constant propagation into src1 regardless of generation, and
-          * let constant combining promote the constant on Gen < 8.
+         /* Allow constant propagation into src1 (except on Gen 6), and let
+          * constant combining promote the constant on Gen < 8.
+          *
+          * While Gen 6 MATH can take a scalar source, its source and
+          * destination offsets must be equal and we cannot ensure that.
           */
+         if (devinfo->gen == 6)
+            break;
+         /* fallthrough */
       case BRW_OPCODE_BFI1:
       case BRW_OPCODE_ASR:
       case BRW_OPCODE_SHL: