diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-03-31 14:28:34 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-03-31 14:28:34 +0100 |
commit | 338b9d71dfd93cfe516b16db1be4038725c5bc7b (patch) | |
tree | 5d06c2573f9eb2880ff3c68ef5f9d9c75832755f /src/gallium/auxiliary/util/u_format_pack.py | |
parent | d0258ca59dd529799092d768eec52c6cad7321c8 (diff) |
util: Use VOID type for X channels in format descriptions.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_pack.py')
-rw-r--r-- | src/gallium/auxiliary/util/u_format_pack.py | 16 |
1 files changed, 8 insertions, 8 deletions
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 |