[Mesa-dev] [PATCH v2 12/15] SQUASH: i965/fs_inst::is_copy_payload: Support the new-style LOAD_PAYLOAD

Jason Ekstrand jason at jlekstrand.net
Tue May 5 18:28:15 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 e7095c9..d0a3bdd 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -527,9 +527,13 @@ fs_inst::is_copy_payload(const brw::simple_allocator &grf_alloc) const
    if (grf_alloc.sizes[reg.reg] != this->regs_written)
       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.6



More information about the mesa-dev mailing list