summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-08-08 09:00:21 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2015-08-12 08:28:31 -0700
commit3941539179b72fe25b6dffd1aacc0722d198a5ca (patch)
treedc9268d60b161a5cabaf99d975f20eb23c04aedb /src/mesa/main/formats.c
parent02a4fe22b137d4bc8378bedd8319109fd23a50e3 (diff)
downloadexternal_mesa3d-3941539179b72fe25b6dffd1aacc0722d198a5ca.zip
external_mesa3d-3941539179b72fe25b6dffd1aacc0722d198a5ca.tar.gz
external_mesa3d-3941539179b72fe25b6dffd1aacc0722d198a5ca.tar.bz2
mesa/formats: Only do byteswapping for packed formats
Reviewed-by: Iago Toral <itoral@igalia.com> Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index baeb1bf..d927073 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -372,10 +372,10 @@ uint32_t
_mesa_format_to_array_format(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
- if (_mesa_little_endian())
- return info->ArrayFormat;
- else
+ if (!_mesa_little_endian() && info->Layout == MESA_FORMAT_LAYOUT_PACKED)
return _mesa_array_format_flip_channels(info->ArrayFormat);
+ else
+ return info->ArrayFormat;
}
static struct hash_table *format_array_format_table;