mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
pan/bi: Handle round opcodes in frontend
These correspond to various ops routed through BI_ROUND Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
This commit is contained in:
parent
c7170e9742
commit
f81b67b857
1 changed files with 22 additions and 0 deletions
|
|
@ -413,6 +413,12 @@ bi_class_for_nir_alu(nir_op op)
|
|||
case nir_op_mov:
|
||||
return BI_MOV;
|
||||
|
||||
case nir_op_fround_even:
|
||||
case nir_op_fceil:
|
||||
case nir_op_ffloor:
|
||||
case nir_op_ftrunc:
|
||||
return BI_ROUND;
|
||||
|
||||
case nir_op_frcp:
|
||||
case nir_op_frsq:
|
||||
case nir_op_fsin:
|
||||
|
|
@ -607,6 +613,22 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr)
|
|||
BI_CASE_CMP(nir_op_ine)
|
||||
alu.op.compare = bi_cond_for_nir(instr->op, false);
|
||||
break;
|
||||
case nir_op_fround_even:
|
||||
alu.op.round = BI_ROUND_MODE;
|
||||
alu.roundmode = BIFROST_RTE;
|
||||
break;
|
||||
case nir_op_fceil:
|
||||
alu.op.round = BI_ROUND_MODE;
|
||||
alu.roundmode = BIFROST_RTP;
|
||||
break;
|
||||
case nir_op_ffloor:
|
||||
alu.op.round = BI_ROUND_MODE;
|
||||
alu.roundmode = BIFROST_RTN;
|
||||
break;
|
||||
case nir_op_ftrunc:
|
||||
alu.op.round = BI_ROUND_MODE;
|
||||
alu.roundmode = BIFROST_RTZ;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue