Mesa (master): i965/fs: Add LINTERP's src0 to fs_inst::regs_read().

Matt Turner mattst88 at kemper.freedesktop.org
Tue Apr 21 17:04:07 UTC 2015


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

Author: Matt Turner <mattst88 at gmail.com>
Date:   Sat Apr 11 15:00:19 2015 -0700

i965/fs: Add LINTERP's src0 to fs_inst::regs_read().

LINTERP's src0 is PLN's src1, and PLN's src1 reads exec_size / 4
registers.

Having that information lets us drop the delta_x/y special case code in
split_virtual_grfs().

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 7cc88ea..5cdc19c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -953,6 +953,8 @@ fs_inst::regs_read(int arg) const
       return mlen;
    } else if (opcode == FS_OPCODE_INTERPOLATE_AT_PER_SLOT_OFFSET && arg == 0) {
       return mlen;
+   } else if (opcode == FS_OPCODE_LINTERP && arg == 0) {
+      return exec_size / 4;
    }
 
    switch (src[arg].file) {
@@ -1984,17 +1986,6 @@ fs_visitor::split_virtual_grfs()
       }
    }
 
-   if (brw->has_pln &&
-       this->delta_x[BRW_WM_PERSPECTIVE_PIXEL_BARYCENTRIC].file == GRF) {
-      /* PLN opcodes rely on the delta_xy being contiguous.  We only have to
-       * check this for BRW_WM_PERSPECTIVE_PIXEL_BARYCENTRIC, because prior to
-       * Gen6, that was the only supported interpolation mode, and since Gen6,
-       * delta_x and delta_y are in fixed hardware registers.
-       */
-      int vgrf = this->delta_x[BRW_WM_PERSPECTIVE_PIXEL_BARYCENTRIC].reg;
-      split_points[vgrf_to_reg[vgrf] + 1] = false;
-   }
-
    foreach_block_and_inst(block, fs_inst, inst, cfg) {
       if (inst->dst.file == GRF) {
          int reg = vgrf_to_reg[inst->dst.reg] + inst->dst.reg_offset;




More information about the mesa-commit mailing list