From 338b9d71dfd93cfe516b16db1be4038725c5bc7b Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 31 Mar 2010 14:28:34 +0100 Subject: util: Use VOID type for X channels in format descriptions. --- src/gallium/auxiliary/util/u_format_pack.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gallium/auxiliary/util/u_format_pack.py') diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py index 409d024c63..e9d2573667 100644 --- a/src/gallium/auxiliary/util/u_format_pack.py +++ b/src/gallium/auxiliary/util/u_format_pack.py @@ -124,15 +124,15 @@ def native_type(format): return 'uint%u_t' % format.block_size() else: # For array pixel formats return the integer type that matches the color channel - type = format.channels[0] - if type.type == UNSIGNED: - return 'uint%u_t' % type.size - elif type.type == SIGNED: - return 'int%u_t' % type.size - elif type.type == FLOAT: - if type.size == 32: + channel = format.channels[0] + if channel.type in (UNSIGNED, VOID): + return 'uint%u_t' % channel.size + elif channel.type == SIGNED: + return 'int%u_t' % channel.size + elif channel.type == FLOAT: + if channel.size == 32: return 'float' - elif type.size == 64: + elif channel.size == 64: return 'double' else: assert False -- cgit v1.2.3