diff options
author | Tim Rowley <[email protected]> | 2016-02-22 11:00:07 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-03-25 14:26:17 -0500 |
commit | 7ead4959a5a1b5687458173490b2eec91ef6193b (patch) | |
tree | b03e9cbe2b871f49ae6bbfc25cc35bc2f586afe0 | |
parent | 136988b42b6c7bd9649fd13d5a6117b02a41e52a (diff) |
swr: [rasterizer jitter] Fix type mismatch on select args for SCATTERPS
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp index 5394fc7bf5a..2ff77bc30ec 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp @@ -1286,8 +1286,10 @@ void Builder::SCATTERPS(Value* pDst, Value* vSrc, Value* vOffsets, Value* vMask) { Value* pStack = STACKSAVE(); + Type* pSrcTy = vSrc->getType()->getVectorElementType(); + // allocate tmp stack for masked off lanes - Value* vTmpPtr = ALLOCA(vSrc->getType()->getVectorElementType()); + Value* vTmpPtr = ALLOCA(pSrcTy); Value *mask = MASK(vMask); for (uint32_t i = 0; i < JM()->mVWidth; ++i) @@ -1295,7 +1297,7 @@ void Builder::SCATTERPS(Value* pDst, Value* vSrc, Value* vOffsets, Value* vMask) Value *offset = VEXTRACT(vOffsets, C(i)); // byte pointer to component Value *storeAddress = GEP(pDst, offset); - storeAddress = BITCAST(storeAddress, PointerType::get(mFP32Ty, 0)); + storeAddress = BITCAST(storeAddress, PointerType::get(pSrcTy, 0)); Value *selMask = VEXTRACT(mask, C(i)); Value *srcElem = VEXTRACT(vSrc, C(i)); // switch in a safe address to load if we're trying to access a vertex |