From 4f0df5e2f7023cff6ce81fe26f40ac3dbf2bbc45 Mon Sep 17 00:00:00 2001 From: George Kyriazis Date: Thu, 29 Mar 2018 14:43:06 -0500 Subject: [PATCH] swr/rast: Adding translate call to builder_gfx_mem. Reviewed-by: Bruce Cherniak --- .../drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp | 5 +++++ src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h | 2 ++ 2 files changed, 7 insertions(+) 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 e097bd1f6f7..38ac8253e59 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp @@ -133,4 +133,9 @@ namespace SwrJit return Builder::LOAD(BasePtr, offset, name); } + Value* BuilderGfxMem::TranlsateGfxAddress(Value* xpGfxAddress) + { + return INT_TO_PTR(xpGfxAddress, PointerType::get(mInt8Ty, 0)); + } + } diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h index 837de444306..a1c5f46c700 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h @@ -51,6 +51,8 @@ namespace SwrJit virtual Value *GATHERDD(Value* src, Value* pBase, Value* indices, Value* mask, uint8_t scale = 1, JIT_MEM_CLIENT usage = MEM_CLIENT_INTERNAL); + Value* TranlsateGfxAddress(Value* xpGfxAddress); + protected: void AssertGFXMemoryParams(Value* ptr, Builder::JIT_MEM_CLIENT usage); -- 2.30.2