[Mesa-dev] [PATCH 1/9] u_format: add util_format_is_subsampled helper function
Jose Fonseca
jfonseca at vmware.com
Thu Mar 8 13:31:00 PST 2012
The comment fix is good. But I rather not having more of these helper functions. More details shortly..
Jose
----- Original Message -----
> Also fix comment about subsampled formats.
>
> Signed-off-by: Christian König <deathsimple at vodafone.de>
> ---
> src/gallium/auxiliary/util/u_format.h | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_format.h
> b/src/gallium/auxiliary/util/u_format.h
> index b9ae7c1..3f47e7a 100644
> --- a/src/gallium/auxiliary/util/u_format.h
> +++ b/src/gallium/auxiliary/util/u_format.h
> @@ -54,7 +54,7 @@ enum util_format_layout {
> /**
> * Formats with sub-sampled channels.
> *
> - * This is for formats like YV12 where there is less than one
> sample per
> + * This is for formats like YVYU where there is less than one
> sample per
> * pixel.
> */
> UTIL_FORMAT_LAYOUT_SUBSAMPLED = 3,
> @@ -468,6 +468,13 @@ util_format_is_s3tc(enum pipe_format format)
> }
>
> static INLINE boolean
> +util_format_is_subsampled(enum pipe_format format)
> +{
> + const struct util_format_description *desc =
> util_format_description(format);
> + return desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED ? TRUE :
> FALSE;
> +}
> +
> +static INLINE boolean
> util_format_is_srgb(enum pipe_format format)
> {
> const struct util_format_description *desc =
> util_format_description(format);
> --
> 1.7.5.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