swr/rast: Adding SCATTERPS functionality to BuilderGfxMem
authorAlok Hota <alok.hota@intel.com>
Mon, 25 Jun 2018 14:52:17 +0000 (09:52 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 28 Jun 2018 13:17:55 +0000 (08:17 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.cpp
src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h

index 8706bfa66bffe476c5d2494603060cf5d4ff40ac..df11914db134760e29a04a0c18023db8b228e083 100644 (file)
@@ -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)
     {
index a552ff9b260800141179c56a0ca83255f6d9b983..dd20c06afef75df414a1ce648d8aea84af0f6e02 100644 (file)
@@ -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,