Mesa (master): i965/fs: Use exec_size for determining regs read/ written and partial writes

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Jun 30 23:48:23 UTC 2015


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Thu Jun 18 12:50:09 2015 -0700

i965/fs: Use exec_size for determining regs read/written and partial writes

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Acked-by: Francisco Jerez <currojerez at riseup.net>

---

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

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 8d99abc..c11e3f3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -101,7 +101,7 @@ fs_inst::init(enum opcode opcode, uint8_t exec_size, const fs_reg &dst,
    case MRF:
    case ATTR:
       this->regs_written =
-         DIV_ROUND_UP(MAX2(dst.width * dst.stride, 1) * type_sz(dst.type), 32);
+         DIV_ROUND_UP(MAX2(exec_size * dst.stride, 1) * type_sz(dst.type), 32);
       break;
    case BAD_FILE:
       this->regs_written = 0;
@@ -675,7 +675,7 @@ bool
 fs_inst::is_partial_write() const
 {
    return ((this->predicate && this->opcode != BRW_OPCODE_SEL) ||
-           (this->dst.width * type_sz(this->dst.type)) < 32 ||
+           (this->exec_size * type_sz(this->dst.type)) < 32 ||
            !this->dst.is_contiguous());
 }
 
@@ -735,7 +735,7 @@ fs_inst::regs_read(int arg) const
       if (src[arg].stride == 0) {
          return 1;
       } else {
-         int size = components * src[arg].width * type_sz(src[arg].type);
+         int size = components * this->exec_size * type_sz(src[arg].type);
          return DIV_ROUND_UP(size * src[arg].stride, 32);
       }
    case MRF:




More information about the mesa-commit mailing list