aco: add GFX11 opcode numbers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17333>
This commit is contained in:
@@ -54,8 +54,10 @@ struct asm_context {
|
||||
opcode = &instr_info.opcode_gfx7[0];
|
||||
else if (gfx_level <= GFX9)
|
||||
opcode = &instr_info.opcode_gfx9[0];
|
||||
else if (gfx_level >= GFX10)
|
||||
else if (gfx_level <= GFX10_3)
|
||||
opcode = &instr_info.opcode_gfx10[0];
|
||||
else if (gfx_level >= GFX11)
|
||||
opcode = &instr_info.opcode_gfx11[0];
|
||||
}
|
||||
|
||||
int subvector_begin_pos = -1;
|
||||
|
@@ -438,6 +438,8 @@ can_use_opsel(amd_gfx_level gfx_level, aco_opcode op, int idx)
|
||||
case aco_opcode::v_cvt_pknorm_u16_f16: return idx != -1;
|
||||
case aco_opcode::v_mad_u32_u16:
|
||||
case aco_opcode::v_mad_i32_i16: return idx >= 0 && idx < 2;
|
||||
case aco_opcode::v_dot2_f16_f16:
|
||||
case aco_opcode::v_dot2_bf16_bf16: return idx == -1 || idx == 2;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
@@ -2300,6 +2300,7 @@ typedef struct {
|
||||
const int16_t opcode_gfx7[static_cast<int>(aco_opcode::num_opcodes)];
|
||||
const int16_t opcode_gfx9[static_cast<int>(aco_opcode::num_opcodes)];
|
||||
const int16_t opcode_gfx10[static_cast<int>(aco_opcode::num_opcodes)];
|
||||
const int16_t opcode_gfx11[static_cast<int>(aco_opcode::num_opcodes)];
|
||||
const std::bitset<static_cast<int>(aco_opcode::num_opcodes)> can_use_input_modifiers;
|
||||
const std::bitset<static_cast<int>(aco_opcode::num_opcodes)> can_use_output_modifiers;
|
||||
const std::bitset<static_cast<int>(aco_opcode::num_opcodes)> is_atomic;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,11 @@ extern const aco::Info instr_info = {
|
||||
${opcodes[name].opcode_gfx10},
|
||||
% endfor
|
||||
},
|
||||
{
|
||||
% for name in opcode_names:
|
||||
${opcodes[name].opcode_gfx11},
|
||||
% endfor
|
||||
},
|
||||
std::bitset<${len(opcode_names)}>("${can_use_input_modifiers}"),
|
||||
std::bitset<${len(opcode_names)}>("${can_use_output_modifiers}"),
|
||||
std::bitset<${len(opcode_names)}>("${is_atomic}"),
|
||||
|
@@ -135,7 +135,7 @@ get_perf_info(Program* program, aco_ptr<Instruction>& instr)
|
||||
case instr_class::branch:
|
||||
case instr_class::sendmsg: return {0, WAIT_USE(branch_sendmsg, 1)};
|
||||
case instr_class::ds:
|
||||
return instr->ds().gds ? perf_info{0, WAIT_USE(export_gds, 1)}
|
||||
return instr->isDS() && instr->ds().gds ? perf_info{0, WAIT_USE(export_gds, 1)}
|
||||
: perf_info{0, WAIT_USE(lds, 1)};
|
||||
case instr_class::exp: return {0, WAIT_USE(export_gds, 1)};
|
||||
case instr_class::vmem: return {0, WAIT_USE(vmem, 1)};
|
||||
@@ -164,7 +164,7 @@ get_perf_info(Program* program, aco_ptr<Instruction>& instr)
|
||||
return {8, WAIT_USE(branch_sendmsg, 8)};
|
||||
return {4, WAIT_USE(branch_sendmsg, 4)};
|
||||
case instr_class::ds:
|
||||
return instr->ds().gds ? perf_info{4, WAIT_USE(export_gds, 4)}
|
||||
return instr->isDS() && instr->ds().gds ? perf_info{4, WAIT_USE(export_gds, 4)}
|
||||
: perf_info{4, WAIT_USE(lds, 4)};
|
||||
case instr_class::exp: return {16, WAIT_USE(export_gds, 16)};
|
||||
case instr_class::vmem: return {4, WAIT_USE(vmem, 4)};
|
||||
|
Reference in New Issue
Block a user