mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nir: remove special fp_math_ctrl rules
All opcodes should now respect the nan/inf/sz preserving flags. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39641>
This commit is contained in:
parent
e443229644
commit
63d199a01e
2 changed files with 5 additions and 13 deletions
|
|
@ -1525,10 +1525,6 @@ typedef enum {
|
|||
* it must ensure that the resulting value is bit-for-bit identical to the
|
||||
* original, with the exception of undefindness allowed by other
|
||||
* nir_fp_math_control bits and NaN patterns.
|
||||
*
|
||||
* TODO This is currently also used to control NaN behavior of
|
||||
* floating point comparisons and fmin/fmax/fsat.
|
||||
* This should be changed to only depend on nir_fp_preserve_nan.
|
||||
*/
|
||||
nir_fp_exact = BITFIELD_BIT(3),
|
||||
|
||||
|
|
|
|||
|
|
@ -747,10 +747,8 @@ else if (nir_is_rounding_mode_rtz(execution_mode, 32))
|
|||
else
|
||||
dst = src0 * src1;
|
||||
""", description = """
|
||||
Unlike :nir:alu-op:`fmul`, anything (even infinity or NaN) multiplied by zero is
|
||||
always zero. ``fmulz(0.0, inf)`` and ``fmulz(0.0, nan)`` must be +/-0.0, even
|
||||
if ``INF_PRESERVE/NAN_PRESERVE`` is not used. If ``SIGNED_ZERO_PRESERVE`` is
|
||||
used, then the result must be a positive zero if either operand is zero.
|
||||
Unlike :nir:alu-op:`fmul`, anything (even infinity or NaN) multiplied by +/-0.0 is
|
||||
always +0.0.
|
||||
""")
|
||||
|
||||
|
||||
|
|
@ -1115,11 +1113,9 @@ else
|
|||
""", description = """
|
||||
Floating-point multiply-add with modified zero handling.
|
||||
|
||||
Unlike :nir:alu-op:`ffma`, anything (even infinity or NaN) multiplied by zero is
|
||||
always zero. ``ffmaz(0.0, inf, src2)`` and ``ffmaz(0.0, nan, src2)`` must be
|
||||
``+/-0.0 + src2``, even if ``INF_PRESERVE/NAN_PRESERVE`` is not used. If
|
||||
``SIGNED_ZERO_PRESERVE`` is used, then the result must be a positive
|
||||
zero plus src2 if either src0 or src1 is zero.
|
||||
Unlike :nir:alu-op:`ffma`, anything (even infinity or NaN) multiplied by +/-0.0 is
|
||||
+0.0. ``ffmaz(0.0, inf, src2)`` and ``ffmaz(0.0, nan, src2)`` must be
|
||||
``+0.0 + src2``.
|
||||
""")
|
||||
|
||||
triop("flrp", tfloat, "", "src0 * (1 - src2) + src1 * src2")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue