[Mesa-dev] [PATCH v2 1/2] mesa: clear existing swizzle info before bitwise-OR

Oded Gabbay oded.gabbay at gmail.com
Tue Aug 4 11:35:58 PDT 2015


On Tue, Aug 4, 2015 at 8:24 PM, Matt Turner <mattst88 at gmail.com> wrote:
>
> On Tue, Aug 4, 2015 at 10:17 AM, Oded Gabbay <oded.gabbay at gmail.com> wrote:
> > This patch fixes a bug in big-endian treatment, where the previous
> > swizzle info wasn't cleared before a new swizzle info was inserted into
> > the format field using a bitwise-OR operation.
> >
> > v2: use MESA_ARRAY_FORMAT_SWIZZLE_*_MASK instead of numeric constants
> >
> > Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
> > CC: "10.5 10.6" <mesa-stable at lists.freedesktop.org>
> > ---
> >  src/mesa/main/formats.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
> > index 7e451ca..3ddfc96 100644
> > --- a/src/mesa/main/formats.h
> > +++ b/src/mesa/main/formats.h
> > @@ -191,6 +191,11 @@ static inline void
> >  _mesa_array_format_set_swizzle(mesa_array_format *f,
> >                                 int32_t x, int32_t y, int32_t z, int32_t w)
> >  {
> > +   *f &= ~(MESA_ARRAY_FORMAT_SWIZZLE_X_MASK |
> > +          MESA_ARRAY_FORMAT_SWIZZLE_Y_MASK |
> > +          MESA_ARRAY_FORMAT_SWIZZLE_Z_MASK |
> > +          MESA_ARRAY_FORMAT_SWIZZLE_W_MASK);
>
> Indent the MESA_ARRAY_FORMAT_*s to align vertically with each other
> (and without tabs).

Sorry,
I'm used to kernel style

Oded


More information about the mesa-dev mailing list