mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
aco: add helper function for can_use_input_modifiers
Some instructions have restrictions that can't be expressed with the bitfield. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>
This commit is contained in:
parent
b4ff7e2567
commit
0ffc9bccfa
2 changed files with 14 additions and 0 deletions
|
|
@ -469,6 +469,19 @@ convert_to_DPP(amd_gfx_level gfx_level, aco_ptr<Instruction>& instr, bool dpp8)
|
|||
return tmp;
|
||||
}
|
||||
|
||||
bool
|
||||
can_use_input_modifiers(amd_gfx_level gfx_level, aco_opcode op, int idx)
|
||||
{
|
||||
if (op == aco_opcode::v_mov_b32)
|
||||
return gfx_level >= GFX10;
|
||||
|
||||
if (op == aco_opcode::v_ldexp_f16 || op == aco_opcode::v_ldexp_f32 ||
|
||||
op == aco_opcode::v_ldexp_f64)
|
||||
return idx == 0;
|
||||
|
||||
return instr_info.can_use_input_modifiers[(int)op];
|
||||
}
|
||||
|
||||
bool
|
||||
can_use_opsel(amd_gfx_level gfx_level, aco_opcode op, int idx)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1823,6 +1823,7 @@ is_dead(const std::vector<uint16_t>& uses, const Instruction* instr)
|
|||
return !(get_sync_info(instr).semantics & (semantic_volatile | semantic_acqrel));
|
||||
}
|
||||
|
||||
bool can_use_input_modifiers(amd_gfx_level gfx_level, aco_opcode op, int idx);
|
||||
bool can_use_opsel(amd_gfx_level gfx_level, aco_opcode op, int idx);
|
||||
bool instr_is_16bit(amd_gfx_level gfx_level, aco_opcode op);
|
||||
uint8_t get_gfx11_true16_mask(aco_opcode op);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue