summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2015-04-24 13:14:56 -0700
committerMatt Turner <mattst88@gmail.com>2015-04-24 16:25:02 -0700
commit51c61fff8f46472820ac413ad22e9f3edf670396 (patch)
treecc9e797a6a10dfbe4bc49a22a542c540d461f1c0 /src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
parente17018589651d449bbef5f98a6c2f65cc3ca70e5 (diff)
downloadexternal_mesa3d-51c61fff8f46472820ac413ad22e9f3edf670396.zip
external_mesa3d-51c61fff8f46472820ac413ad22e9f3edf670396.tar.gz
external_mesa3d-51c61fff8f46472820ac413ad22e9f3edf670396.tar.bz2
i965/fs: Don't constant propagate into integer math instructions.
Constant combining won't promote non-floats, so this isn't safe. Fixes regressions since commit 0087cf23e.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp6
1 files changed, 5 insertions, 1 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 af54deb..9542d6a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -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.
*/