<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 3, 2015 at 6:29 PM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2 August 2015 at 11:37, Oded Gabbay <<a href="mailto:oded.gabbay@gmail.com">oded.gabbay@gmail.com</a>> wrote:<br>
> This patch fixes a bug in big-endian handling, where the previous<br>
> swizzle info wasn't cleared before a new swizzle info was inserted into<br>
> the format field using a bitwise-OR operation.<br>
><br>
> Signed-off-by: Oded Gabbay <<a href="mailto:oded.gabbay@gmail.com">oded.gabbay@gmail.com</a>><br>
> CC: "10.5 10.6" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
> ---<br>
>  src/mesa/main/formats.h | 3 +++<br>
>  1 file changed, 3 insertions(+)<br>
><br>
> diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h<br>
> index 7e451ca..eacd8b7 100644<br>
> --- a/src/mesa/main/formats.h<br>
> +++ b/src/mesa/main/formats.h<br>
> @@ -191,6 +191,9 @@ static inline void<br>
>  _mesa_array_format_set_swizzle(mesa_array_format *f,<br>
>                                 int32_t x, int32_t y, int32_t z, int32_t w)<br>
>  {<br>
> +   /* clear old swizzle info */<br>
> +   *f &= ~((0x7 << 8) | (0x7 << 11) | (0x7 << 14) | (0x7 << 17));<br>
> +<br>
</span>Can you use MESA_ARRAY_FORMAT_SWIZZLE_*_MASK here ? It should improve<br>
the readability thus making the comment obsolete.<br>
<br>
Cheers,<br>
Emil<br>
</blockquote></div><div class="gmail_default" style="font-size:small">​Of course.</div><div class="gmail_default" style="font-size:small">I'll change it and resend the patch shortly.​</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">      Oded</div><br></div><img width="0" height="0" class="mailtrack-img" src="https://mailtrack.io/trace/mail/b394b75d80b66b9f6b5acfa96b67f7eef7cfd71e.png"></div>