mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-19 07:50:37 +01:00
ac/nir/lower_sin_cos: preserve fp_math_ctrl
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39187>
This commit is contained in:
parent
9331726157
commit
5241343ccb
1 changed files with 1 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ lower_sin_cos(struct nir_builder *b, nir_alu_instr *sincos, UNUSED void *_)
|
|||
return false;
|
||||
|
||||
b->cursor = nir_before_instr(&sincos->instr);
|
||||
b->fp_math_ctrl = sincos->fp_math_ctrl;
|
||||
|
||||
nir_def *src = nir_fmul_imm(b, nir_ssa_for_alu_src(b, sincos, 0), 0.15915493667125702);
|
||||
nir_def *replace = sincos->op == nir_op_fsin ? nir_fsin_amd(b, src) : nir_fcos_amd(b, src);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue