Mesa (master): swr: [rasterizer jitter] fix assert in AVX implementation of MASKLOADD
Tim Rowley
torowley at kemper.freedesktop.org
Thu May 19 21:33:51 UTC 2016
Module: Mesa
Branch: master
Commit: 6deb9f7f2c186655420c8249f30f70f24cc39080
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6deb9f7f2c186655420c8249f30f70f24cc39080
Author: Tim Rowley <timothy.o.rowley at intel.com>
Date: Wed May 11 18:05:23 2016 -0600
swr: [rasterizer jitter] fix assert in AVX implementation of MASKLOADD
llvm changed the mask type to vector of ints with 3.8.
Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
---
src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | 9 +++++++--
1 file changed, 7 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 3a304ec..7da4c02 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp
@@ -350,9 +350,14 @@ Value *Builder::MASKLOADD(Value* src,Value* mask)
}
else
{
+ // maskload intrinsic expects integer mask operand in llvm >= 3.8
+#if (LLVM_VERSION_MAJOR > 3) || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 8)
+ mask = BITCAST(mask,VectorType::get(mInt32Ty,mVWidth));
+#else
+ mask = BITCAST(mask,VectorType::get(mFP32Ty,mVWidth));
+#endif
Function *func = Intrinsic::getDeclaration(JM()->mpCurrentModule,Intrinsic::x86_avx_maskload_ps_256);
- Value* fMask = BITCAST(mask,VectorType::get(mInt32Ty,mVWidth));
- vResult = BITCAST(CALL(func,{src,fMask}), VectorType::get(mInt32Ty,mVWidth));
+ vResult = BITCAST(CALL(func,{src,mask}), VectorType::get(mInt32Ty,mVWidth));
}
return vResult;
}
More information about the mesa-commit
mailing list