mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 06:40:32 +01:00
ac,radv: remove unused inputs array and VS input code
The previous commit stopped using "inputs". "load_layer_id" has always been broken and it was probably unused anyway. Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>
This commit is contained in:
parent
3fb229e010
commit
69e96cfc0d
3 changed files with 0 additions and 45 deletions
|
|
@ -3569,9 +3569,6 @@ static void visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins
|
|||
case nir_intrinsic_load_frag_shading_rate:
|
||||
result = emit_load_frag_shading_rate(ctx);
|
||||
break;
|
||||
case nir_intrinsic_load_layer_id:
|
||||
result = ctx->abi->inputs[ac_llvm_reg_index_soa(VARYING_SLOT_LAYER, 0)];
|
||||
break;
|
||||
case nir_intrinsic_load_front_face:
|
||||
result = emit_i2b(&ctx->ac, ac_get_arg(&ctx->ac, ctx->args->front_face));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ enum ac_descriptor_type
|
|||
*/
|
||||
struct ac_shader_abi {
|
||||
LLVMValueRef outputs[AC_LLVM_MAX_OUTPUTS * 4];
|
||||
LLVMValueRef inputs[AC_LLVM_MAX_OUTPUTS * 4];
|
||||
|
||||
/* These input registers sometimes need to be fixed up. */
|
||||
LLVMValueRef vertex_id;
|
||||
|
|
|
|||
|
|
@ -805,38 +805,6 @@ load_vs_input(struct radv_shader_context *ctx, unsigned driver_location, LLVMTyp
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_vs_input_decl(struct radv_shader_context *ctx, struct nir_variable *variable)
|
||||
{
|
||||
unsigned attrib_count = glsl_count_attribute_slots(variable->type, true);
|
||||
enum glsl_base_type var_type = glsl_get_base_type(variable->type);
|
||||
LLVMTypeRef type;
|
||||
|
||||
switch (var_type) {
|
||||
case GLSL_TYPE_FLOAT16:
|
||||
type = ctx->ac.f16;
|
||||
break;
|
||||
case GLSL_TYPE_UINT16:
|
||||
case GLSL_TYPE_INT16:
|
||||
type = ctx->ac.i16;
|
||||
break;
|
||||
default:
|
||||
type = ctx->ac.i32;
|
||||
break;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < attrib_count; ++i) {
|
||||
unsigned driver_location = variable->data.location + i;
|
||||
LLVMValueRef output[4];
|
||||
|
||||
load_vs_input(ctx, driver_location, type, output);
|
||||
|
||||
for (unsigned chan = 0; chan < 4; chan++) {
|
||||
ctx->abi.inputs[ac_llvm_reg_index_soa(driver_location, chan)] = output[chan];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static LLVMValueRef
|
||||
radv_load_vs_inputs(struct ac_shader_abi *abi, unsigned driver_location, unsigned component,
|
||||
unsigned num_components, unsigned vertex_index, LLVMTypeRef type)
|
||||
|
|
@ -852,13 +820,6 @@ radv_load_vs_inputs(struct ac_shader_abi *abi, unsigned driver_location, unsigne
|
|||
return ac_build_varying_gather_values(&ctx->ac, values, num_components, component);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_vs_inputs(struct radv_shader_context *ctx, struct nir_shader *nir)
|
||||
{
|
||||
nir_foreach_shader_in_variable (variable, nir)
|
||||
handle_vs_input_decl(ctx, variable);
|
||||
}
|
||||
|
||||
static void
|
||||
prepare_interp_optimize(struct radv_shader_context *ctx, struct nir_shader *nir)
|
||||
{
|
||||
|
|
@ -2612,8 +2573,6 @@ ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm, struct nir_shader *co
|
|||
|
||||
if (shaders[shader_idx]->info.stage == MESA_SHADER_FRAGMENT)
|
||||
prepare_interp_optimize(&ctx, shaders[shader_idx]);
|
||||
else if (shaders[shader_idx]->info.stage == MESA_SHADER_VERTEX)
|
||||
handle_vs_inputs(&ctx, shaders[shader_idx]);
|
||||
else if (shaders[shader_idx]->info.stage == MESA_SHADER_GEOMETRY)
|
||||
prepare_gs_input_vgprs(&ctx, shader_count >= 2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue