util: remove util_float_to_half and util_half_to_float wrappers

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6987>
This commit is contained in:
Marek Olšák
2020-09-18 05:53:56 -04:00
parent 24a62dd0fb
commit b42c6ff6f6
26 changed files with 69 additions and 81 deletions

View File

@@ -164,7 +164,7 @@ int main(int argc, char** argv)
double_buffer[i] = rand_double();
for (i = 0; i < buffer_size / sizeof(double); ++i)
half_buffer[i] = util_float_to_half((float) rand_double());
half_buffer[i] = _mesa_float_to_half((float) rand_double());
for (i = 0; i < count; ++i)
elts[i] = i;

View File

@@ -18,8 +18,8 @@ test(void)
union fi f;
uint16_t rh;
f.f = util_half_to_float(h);
rh = util_float_to_half(f.f);
f.f = _mesa_half_to_float(h);
rh = _mesa_float_to_half(f.f);
if (h != rh && !(util_is_half_nan(h) && util_is_half_nan(rh))) {
printf("Roundtrip failed: %x -> %x = %f -> %x\n", h, f.ui, f.f, rh);