From f53d31fb9b27b490a8773173707b244c5826b5a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Tue, 18 Feb 2020 15:55:54 +0100 Subject: [PATCH] aco: Use mesa shader stage when loading inputs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This makes it more clear which stages should load these inputs. Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 || -- 2.30.2