mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 04:00:32 +01:00
aco: replace == GFX10 with >= GFX10 where it's needed
Assume the GFX10.3 ISA is similar to GFX10 which is likely (except possible minor changes and new instructions for raytracing). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5389>
This commit is contained in:
parent
3c28438094
commit
8c144482ea
3 changed files with 7 additions and 7 deletions
|
|
@ -21,7 +21,7 @@ struct asm_context {
|
|||
opcode = &instr_info.opcode_gfx7[0];
|
||||
else if (chip_class <= GFX9)
|
||||
opcode = &instr_info.opcode_gfx9[0];
|
||||
else if (chip_class == GFX10)
|
||||
else if (chip_class >= GFX10)
|
||||
opcode = &instr_info.opcode_gfx10[0];
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
|
|||
instr->opcode == aco_opcode::v_interp_p2_f16) {
|
||||
if (ctx.chip_class == GFX8 || ctx.chip_class == GFX9) {
|
||||
encoding = (0b110100 << 26);
|
||||
} else if (ctx.chip_class == GFX10) {
|
||||
} else if (ctx.chip_class >= GFX10) {
|
||||
encoding = (0b110101 << 26);
|
||||
} else {
|
||||
unreachable("Unknown chip_class.");
|
||||
|
|
@ -548,7 +548,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
|
|||
uint32_t encoding;
|
||||
if (ctx.chip_class <= GFX9) {
|
||||
encoding = (0b110100 << 26);
|
||||
} else if (ctx.chip_class == GFX10) {
|
||||
} else if (ctx.chip_class >= GFX10) {
|
||||
encoding = (0b110101 << 26);
|
||||
} else {
|
||||
unreachable("Unknown chip_class.");
|
||||
|
|
@ -586,7 +586,7 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
|
|||
uint32_t encoding;
|
||||
if (ctx.chip_class == GFX9) {
|
||||
encoding = (0b110100111 << 23);
|
||||
} else if (ctx.chip_class == GFX10) {
|
||||
} else if (ctx.chip_class >= GFX10) {
|
||||
encoding = (0b110011 << 26);
|
||||
} else {
|
||||
unreachable("Unknown chip_class.");
|
||||
|
|
|
|||
|
|
@ -1832,7 +1832,7 @@ void lower_to_hw_instr(Program* program)
|
|||
{
|
||||
if (ctx.program->chip_class <= GFX7)
|
||||
emit_gfx6_bpermute(program, instr, bld);
|
||||
else if (ctx.program->chip_class == GFX10 && ctx.program->wave_size == 64)
|
||||
else if (ctx.program->chip_class >= GFX10 && ctx.program->wave_size == 64)
|
||||
emit_gfx10_wave64_bpermute(program, instr, bld);
|
||||
else
|
||||
unreachable("Current hardware supports ds_bpermute, don't emit p_bpermute.");
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ void print_asm(Program *program, std::vector<uint32_t>& binary,
|
|||
|
||||
/* mask out src2 on v_writelane_b32 */
|
||||
if (((program->chip_class == GFX8 || program->chip_class == GFX9) && (binary[pos] & 0xffff8000) == 0xd28a0000) ||
|
||||
(program->chip_class == GFX10 && (binary[pos] & 0xffff8000) == 0xd7610000)) {
|
||||
(program->chip_class >= GFX10 && (binary[pos] & 0xffff8000) == 0xd7610000)) {
|
||||
binary[pos+1] = binary[pos+1] & 0xF803FFFF;
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ void print_asm(Program *program, std::vector<uint32_t>& binary,
|
|||
bool has_literal = program->chip_class >= GFX10 &&
|
||||
(((binary[pos+1] & 0x1ff) == 0xff) || (((binary[pos+1] >> 9) & 0x1ff) == 0xff));
|
||||
new_pos = pos + 2 + has_literal;
|
||||
} else if (program->chip_class == GFX10 && l == 4 && ((binary[pos] & 0xfe0001ff) == 0x020000f9)) {
|
||||
} else if (program->chip_class >= GFX10 && l == 4 && ((binary[pos] & 0xfe0001ff) == 0x020000f9)) {
|
||||
out << std::left << std::setw(align_width) << std::setfill(' ') << "\tv_cndmask_b32 + sdwa";
|
||||
new_pos = pos + 2;
|
||||
} else if (!l) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue