aco: export MRT0 instead of NULL on GFX11

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16369>
This commit is contained in:
Samuel Pitoiset 2022-05-06 11:18:24 +02:00 committed by Marge Bot
parent 42ef89e8db
commit bc8da20dda
2 changed files with 4 additions and 2 deletions

View file

@ -10844,7 +10844,8 @@ create_fs_null_export(isel_context* ctx)
*/ */
Builder bld(ctx->program, ctx->block); Builder bld(ctx->program, ctx->block);
unsigned dest = V_008DFC_SQ_EXP_NULL; /* GFX11 doesn't support NULL exports, and MRT0 should be exported instead. */
unsigned dest = ctx->options->chip_class >= GFX11 ? V_008DFC_SQ_EXP_MRT : V_008DFC_SQ_EXP_NULL;
bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1), bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1),
/* enabled_mask */ 0, dest, /* compr */ false, /* done */ true, /* vm */ true); /* enabled_mask */ 0, dest, /* compr */ false, /* done */ true, /* vm */ true);
} }

View file

@ -2030,7 +2030,8 @@ lower_to_hw_instr(Program* program)
bld.reset(discard_block); bld.reset(discard_block);
bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1), 0, bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1), 0,
V_008DFC_SQ_EXP_NULL, false, true, true); program->chip_class >= GFX11 ? V_008DFC_SQ_EXP_MRT : V_008DFC_SQ_EXP_NULL,
false, true, true);
bld.sopp(aco_opcode::s_endpgm); bld.sopp(aco_opcode::s_endpgm);
bld.reset(&ctx.instructions); bld.reset(&ctx.instructions);