[Mesa-dev] [PATCH v3 24/24] main: remove unused float_to_uint() function

Jason Ekstrand jason at jlekstrand.net
Thu Dec 11 11:58:13 PST 2014


On Tue, Dec 9, 2014 at 4:07 AM, Iago Toral Quiroga <itoral at igalia.com>
wrote:

> From: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>
> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
> ---
>  src/mesa/main/format_utils.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c
> index dc63e1f..201231e 100644
> --- a/src/mesa/main/format_utils.c
> +++ b/src/mesa/main/format_utils.c
> @@ -133,15 +133,6 @@ _mesa_format_to_array(mesa_format format, GLenum
> *type, int *num_components,
>  }
>
>  static inline unsigned
> -float_to_uint(float x)
> -{
> -   if (x < 0.0f)
> -      return 0;
> -   else
> -      return x;
> -}
>

As per the comments on patch 14, we probably want a function like this and
it should clamp above as well as below.


> -
> -static inline unsigned
>  half_to_uint(uint16_t x)
>  {
>     if (_mesa_half_is_negative(x))
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141211/dad783ec/attachment-0001.html>


More information about the mesa-dev mailing list