summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr
diff options
context:
space:
mode:
authorGeorge Kyriazis <[email protected]>2018-03-01 12:39:18 -0600
committerGeorge Kyriazis <[email protected]>2018-03-09 09:36:42 -0600
commit379e00dc273ce8989d56fc7db531c84061710d65 (patch)
tree88bdf0c03105534d060e5bbfbd12b94eab1dc182 /src/gallium/drivers/swr
parent3f7ce10b3eca0f3c3dbd01c76c35d1af8627664d (diff)
swr/rast: Refactor memory gather operations
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h3
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp7
2 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
index b3a0e2b09fe..a50ecc088bc 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
@@ -52,9 +52,10 @@ void Gather4(const SWR_FORMAT format, Value* pSrcBase, Value* byteOffsets,
virtual Value* OFFSET_TO_NEXT_COMPONENT(Value* base, Constant *offset);
virtual Value *GATHERPS(Value *src, Value *pBase, Value *indices, Value *mask, uint8_t scale = 1);
+
Value *GATHERPS_16(Value *src, Value *pBase, Value *indices, Value *mask, uint8_t scale = 1);
-virtual void GATHER4PS(const SWR_FORMAT_INFO &info, Value* pSrcBase, Value* byteOffsets,
+void GATHER4PS(const SWR_FORMAT_INFO &info, Value* pSrcBase, Value* byteOffsets,
Value* mask, Value* vGatherComponents[], bool bPackedOutput);
virtual Value *GATHERDD(Value* src, Value* pBase, Value* indices, Value* mask, uint8_t scale = 1);
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
index f1dc00293af..2ffce1bcff4 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
@@ -1333,7 +1333,7 @@ void FetchJit::JitGatherVertices(const FETCH_COMPILE_STATE &fetchState,
// But, we know that elements must be aligned for FETCH. :)
// Right shift the offset by a bit and then scale by 2 to remove the sign extension.
Value *shiftedOffsets16 = LSHR(vOffsets16, 1);
- pVtxSrc2[currentVertexElement++] = GATHERPS_16(gatherSrc16, pStreamBase, shiftedOffsets16, vGatherMask16, 2);
+ pVtxSrc2[currentVertexElement++] = GATHERPS_16(gatherSrc16, pStreamBaseGFX, shiftedOffsets16, vGatherMask16, 2);
}
else
{
@@ -1350,9 +1350,6 @@ void FetchJit::JitGatherVertices(const FETCH_COMPILE_STATE &fetchState,
currentVertexElement = 0;
}
}
-
- // offset base to the next component in the vertex to gather
- pStreamBase = GEP(pStreamBase, C((char)4));
#else
if (isComponentEnabled(compMask, i))
{
@@ -1383,11 +1380,11 @@ void FetchJit::JitGatherVertices(const FETCH_COMPILE_STATE &fetchState,
currentVertexElement = 0;
}
}
+#endif
// offset base to the next component in the vertex to gather
pStreamBase = GEP(pStreamBase, C((char)4));
pStreamBaseGFX = ADD(pStreamBaseGFX, C((int64_t)4));
-#endif
}
}
break;