From d159b0bf34d1a591cf6d534952ebb80c7445062d Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Fri, 20 Jan 2017 18:32:14 -0600 Subject: swr: [rasterizer jitter] Fix issues with stream-out on llvm>=3.8 Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/rasterizer/jitter/builder.cpp | 4 +--- src/gallium/drivers/swr/rasterizer/jitter/builder.h | 2 -- src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp | 6 +++++- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp index 4fc5af7f446..3b86895de0b 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp @@ -56,8 +56,6 @@ namespace SwrJit mInt16PtrTy = PointerType::get(mInt16Ty, 0); mInt32PtrTy = PointerType::get(mInt32Ty, 0); mInt64Ty = Type::getInt64Ty(pJitMgr->mContext); - mV4FP32Ty = StructType::get(pJitMgr->mContext, std::vector(4, mFP32Ty), false); // vector4 float type (represented as structure) - mV4Int32Ty = StructType::get(pJitMgr->mContext, std::vector(4, mInt32Ty), false); // vector4 int type mSimdInt1Ty = VectorType::get(mInt1Ty, mVWidth); mSimdInt16Ty = VectorType::get(mInt16Ty, mVWidth); mSimdInt32Ty = VectorType::get(mInt32Ty, mVWidth); @@ -65,7 +63,7 @@ namespace SwrJit mSimdFP16Ty = VectorType::get(mFP16Ty, mVWidth); mSimdFP32Ty = VectorType::get(mFP32Ty, mVWidth); mSimdVectorTy = ArrayType::get(mSimdFP32Ty, 4); - mSimdVectorTRTy = StructType::get(pJitMgr->mContext, std::vector(5, mSimdFP32Ty), false); + mSimdVectorTRTy = ArrayType::get(mSimdFP32Ty, 5); if (sizeof(uint32_t*) == 4) { diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder.h b/src/gallium/drivers/swr/rasterizer/jitter/builder.h index 515560e0597..6627b33e02f 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder.h +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder.h @@ -69,8 +69,6 @@ namespace SwrJit Type* mSimdIntPtrTy; Type* mSimdVectorTy; Type* mSimdVectorTRTy; - StructType* mV4FP32Ty; - StructType* mV4Int32Ty; #include "builder_gen.h" #include "builder_x86.h" diff --git a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp index 793e5ec01ea..3d393387bb0 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp @@ -159,7 +159,11 @@ struct StreamOutJit : public Builder // cast input to <4xfloat> Value* src = BITCAST(vpackedAttrib, simd4Ty); - CALL(maskStore, {pOut, ToMask(packedMask), src}); + + // cast mask to <4xint> + Value* mask = ToMask(packedMask); + mask = BITCAST(mask, VectorType::get(IRB()->getInt32Ty(), 4)); + CALL(maskStore, {pOut, mask, src}); } // increment SO buffer -- cgit v1.2.3