[Mesa-dev] [PATCH 15/31] swr/rast: Fix avx version of GATHERPS
George Kyriazis
george.kyriazis at intel.com
Tue Feb 13 22:42:33 UTC 2018
GEP was given the wrong type, and asserting.
---
src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp
index 98d4354..0c9e279 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp
@@ -160,12 +160,13 @@ namespace SwrJit
vGather = VUNDEF_F();
Value *vScaleVec = VIMMED1((uint32_t)scale);
Value *vOffsets = MUL(vIndices, vScaleVec);
+ Value *pBasePtr = BITCAST(pBase, PointerType::get(mInt8Ty, 0));
for (uint32_t i = 0; i < mVWidth; ++i)
{
// single component byte index
Value *offset = VEXTRACT(vOffsets, C(i));
// byte pointer to component
- Value *loadAddress = GEP(pBase, offset);
+ Value *loadAddress = GEP(pBasePtr, offset);
loadAddress = BITCAST(loadAddress, PointerType::get(mFP32Ty, 0));
// pointer to the value to load if we're masking off a component
Value *maskLoadAddress = GEP(vSrcPtr, { C(0), C(i) });
--
2.7.4
More information about the mesa-dev
mailing list