From 3416cc5f90865bc87c25cd18221e790418b9dbed Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sat, 11 Apr 2026 16:58:11 +0200 Subject: [PATCH] llvmpipe: Remove lp_llvm_descriptor_base Part-of: --- .../auxiliary/gallivm/lp_bld_jit_types.c | 24 ------------------- .../auxiliary/gallivm/lp_bld_jit_types.h | 5 ---- 2 files changed, 29 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c index acda3fb66ad..fd9026f9b5a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c @@ -54,30 +54,6 @@ lp_build_create_jit_buffer_type(struct gallivm_state *gallivm) return buffer_type; } -LLVMValueRef -lp_llvm_descriptor_base(struct gallivm_state *gallivm, - LLVMValueRef buffers_ptr, - LLVMValueRef index, unsigned buffers_limit) -{ - LLVMBuilderRef builder = gallivm->builder; - - LLVMValueRef desc_set_index = LLVMBuildExtractValue(builder, index, 0, ""); - if (LLVMGetTypeKind(LLVMTypeOf(desc_set_index)) == LLVMVectorTypeKind) - desc_set_index = LLVMBuildExtractElement(builder, desc_set_index, lp_build_const_int32(gallivm, 0), ""); - LLVMValueRef desc_set_base = lp_llvm_buffer_base(gallivm, buffers_ptr, desc_set_index, buffers_limit); - - LLVMValueRef binding_index = LLVMBuildExtractValue(builder, index, 1, ""); - if (LLVMGetTypeKind(LLVMTypeOf(binding_index)) == LLVMVectorTypeKind) - binding_index = LLVMBuildExtractElement(builder, binding_index, lp_build_const_int32(gallivm, 0), ""); - - LLVMValueRef binding_offset = LLVMBuildMul(builder, binding_index, lp_build_const_int32(gallivm, sizeof(struct lp_descriptor)), ""); - LLVMTypeRef int64_type = LLVMInt64TypeInContext(gallivm->context); - binding_offset = LLVMBuildIntCast2(builder, binding_offset, int64_type, false, ""); - - LLVMValueRef desc_ptr = LLVMBuildPtrToInt(builder, desc_set_base, int64_type, ""); - return LLVMBuildAdd(builder, desc_ptr, binding_offset, ""); -} - static LLVMValueRef lp_llvm_buffer_member(struct gallivm_state *gallivm, LLVMValueRef buffers_ptr, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.h b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.h index 72337055fc6..09c74fa80ca 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.h @@ -44,11 +44,6 @@ enum { LP_JIT_BUFFER_NUM_FIELDS, }; -LLVMValueRef -lp_llvm_descriptor_base(struct gallivm_state *gallivm, - LLVMValueRef buffers_ptr, - LLVMValueRef index, unsigned buffers_limit); - LLVMValueRef lp_llvm_buffer_base(struct gallivm_state *gallivm, LLVMValueRef buffers_ptr,