mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
nir/opt_fp_math_ctrl: use ddx/ddy fp_math_ctrl
No Foz-DB changes. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40630>
This commit is contained in:
parent
85ff60e68a
commit
9cba104e11
1 changed files with 13 additions and 3 deletions
|
|
@ -225,10 +225,20 @@ opt_intrin_fp_math_ctrl(nir_intrinsic_instr *intrin)
|
|||
case nir_intrinsic_ddx_fine:
|
||||
case nir_intrinsic_ddy:
|
||||
case nir_intrinsic_ddy_coarse:
|
||||
case nir_intrinsic_ddy_fine:
|
||||
if (intrin->instr.pass_flags)
|
||||
case nir_intrinsic_ddy_fine: {
|
||||
unsigned fp_math_ctrl = nir_intrinsic_fp_math_ctrl(intrin);
|
||||
if ((fp_math_ctrl & nir_fp_preserve_signed_zero) == 0)
|
||||
return false;
|
||||
|
||||
if (intrin->instr.pass_flags) {
|
||||
src_mark_preserve_sz(&intrin->src[0], NULL);
|
||||
return false;
|
||||
return false;
|
||||
} else {
|
||||
fp_math_ctrl &= ~nir_fp_preserve_signed_zero;
|
||||
nir_intrinsic_set_fp_math_ctrl(intrin, fp_math_ctrl);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue