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 <[email protected]>
---
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
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev