mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
ac/llvm: remove almost duplicated ac_build_varying_gather_values
Reviewed-by: Pierre-Eric Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
This commit is contained in:
parent
d692ce4b34
commit
235e32d560
3 changed files with 1 additions and 25 deletions
|
|
@ -492,27 +492,6 @@ LLVMValueRef ac_build_vote_any(struct ac_llvm_context *ctx, LLVMValueRef value)
|
|||
"");
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_varying_gather_values(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count, unsigned component)
|
||||
{
|
||||
LLVMValueRef vec = NULL;
|
||||
|
||||
if (value_count == 1) {
|
||||
return values[component];
|
||||
} else if (!value_count)
|
||||
UNREACHABLE("value_count is 0");
|
||||
|
||||
for (unsigned i = component; i < value_count + component; i++) {
|
||||
LLVMValueRef value = values[i];
|
||||
|
||||
if (i == component)
|
||||
vec = LLVMGetUndef(LLVMVectorType(LLVMTypeOf(value), value_count));
|
||||
LLVMValueRef index = LLVMConstInt(ctx->i32, i - component, false);
|
||||
vec = LLVMBuildInsertElement(ctx->builder, vec, value, index, "");
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_gather_values_extended(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count, unsigned value_stride,
|
||||
bool always_vector)
|
||||
|
|
|
|||
|
|
@ -184,9 +184,6 @@ LLVMValueRef ac_build_vote_all(struct ac_llvm_context *ctx, LLVMValueRef value);
|
|||
|
||||
LLVMValueRef ac_build_vote_any(struct ac_llvm_context *ctx, LLVMValueRef value);
|
||||
|
||||
LLVMValueRef ac_build_varying_gather_values(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count, unsigned component);
|
||||
|
||||
LLVMValueRef ac_build_gather_values_extended(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count, unsigned value_stride,
|
||||
bool always_vector);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ static LLVMValueRef si_nir_load_tcs_varyings(struct ac_shader_abi *abi, LLVMType
|
|||
value[i] = LLVMBuildBitCast(ctx->ac.builder, value[i], type, "");
|
||||
}
|
||||
|
||||
return ac_build_varying_gather_values(&ctx->ac, value, num_components, component);
|
||||
return ac_build_gather_values(&ctx->ac, value + component, num_components);
|
||||
}
|
||||
|
||||
void si_llvm_ls_build_end(struct si_shader_context *ctx)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue