[Mesa-dev] [PATCH 1/2] u_format: fix RGTC support in fits 8unorm.

Jose Fonseca jfonseca at vmware.com
Sun Nov 6 14:04:24 PST 2011


Make sense. The same goes for PIPE_FORMAT_LATC1_SNORM and PIPE_FORMAT_LATC1_SNORM I suppose.

Jose

----- Original Message -----
> From: Dave Airlie <airlied at redhat.com>
> 
> Signed RGTC won't fit in a unorm, so don't allow them.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/auxiliary/util/u_format.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/util/u_format.c
> b/src/gallium/auxiliary/util/u_format.c
> index e07462a..f0f03e8 100644
> --- a/src/gallium/auxiliary/util/u_format.c
> +++ b/src/gallium/auxiliary/util/u_format.c
> @@ -443,11 +443,14 @@ util_format_fits_8unorm(const struct
> util_format_description *format_desc)
>     switch (format_desc->layout) {
>  
>     case UTIL_FORMAT_LAYOUT_S3TC:
> -   case UTIL_FORMAT_LAYOUT_RGTC:
>        /*
>         * These are straight forward.
>         */
> -
> +      return TRUE;
> +   case UTIL_FORMAT_LAYOUT_RGTC:
> +      if (format_desc->format == PIPE_FORMAT_RGTC1_SNORM ||
> +          format_desc->format == PIPE_FORMAT_RGTC2_SNORM)
> +         return FALSE;
>        return TRUE;
>  
>     case UTIL_FORMAT_LAYOUT_PLAIN:
> --
> 1.7.6.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list