Module: Mesa Branch: 10.6 Commit: c364a00cf957f4e0b5e4d039f1736f54c57e7fde URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c364a00cf957f4e0b5e4d039f1736f54c57e7fde
Author: Jason Ekstrand <[email protected]> Date: Sat Aug 8 09:00:21 2015 -0700 mesa/formats: Only do byteswapping for packed formats Reviewed-by: Iago Toral <[email protected]> Cc: "10.6 10.5" <[email protected]> (cherry picked from commit 3941539179b72fe25b6dffd1aacc0722d198a5ca) --- src/mesa/main/formats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index 8af44e9..99a5ad3 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; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
