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 --- .../src/gallium/auxiliary/util/u_format_pack.py | 29 ++-------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'mesalib/src/gallium/auxiliary/util/u_format_pack.py') diff --git a/mesalib/src/gallium/auxiliary/util/u_format_pack.py b/mesalib/src/gallium/auxiliary/util/u_format_pack.py index 565d059c3..d1f68c804 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format_pack.py +++ b/mesalib/src/gallium/auxiliary/util/u_format_pack.py @@ -99,15 +99,6 @@ def generate_format_type(format): print -def bswap_format(format): - '''Generate a structure that describes the format.''' - - if format.is_bitmask() and not format.is_array() and format.block_size() > 8: - print '#ifdef PIPE_ARCH_BIG_ENDIAN' - print ' pixel.value = util_bswap%u(pixel.value);' % format.block_size() - print '#endif' - - def is_format_supported(format): '''Determines whether we actually have the plumbing necessary to generate the to read/write to/from this format.''' @@ -423,16 +414,11 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type): elif src_channel.type == SIGNED: print ' int%u_t %s;' % (depth, src_channel.name) - if depth > 8: - print '#ifdef PIPE_ARCH_BIG_ENDIAN' - print ' value = util_bswap%u(value);' % depth - print '#endif' - # Compute the intermediate unshifted values - shift = 0 for i in range(format.nr_channels()): src_channel = format.channels[i] value = 'value' + shift = src_channel.shift if src_channel.type == UNSIGNED: if shift: value = '%s >> %u' % (value, shift) @@ -455,8 +441,6 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type): if value is not None: print ' %s = %s;' % (src_channel.name, value) - shift += src_channel.size - # Convert, swizzle, and store final values for i in range(4): swizzle = format.swizzles[i] @@ -484,7 +468,6 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type): else: print ' union util_format_%s pixel;' % format.short_name() print ' memcpy(&pixel, src, sizeof pixel);' - bswap_format(format) for i in range(4): swizzle = format.swizzles[i] @@ -525,9 +508,9 @@ def generate_pack_kernel(format, src_channel, src_native_type): depth = format.block_size() print ' uint%u_t value = 0;' % depth - shift = 0 for i in range(4): dst_channel = format.channels[i] + shift = dst_channel.shift if inv_swizzle[i] is not None: value ='src[%u]' % inv_swizzle[i] dst_colorspace = format.colorspace @@ -551,13 +534,6 @@ def generate_pack_kernel(format, src_channel, src_native_type): if value is not None: print ' value |= %s;' % (value) - shift += dst_channel.size - - if depth > 8: - print '#ifdef PIPE_ARCH_BIG_ENDIAN' - print ' value = util_bswap%u(value);' % depth - print '#endif' - print ' *(uint%u_t *)dst = value;' % depth else: @@ -579,7 +555,6 @@ def generate_pack_kernel(format, src_channel, src_native_type): dst_colorspace = dst_colorspace) print ' pixel.chan.%s = %s;' % (dst_channel.name, value) - bswap_format(format) print ' memcpy(dst, &pixel, sizeof pixel);' -- cgit v1.2.3