[Beignet] [PATCH] Fix bug: Initialize bti of LoadInstuctionPattern::shootByteGatherMsg().

yan.wang at linux.intel.com yan.wang at linux.intel.com
Thu Nov 24 06:38:01 UTC 2016


From: Yan Wang <yan.wang at linux.intel.com>

If it isn't initialized, Luxmark hotel scene will display wrong.
---
 backend/src/backend/gen_insn_selection.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
index c14e0bc..4cdf2cd 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -4487,8 +4487,8 @@ extern bool OCL_DEBUGINFO; // first defined by calling BVAR in program.cpp
       using namespace ir;
       unsigned addrBytes = typeSize(addr.type);
       AddressMode AM = insn.getAddressMode();
-      vector<GenRegister> btiTemp;
       if (AM == AM_DynamicBti || AM == AM_StaticBti) {
+        vector<GenRegister> btiTemp = sel.getBTITemps(AM);
         if (AM == AM_DynamicBti) {
           Register btiReg = insn.getBtiReg();
           sel.BYTE_GATHER(dst, addr, elemSize, sel.selReg(btiReg, TYPE_U32), btiTemp);
@@ -4499,6 +4499,7 @@ extern bool OCL_DEBUGINFO; // first defined by calling BVAR in program.cpp
       } else if (addrSpace == ir::MEM_LOCAL || isReadConstantLegacy(insn)) {
         unsigned bti = addrSpace == ir::MEM_CONSTANT ? BTI_CONSTANT : 0xfe;
         GenRegister addrDW = addr;
+        vector<GenRegister> btiTemp;
         if (addrBytes == 8) {
           addrDW = convertU64ToU32(sel, addr);
         }
-- 
2.7.4



More information about the Beignet mailing list