swr/rast: Add semantics for translating address
authorGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 9 Feb 2018 20:04:14 +0000 (14:04 -0600)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 16 Feb 2018 16:54:02 +0000 (10:54 -0600)
Added support for another full translation path in fetch jitter.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp

index 4e78098022fd4ff342aae91a6fbbe941b6a65b01..4f496343e96dae1a779cfd5ddb1a6d6c2c38e84d 100644 (file)
@@ -75,3 +75,4 @@ Value* pScatterStackSrc{ nullptr };
 Value* pScatterStackOffsets{ nullptr };
 
 
+virtual Value* TRANSLATE_ADDRESS(Value* address) { return address; }
index aa2d4c365717c6bc1956b09fc33fdcbe6f369a14..880aaf8d5437f4fb07731642b3cc858649fe5caa 100644 (file)
@@ -1830,12 +1830,16 @@ Value* FetchJit::GetSimdValid16bitIndices(Value* pIndices, Value* pLastIndex)
     Value* pZeroIndex = ALLOCA(mInt16Ty);
     STORE(C((uint16_t)0), pZeroIndex);
 
+    pLastIndex = TRANSLATE_ADDRESS(pLastIndex);
+
     // Load a SIMD of index pointers
     for(int64_t lane = 0; lane < mVWidth; lane++)
     {
         // Calculate the address of the requested index
         Value *pIndex = GEP(pIndices, C(lane));
 
+        pIndex = TRANSLATE_ADDRESS(pIndex);
+
         // check if the address is less than the max index, 
         Value* mask = ICMP_ULT(pIndex, pLastIndex);