Mesa (master): intel/fs: Generalize fs_reg::is_contiguous() to register files other than VGRF.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 17 22:11:42 UTC 2020


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

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Thu Jan  2 15:32:56 2020 -0800

intel/fs: Generalize fs_reg::is_contiguous() to register files other than VGRF.

No functional nor shader-db changes.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/intel/compiler/brw_fs.cpp | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index dfe5b2a7282..ef2cd177d66 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -564,7 +564,22 @@ fs_reg::negative_equals(const fs_reg &r) const
 bool
 fs_reg::is_contiguous() const
 {
-   return stride == 1;
+   switch (file) {
+   case ARF:
+   case FIXED_GRF:
+      return hstride == BRW_HORIZONTAL_STRIDE_1 &&
+             vstride == width + hstride;
+   case MRF:
+   case VGRF:
+   case ATTR:
+      return stride == 1;
+   case UNIFORM:
+   case IMM:
+   case BAD_FILE:
+      return true;
+   }
+
+   unreachable("Invalid register file");
 }
 
 unsigned



More information about the mesa-commit mailing list