diff options
author | Matt Turner <[email protected]> | 2015-04-25 01:50:04 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-04-25 02:15:35 -0700 |
commit | 7f5a8ac155283e78df2da5b172a65361a80d38b6 (patch) | |
tree | 94d17eb37076f0f4dc08d61dc715b99b44dd6c72 | |
parent | 67ba388dc06456409762e66ed7ccdffebf956459 (diff) |
i965/fs: Disallow constant propagation into POW on Gen 6.
Fixes assertion failures in three piglit tests on Gen 6 since commit
0087cf23e.
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 9542d6a20ce..c9ce2bd4513 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -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: |