Reviewed-by: Marek Olšák <marek.ol...@amd.com> Marek
On Tue, Jul 18, 2017 at 6:01 AM, <laa...@gmail.com> wrote: > From: "Wladimir J. van der Laan" <laa...@gmail.com> > > This is the equivalent of util_format_is_s3tc, but for > ETC. > > Signed-off-by: Wladimir J. van der Laan <laa...@gmail.com> > --- > src/gallium/auxiliary/util/u_format.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/src/gallium/auxiliary/util/u_format.h > b/src/gallium/auxiliary/util/u_format.h > index d055778..2318e97 100644 > --- a/src/gallium/auxiliary/util/u_format.h > +++ b/src/gallium/auxiliary/util/u_format.h > @@ -496,6 +496,19 @@ util_format_is_s3tc(enum pipe_format format) > } > > static inline boolean > +util_format_is_etc(enum pipe_format format) > +{ > + const struct util_format_description *desc = > util_format_description(format); > + > + assert(desc); > + if (!desc) { > + return FALSE; > + } > + > + return desc->layout == UTIL_FORMAT_LAYOUT_ETC ? TRUE : FALSE; > +} > + > +static inline boolean > util_format_is_srgb(enum pipe_format format) > { > const struct util_format_description *desc = > util_format_description(format); > -- > 2.7.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev