summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer
diff options
context:
space:
mode:
authorAlok Hota <[email protected]>2018-06-25 09:52:17 -0500
committerTim Rowley <[email protected]>2018-06-28 08:17:55 -0500
commit83d3ddd0ec49efd02bdbfeb2b44ae9206c087d34 (patch)
tree01ead245d5dea460435182bd57752194fe14403c /src/gallium/drivers/swr/rasterizer
parent4509cdbb3731cf71cbf44e29a2fe1e6148dc9b4e (diff)
swr/rast: Adding SCATTERPS functionality to BuilderGfxMem
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp13
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h6
2 files changed, 19 insertions, 0 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 8706bfa66bf..df11914db13 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
@@ -108,6 +108,19 @@ namespace SwrJit
return vGather;
}
+ void BuilderGfxMem::SCATTERPS(
+ Value* pDst, Value* vSrc, Value* vOffsets, Value* vMask, JIT_MEM_CLIENT usage)
+ {
+
+ // address may be coming in as 64bit int now so get the pointer
+ if (pDst->getType() == mInt64Ty)
+ {
+ pDst = INT_TO_PTR(pDst, PointerType::get(mInt8Ty, 0));
+ }
+
+ Builder::SCATTERPS(pDst, vSrc, vOffsets, vMask, usage);
+ }
+
Value *BuilderGfxMem::OFFSET_TO_NEXT_COMPONENT(Value *base, Constant *offset)
{
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 a552ff9b260..dd20c06afef 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h
@@ -88,6 +88,12 @@ namespace SwrJit
uint8_t scale = 1,
JIT_MEM_CLIENT usage = MEM_CLIENT_INTERNAL);
+ virtual void SCATTERPS(Value* pDst,
+ Value* vSrc,
+ Value* vOffsets,
+ Value* vMask,
+ JIT_MEM_CLIENT usage = MEM_CLIENT_INTERNAL);
+
Value *TranslateGfxAddressForRead(Value * xpGfxAddress,
Type * PtrTy = nullptr,