Revert F16C series (MR 6774)

This reverts commit 4fb2eddfdf.
This reverts commit 7a1deb16f8.
This reverts commit 2b6a172343.
This reverts commit 5af81393e4.
This reverts commit 87900afe5b.

A couple of problems were discovered after this series was merged that
cause breakage in different configurations:

   (1) It seems that using -mf16c also enables AVX, leading to SIGILL on
   platforms that do not support AVX.
   (2) Since clang only warns about unknown flags, and as I understand
   it Meson's handling in cc.has_argument() is broken, the F16C code is
   wrongly enabled when clang is used, even for example on ARM, leading
   to a compilation error.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3583
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6969>
This commit is contained in:
Matt Turner
2020-10-01 13:48:16 -07:00
committed by Marge Bot
parent 4a0164ed85
commit 1aac47db69
45 changed files with 266 additions and 216 deletions
+3 -3
View File
@@ -360,7 +360,7 @@ def conversion_expr(src_channel,
# Promote half to float
if src_type == FLOAT and src_size == 16:
value = '_mesa_half_to_float(%s)' % value
value = 'util_half_to_float(%s)' % value
src_size = 32
# Special case for float <-> ubytes for more accurate results
@@ -436,7 +436,7 @@ def conversion_expr(src_channel,
src_size = 32
if dst_channel.size == 16:
value = '_mesa_float_to_float16_rtz(%s)' % value
value = 'util_float_to_half_rtz(%s)' % value
elif dst_channel.size == 64 and src_size < 64:
value = '(double)%s' % value
@@ -715,7 +715,7 @@ def generate(formats):
print()
print('#include "pipe/p_compiler.h"')
print('#include "util/u_math.h"')
print('#include "util/half_float.h"')
print('#include "util/u_half.h"')
print('#include "u_format.h"')
print('#include "u_format_other.h"')
print('#include "util/format_srgb.h"')
-3
View File
@@ -914,11 +914,8 @@ util_format_test_cases[] =
{PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x03FF), UNPACKED_1x1( 6.09756E-5, 0.0, 0.0, 1.0)},
#endif
/* This fails with _mesa_float_to_float16_rtz, but passes with _mesa_float_to_float16_rtne. */
#if 0
/* Minimum positive denormal */
{PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x0001), UNPACKED_1x1( 5.96046E-8, 0.0, 0.0, 1.0)},
#endif
/* Min representable value */
{PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfbff), UNPACKED_1x1( -65504.0, 0.0, 0.0, 1.0)},