[Mesa-stable] [Mesa-dev] [PATCH 1/2] mesa: clear existing swizzle info before bitwise-OR
Oded Gabbay
oded.gabbay at gmail.com
Tue Aug 4 10:04:52 PDT 2015
On Mon, Aug 3, 2015 at 6:29 PM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:
> On 2 August 2015 at 11:37, Oded Gabbay <oded.gabbay at gmail.com> wrote:
> > This patch fixes a bug in big-endian handling, where the previous
> > swizzle info wasn't cleared before a new swizzle info was inserted into
> > the format field using a bitwise-OR operation.
> >
> > 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 | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
> > index 7e451ca..eacd8b7 100644
> > --- a/src/mesa/main/formats.h
> > +++ b/src/mesa/main/formats.h
> > @@ -191,6 +191,9 @@ static inline void
> > _mesa_array_format_set_swizzle(mesa_array_format *f,
> > int32_t x, int32_t y, int32_t z, int32_t
> w)
> > {
> > + /* clear old swizzle info */
> > + *f &= ~((0x7 << 8) | (0x7 << 11) | (0x7 << 14) | (0x7 << 17));
> > +
> Can you use MESA_ARRAY_FORMAT_SWIZZLE_*_MASK here ? It should improve
> the readability thus making the comment obsolete.
>
> Cheers,
> Emil
>
Of course.
I'll change it and resend the patch shortly.
Thanks,
Oded
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20150804/2a3e3815/attachment.html>
More information about the mesa-stable
mailing list