diff options
author | Timur Kristóf <[email protected]> | 2020-02-18 15:55:54 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-11 08:34:10 +0000 |
commit | f53d31fb9b27b490a8773173707b244c5826b5a3 (patch) | |
tree | 8f2fd9ffefca702caf346954f71e65742cae624f /src | |
parent | 90167112736c603f9f839506e4aa69fe3b8c848d (diff) |
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 <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/compiler/aco_instruction_selection.cpp | 4 |
1 files 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 || |