From 2fe2056807d1304de86deb2b59992d51d9252ad0 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 26 Jun 2013 15:01:24 +0200 Subject: libXext mesa git update 29 June 20013 libXext commit 7378d4bdbd33ed49ed6cfa5c4f73d7527982aab4 mesa commit 9aebad618c0aab527a0b838ce0a79ffa6dd426bb --- mesalib/src/gallium/auxiliary/util/u_format_parse.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mesalib/src/gallium/auxiliary/util/u_format_parse.py') diff --git a/mesalib/src/gallium/auxiliary/util/u_format_parse.py b/mesalib/src/gallium/auxiliary/util/u_format_parse.py index 07052b996..e202099b9 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format_parse.py +++ b/mesalib/src/gallium/auxiliary/util/u_format_parse.py @@ -30,6 +30,8 @@ ''' +import sys + VOID, UNSIGNED, SIGNED, FIXED, FLOAT = range(5) SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_0, SWIZZLE_1, SWIZZLE_NONE, = range(7) @@ -42,6 +44,9 @@ YUV = 'yuv' ZS = 'zs' +# Not cross-compiler friendly +is_big_endian = sys.byteorder == 'big' + def is_pot(x): return (x & (x - 1)) == 0 @@ -307,6 +312,11 @@ def parse(filename): channel = Channel(type, norm, pure, size, names[i]) channels.append(channel) + shift = 0 + for channel in channels[3::-1] if is_big_endian else channels: + channel.shift = shift + shift += channel.size + format = Format(name, layout, block_width, block_height, channels, swizzles, colorspace) formats.append(format) return formats -- cgit v1.2.3