i965: Don't copy propagate constants from sources with saturate
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 28 Oct 2014 06:42:41 +0000 (23:42 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 10 Dec 2014 20:28:32 +0000 (12:28 -0800)
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 <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp

index e1989cb5e4cd0b200a9a40d40a7a12a107fe5ba8..611cff13846a6da7309e874a3f54e08d11bc8967 100644 (file)
@@ -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)