[Mesa-dev] [PATCH] util/u_format: take normalized flag in consideration in util_format_is_rgba8_variant
Roland Scheidegger
sroland at vmware.com
Mon Nov 4 11:00:36 PST 2013
Am 04.11.2013 18:21, schrieb jfonseca at vmware.com:
> From: José Fonseca <jfonseca at vmware.com>
>
> Just happened to notice it was missing while looking at it.
> ---
> src/gallium/auxiliary/util/u_format.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
> index dc777c3..31283e5 100644
> --- a/src/gallium/auxiliary/util/u_format.h
> +++ b/src/gallium/auxiliary/util/u_format.h
> @@ -696,6 +696,8 @@ util_format_is_rgba8_variant(const struct util_format_description *desc)
> if(desc->channel[chan].type != UTIL_FORMAT_TYPE_UNSIGNED &&
> desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID)
> return FALSE;
> + if(!desc->channel[chan].normalized)
> + return FALSE;
> if(desc->channel[chan].size != 8)
> return FALSE;
> }
>
This looks like a good idea but it won't work correctly because with
xrgb formats the 4th channel with void type doesn't have the normalized
bit set.
Roland
More information about the mesa-dev
mailing list