[Beignet] [PATCH 1/2] GBE: fix ub1grf(nr, subnr) issue.

Ruiling Song ruiling.song at intel.com
Mon Sep 21 00:40:01 PDT 2015


suboffset() will not set .subnr correctly, as vec1() will get a horizontal
stride 0 register.

Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
 backend/src/backend/gen_register.hpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/backend/src/backend/gen_register.hpp b/backend/src/backend/gen_register.hpp
index 4f37e30..db16273 100644
--- a/backend/src/backend/gen_register.hpp
+++ b/backend/src/backend/gen_register.hpp
@@ -1019,7 +1019,13 @@ namespace gbe
     }
 
     static INLINE GenRegister ub1(uint32_t file, uint32_t nr, uint32_t subnr) {
-      return suboffset(retype(vec1(file, nr, 0), GEN_TYPE_UB), subnr);
+      return GenRegister(file,
+                         nr,
+                         subnr,
+                         GEN_TYPE_UB,
+                         GEN_VERTICAL_STRIDE_0,
+                         GEN_WIDTH_1,
+                         GEN_HORIZONTAL_STRIDE_0);
     }
 
     static INLINE GenRegister f1grf(uint32_t nr, uint32_t subnr) {
-- 
2.3.1



More information about the Beignet mailing list