[Mesa-dev] [WIP 07/25] i965/fs: Prepare live interval analysis for double precision

Topi Pohjolainen topi.pohjolainen at intel.com
Thu Oct 16 05:24:19 PDT 2014


TODO: Prevent double precision being split between push and pull. Perhaps
      it would be easiest just to force them into pull.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index bec7418..3b2c2f9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2129,8 +2129,13 @@ fs_visitor::assign_constant_locations()
             continue;
 
          int constant_nr = inst->src[i].reg + inst->src[i].reg_offset;
-         if (constant_nr >= 0 && constant_nr < (int) uniforms)
+         if (constant_nr >= 0 && constant_nr < (int) uniforms) {
             is_live[constant_nr] = true;
+
+            /* Double precision constants consume two consecutive slots. */
+            if (inst->src[i].type == BRW_REGISTER_TYPE_DF)
+               is_live[constant_nr + 1] = true;
+         }
       }
    }
 
-- 
1.8.3.1



More information about the mesa-dev mailing list