On Tue, Aug 11, 2015 at 4:16 PM, Ilia Mirkin <[email protected]> wrote:
> On Tue, Aug 11, 2015 at 7:07 PM, Nanley Chery <[email protected]> > wrote: > > From: Nanley Chery <[email protected]> > > > > Add the classes of compressed formats as layouts. This will make > determining if > > a texture is an ASTC format simpler. > > > > Cc: Jason Ekstrand <[email protected]> > > Signed-off-by: Nanley Chery <[email protected]> > > --- > > src/mesa/main/format_info.py | 4 +++- > > src/mesa/main/formats.c | 6 ++++++ > > src/mesa/main/formats.h | 6 ++++++ > > src/mesa/main/texcompress.c | 30 ++++++------------------------ > > 4 files changed, 21 insertions(+), 25 deletions(-) > > > > diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py > > index 3bae57e..b9f12f3 100644 > > --- a/src/mesa/main/format_info.py > > +++ b/src/mesa/main/format_info.py > > @@ -103,8 +103,10 @@ def get_mesa_layout(fmat): > > return 'MESA_FORMAT_LAYOUT_ARRAY' > > elif fmat.layout == 'packed': > > return 'MESA_FORMAT_LAYOUT_PACKED' > > - else: > > + elif fmat.layout == 'other': > > return 'MESA_FORMAT_LAYOUT_OTHER' > > + else: > > + return 'MESA_FORMAT_LAYOUT_' + fmat.layout.upper() > > This should cover basically every format layout, right? i.e. why not > just make this function be > > return 'MESA_FORMAT_LAYOUT_' + fmat.layout.upper() ? > Good idea. Thanks, Nanley
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
