Mesa (master): i965: Don' t copy propagate constants from sources with saturate

Kristian Høgsberg krh at kemper.freedesktop.org
Wed Dec 10 20:45:04 UTC 2014


Module: Mesa
Branch: master
Commit: 840e8fc9203390615f051259efeab0f61f48bbfc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=840e8fc9203390615f051259efeab0f61f48bbfc

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Mon Oct 27 23:42:41 2014 -0700

i965: Don't copy propagate constants from sources with saturate

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 at bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 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 e1989cb..611cff1 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)




More information about the mesa-commit mailing list