I'm not sure what I think about this. Does it make a functional change other than consistancy? --Jason
On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga <ito...@igalia.com> wrote: > In order to check if a format is normalized Mesa does something like this: > normalized = !_mesa_is_enum_format_integer(srcFormat); > > So all float types will set normalized to true. Since our mesa_array_format > includes a normalized flag for each type we want to make it consistent with > this. > --- > src/mesa/main/format_info.py | 3 ++- > src/mesa/main/format_utils.c | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py > index 315767d..d4bc276 100644 > --- a/src/mesa/main/format_info.py > +++ b/src/mesa/main/format_info.py > @@ -220,9 +220,10 @@ for fmat in formats: > print ' {{ {0} }},'.format(', '.join(map(str, fmat.swizzle))) > if fmat.is_array() and fmat.colorspace in ('rgb', 'srgb'): > chan = fmat.array_element() > + norm = chan.norm or chan.type == parser.FLOAT > print ' {{{{ {0} }}}},'.format(', '.join([ > get_array_format_datatype(chan), > - str(int(chan.norm)), > + str(int(norm)), > str(len(fmat.channels)), > str(fmat.swizzle[0]), > str(fmat.swizzle[1]), > diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c > index c3815cb..1d65f2b 100644 > --- a/src/mesa/main/format_utils.c > +++ b/src/mesa/main/format_utils.c > @@ -30,7 +30,7 @@ > > mesa_array_format RGBA8888_FLOAT = {{ > MESA_ARRAY_FORMAT_TYPE_FLOAT, > - 0, > + 1, > 4, > 0, 1, 2, 3, > 0, 1 > -- > 1.9.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev