aco/gfx6: move mrtz writemask workaround to assembler and handle all mrt

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
This commit is contained in:
Georg Lehmann 2025-12-09 14:04:32 +01:00 committed by Marge Bot
parent 2044cf885b
commit 072815e5cb
2 changed files with 9 additions and 8 deletions

View file

@ -999,6 +999,15 @@ emit_exp_instruction(asm_context& ctx, std::vector<uint32_t>& out, const Instruc
encoding |= exp.done ? 0b1 << 11 : 0;
encoding |= exp.dest << 4;
encoding |= exp.enabled_mask;
/* GFX6 (except OLAND and HAINAN) has a bug that it only looks at the X
* writemask component.
*/
if (ctx.gfx_level == GFX6 && ctx.program->family != CHIP_OLAND &&
ctx.program->family != CHIP_HAINAN && exp.enabled_mask && exp.dest <= V_008DFC_SQ_EXP_MRTZ) {
encoding |= 0x1;
}
out.push_back(encoding);
encoding = reg(ctx, exp.operands[0], 8);
encoding |= reg(ctx, exp.operands[1], 8) << 8;

View file

@ -344,14 +344,6 @@ export_fs_mrtz(isel_context* ctx, const struct aco_ps_epilog_info* info, Temp de
}
}
/* GFX6 (except OLAND and HAINAN) has a bug that it only looks at the X
* writemask component.
*/
if (ctx->options->gfx_level == GFX6 && ctx->options->family != CHIP_OLAND &&
ctx->options->family != CHIP_HAINAN) {
enabled_channels |= 0x1;
}
bld.exp(aco_opcode::exp, values[0], values[1], values[2], values[3], enabled_channels,
V_008DFC_SQ_EXP_MRTZ, compr);
}