Mesa (master): i965: Align the start of attribute interp coefficients in FS to use PLN.
Eric Anholt
anholt at kemper.freedesktop.org
Tue Sep 7 17:34:14 UTC 2010
Module: Mesa
Branch: master
Commit: 3fb5377ba57aea356a81c521c0cf1975dc290b61
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3fb5377ba57aea356a81c521c0cf1975dc290b61
Author: Eric Anholt <eric at anholt.net>
Date: Fri Sep 3 17:21:49 2010 -0700
i965: Align the start of attribute interp coefficients in FS to use PLN.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index f0af874..b31d445 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1514,6 +1514,14 @@ fs_visitor::assign_curb_setup()
c->prog_data.first_curbe_grf = c->key.nr_payload_regs;
c->prog_data.curb_read_length = ALIGN(c->prog_data.nr_params, 8) / 8;
+ if (intel->gen == 5 && (c->prog_data.first_curbe_grf +
+ c->prog_data.curb_read_length) & 1) {
+ /* Align the start of the interpolation coefficients so that we can use
+ * the PLN instruction.
+ */
+ c->prog_data.first_curbe_grf++;
+ }
+
/* Map the offsets in the UNIFORM file to fixed HW regs. */
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
More information about the mesa-commit
mailing list