[Mesa-dev] [PATCH 11/13] SQUASH: i965/fs_inst::is_copy_payload: Support the new-style LOAD_PAYLOAD

Jason Ekstrand jason at jlekstrand.net
Wed Apr 1 18:19:22 PDT 2015


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

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index bc45a38..fac507e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -517,9 +517,13 @@ fs_inst::is_copy_payload() const
    if (reg.file != GRF || reg.reg_offset != 0 || reg.stride == 0)
       return false;
 
-   for (int i = 1; i < this->sources; i++)
-      if (!this->src[i].equals(::offset(reg, i)))
+   for (int i = 0; i < this->sources; i++) {
+      reg.type = this->src[i].type;
+      reg.width = this->src[i].width;
+      if (!this->src[i].equals(reg))
          return false;
+      reg = ::offset(reg, 1);
+   }
 
    return true;
 }
-- 
2.3.4



More information about the mesa-dev mailing list