From: Timur Kristóf Date: Tue, 18 Feb 2020 14:55:54 +0000 (+0100) Subject: aco: Use mesa shader stage when loading inputs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f53d31fb9b27b490a8773173707b244c5826b5a3;p=mesa.git aco: Use mesa shader stage when loading inputs. This makes it more clear which stages should load these inputs. Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Part-of: --- diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index a1c3568bcde..63debb21b12 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -3160,7 +3160,7 @@ void visit_load_input(isel_context *ctx, nir_intrinsic_instr *instr) { Builder bld(ctx->program, ctx->block); Temp dst = get_ssa_temp(ctx, &instr->dest.ssa); - if (ctx->stage & sw_vs) { + if (ctx->shader->info.stage == MESA_SHADER_VERTEX) { nir_instr *off_instr = instr->src[0].ssa->parent_instr; if (off_instr->type != nir_instr_type_load_const) { @@ -3353,7 +3353,7 @@ void visit_load_input(isel_context *ctx, nir_intrinsic_instr *instr) if (num_temp == dst.size()) ctx->allocated_vec.emplace(dst.id(), elems); } - } else if (ctx->stage == fragment_fs) { + } else if (ctx->shader->info.stage == MESA_SHADER_FRAGMENT) { unsigned offset_idx = instr->intrinsic == nir_intrinsic_load_input ? 0 : 1; nir_instr *off_instr = instr->src[offset_idx].ssa->parent_instr; if (off_instr->type != nir_instr_type_load_const ||