MESA_FORMAT_LnAn_* puts the luminance in the low part of the integer and the alpha in the high part. The same goes for MESA_FORMAT_RnGn with the red and green channels.
This series fixes gallium to be consistent with that layout on big-endian. Following the convention established last year, PIPE_FORMAT_LAnn and PIPE_FORMAT_RGnn are the equivalent gallium formats. Where defined, PIPE_FORMAT_LnAn puts the luminance first in memory and the alpha last in memory. Patch 1 also fixes an endianness bug in mesa swrast for MESA_FORMAT_L8A8_SRGB. AFAICT all other L/A and R/G formats are handled correctly. Richard Sandiford (5): swrast: Fix handling of MESA_FORMAT_L8A8_SRGB for big-endian util: Add PIPE_FORMAT_AnLn and PIPE_FORMAT_GnRn formats util: Define PIPE_FORMAT_{LA,AL,RG,GR}nn aliases Add MESA_FORMAT_A8L8_{SNORM,SRGB} Fix handling of LA and RG formats for big-endian src/gallium/auxiliary/util/u_format.csv | 9 ++++ src/gallium/include/pipe/p_format.h | 42 ++++++++++++++++ src/mesa/drivers/dri/i965/brw_surface_formats.c | 2 + src/mesa/main/format_pack.c | 37 ++++++++++++++ src/mesa/main/format_unpack.c | 29 +++++++++++ src/mesa/main/formats.c | 28 +++++++++++ src/mesa/main/formats.h | 2 + src/mesa/main/texformat.c | 3 ++ src/mesa/main/texstore.c | 10 +++- src/mesa/state_tracker/st_format.c | 64 ++++++++++++++++++------- src/mesa/swrast/s_texfetch.c | 2 + src/mesa/swrast/s_texfetch_tmp.h | 30 ++++++++++-- 12 files changed, 237 insertions(+), 21 deletions(-) -- 1.8.3.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev