[Mesa-dev] [PATCH 1/3] gallium/auxiliary: Add util_format_get_depth_only() helper.

Eric Anholt eric at anholt.net
Tue Aug 21 00:59:04 UTC 2018


Kenneth Graunke <kenneth at whitecape.org> writes:

> This will be used by u_transfer_helper.c shortly, in order to split
> packed depth-stencil into separate resources.
> ---
>  src/gallium/auxiliary/util/u_format.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
> index f421222f854..e66849c16b1 100644
> --- a/src/gallium/auxiliary/util/u_format.h
> +++ b/src/gallium/auxiliary/util/u_format.h
> @@ -557,6 +557,27 @@ util_format_is_depth_and_stencil(enum pipe_format format)
>            util_format_has_stencil(desc);
>  }
>  
> +/**
> + * For depth-stencil formats, return the equivalent depth-only format.
> + */
> +static inline boolean
> +util_format_get_depth_only(enum pipe_format format)

Given that the equivalent function for stencil is
util_format_stencil_only(), can we get naming consistency?  Other than
that, r-b.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180820/88a0e8c0/attachment.sig>


More information about the mesa-dev mailing list