Skip to content
Snippets Groups Projects
Commit 9febc11a authored by Chia-I Wu's avatar Chia-I Wu Committed by Dylan Baker
Browse files

util: Keep quiet NaNs quiet when converting to half float.

We don't want to be throwing exceptions and changing float values later by
emitting a signaling binary16 nan.

If we don't do this, then when we convert back to f32 in NIR constant
expression evaluation, the signaling NaN can end up giving NaN for
fmax(NaN, 0.0), instead of 0.0.

Closes: mesa/mesa#5933


Cc: mesa-stable
Reviewed-by: Emma Anholt's avatarEmma Anholt <emma@anholt.net>
Reviewed-by: default avatarJason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <mesa/mesa!16233>
(cherry picked from commit 27e33d5c)
parent d29fe64c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment