aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorGeorge Kyriazis <[email protected]>2018-02-09 14:04:14 -0600
committerGeorge Kyriazis <[email protected]>2018-02-16 10:54:02 -0600
commit45df1a65200fafc293129a7473a0a6ffef92017c (patch)
tree7a0b6f85850945bffe953ce79c07bf6420c1fa95 /src/gallium
parentc09483cf0a21a68c00a8daf080a2e7de17ac3039 (diff)
swr/rast: Add semantics for translating address
Added support for another full translation path in fetch jitter. Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h1
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
index 4e78098022f..4f496343e96 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
@@ -75,3 +75,4 @@ Value* pScatterStackSrc{ nullptr };
Value* pScatterStackOffsets{ nullptr };
+virtual Value* TRANSLATE_ADDRESS(Value* address) { return address; }
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
index aa2d4c36571..880aaf8d543 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
@@ -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);