mesa: clear existing swizzle info before bitwise-OR
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 4 Aug 2015 18:39:32 +0000 (21:39 +0300)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 10 Aug 2015 06:59:23 +0000 (23:59 -0700)
commit2ac171a7db4e4ad2fa902e62bf18bc1f67e91643
tree90661b331dd3983a91673b71b1505be5ba14863c
parent1eaa29cb300e927409281ef0a9413072766eaa3d
mesa: clear existing swizzle info before bitwise-OR

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
v3: align according to coding style

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
CC: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/main/formats.h