gallivm: fix buffer_type for LLVM 15
Fixes
deqp-vk: /home/airlied/devel/llvm-project/llvm/include/llvm/IR/Instructions.h:961: static llvm::GetElementPtrInst* llvm::GetElementPtrInst::Create(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&, llvm::Instruction*): Assertion `cast<PointerType>(Ptr->getType()->getScalarType()) ->isOpaqueOrPointeeTypeMatches(PointeeType)' failed.
Fixes: 1b8c4931df ("gallivm: fixes for LLVM-15 opaque pointers in lp_bld_jit_types.c")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18816>
This commit is contained in:
@@ -71,7 +71,7 @@ lp_llvm_buffer_member(struct gallivm_state *gallivm,
|
||||
indices[2] = lp_build_const_int32(gallivm, member_index);
|
||||
|
||||
LLVMTypeRef buffer_type = lp_build_create_jit_buffer_type(gallivm);
|
||||
LLVMTypeRef buffers_type = LLVMArrayType(buffer_type, LP_MAX_TGSI_CONST_BUFFERS);
|
||||
LLVMTypeRef buffers_type = LLVMArrayType(buffer_type, buffers_limit);
|
||||
LLVMValueRef ptr = LLVMBuildGEP2(builder, buffers_type, buffers_ptr, indices, ARRAY_SIZE(indices), "");
|
||||
|
||||
LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(buffer_type, member_index);
|
||||
|
||||
Reference in New Issue
Block a user