From 840e8fc9203390615f051259efeab0f61f48bbfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 27 Oct 2014 23:42:41 -0700 Subject: [PATCH] i965: Don't copy propagate constants from sources with saturate MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We don't propagate the saturate bit and some instructions can't saturate at all. If the source has saturate set, just skip propagation. Signed-off-by: Kristian Høgsberg Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 e1989cb5e4c..611cff13846 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -425,6 +425,8 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) if (entry->src.file != IMM) return false; + if (entry->saturate) + return false; for (int i = inst->sources - 1; i >= 0; i--) { if (inst->src[i].file != GRF) -- 2.30.2