mesa/formats: Fix swizzle flipping for big-endian targets
The swizzle defines where in the format you should look for any given channel. When we flip the format around for BE targets, we need to change the destinations of the swizzles, not the sources. For example, say the format is an RGBX format with a swizzle of xyz1 on LE. Then it should be wzy1 on BE; however, the code as it was before, would have made it 1zyx on BE which is clearly wrong. Reviewed-by:Iago Toral <itoral@igalia.com> Reviewed-by:
Oded Gabbay <oded.gabbay@gmail.com> Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 28d1a506)