mesa/src/util/float8.h
Georg Lehmann 2237c022a2 util: add float8 conversion functions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:24 +00:00

24 lines
450 B
C

/*
* Copyright 2025 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
uint8_t _mesa_float_to_e4m3fn(float val);
uint8_t _mesa_float_to_e4m3fn_sat(float val);
float _mesa_e4m3fn_to_float(uint8_t val);
uint8_t _mesa_float_to_e5m2(float val);
uint8_t _mesa_float_to_e5m2_sat(float val);
float _mesa_e5m2_to_float(uint8_t val);
#ifdef __cplusplus
} /* extern C */
#endif