aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
diff options
context:
space:
mode:
authorAlok Hota <[email protected]>2018-06-25 09:52:16 -0500
committerTim Rowley <[email protected]>2018-06-28 08:17:33 -0500
commit4509cdbb3731cf71cbf44e29a2fe1e6148dc9b4e (patch)
treebbb79724c6e8384ec5436cf3033b2cb5abb287c1 /src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
parentdc6665422a8fcfce92b8136310f05351aa0cbd5b (diff)
swr/rast: Adding Read/Write specifier to TranslateGfxAddress stack
- Removing unused generic translate function - Requiring read/write specifier in builder_gfx_mem Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
index 3f4b090cfc8..8706bfa66bf 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
@@ -40,7 +40,8 @@ namespace SwrJit
BuilderGfxMem::BuilderGfxMem(JitManager *pJitMgr) : Builder(pJitMgr)
{
mpTranslationFuncTy = nullptr;
- mpfnTranslateGfxAddress = nullptr;
+ mpfnTranslateGfxAddressForRead = nullptr;
+ mpfnTranslateGfxAddressForWrite = nullptr;
mpParamSimDC = nullptr;
}
@@ -221,7 +222,7 @@ namespace SwrJit
return Builder::MASKED_LOAD(Ptr, Align, Mask, PassThru, Name, Ty, usage);
}
- Value *BuilderGfxMem::TranslateGfxAddress(Value * xpGfxAddress,
+ Value *BuilderGfxMem::TranslateGfxAddressForRead(Value * xpGfxAddress,
Type * PtrTy,
const Twine &Name,
JIT_MEM_CLIENT /* usage */)
@@ -232,4 +233,17 @@ namespace SwrJit
}
return INT_TO_PTR(xpGfxAddress, PtrTy, Name);
}
+
+ Value *BuilderGfxMem::TranslateGfxAddressForWrite(Value * xpGfxAddress,
+ Type * PtrTy,
+ const Twine &Name,
+ JIT_MEM_CLIENT /* usage */)
+ {
+ if (PtrTy == nullptr)
+ {
+ PtrTy = mInt8PtrTy;
+ }
+ return INT_TO_PTR(xpGfxAddress, PtrTy, Name);
+ }
+
} // namespace SwrJit