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:
@@ -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;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user