mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 21:38:18 +02:00
lima: support nir_op_fmad
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
This commit is contained in:
parent
85c2023ee4
commit
1a0a329598
3 changed files with 5 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ duplicate_def_at_use(nir_builder *b, nir_def *def, bool duplicate_for_ffma)
|
|||
|
||||
if (duplicate_for_ffma &&
|
||||
last_parent_instr->type == nir_instr_type_alu &&
|
||||
nir_instr_as_alu(last_parent_instr)->op == nir_op_ffma_old) {
|
||||
nir_alu_instr_is_mul_add(nir_instr_as_alu(last_parent_instr))) {
|
||||
last_parent_instr = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ static int nir_to_ppir_opcodes[nir_num_opcodes] = {
|
|||
[nir_op_ftrunc] = ppir_op_trunc,
|
||||
[nir_op_fsat] = ppir_op_sat,
|
||||
[nir_op_fclamp_pos] = ppir_op_clamp_pos,
|
||||
[nir_op_fmad] = ppir_op_fmad,
|
||||
[nir_op_ffma_old] = ppir_op_fmad,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ static const nir_shader_compiler_options fs_nir_options = {
|
|||
.fuse_ffma16 = true,
|
||||
.fuse_ffma32 = true,
|
||||
.fuse_ffma64 = true,
|
||||
.float_mul_add16 = nir_float_muladd_support_has_fmad | nir_float_muladd_support_fuse,
|
||||
.float_mul_add32 = nir_float_muladd_support_has_fmad | nir_float_muladd_support_fuse,
|
||||
.float_mul_add64 = nir_float_muladd_support_has_fmad | nir_float_muladd_support_fuse,
|
||||
.lower_fpow = true,
|
||||
.lower_fdiv = true,
|
||||
.lower_fmod = true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue