summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format_parse.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-04-08 17:51:31 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-04-08 19:03:40 +0100
commit948ac631123d814f3223b7fd9a00aa60e3c8bdf0 (patch)
tree5bd41258c2454a401add1b9ac45cbc87f54c076e /src/gallium/auxiliary/util/u_format_parse.py
parent350bbc946a2415c687deaeb600c7effec67d5fdc (diff)
util: is_array/mixed/etc is only meaningful for plain formats.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_parse.py')
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_parse.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format_parse.py b/src/gallium/auxiliary/util/u_format_parse.py
index 96e6451d0d..7076c676aa 100755
--- a/src/gallium/auxiliary/util/u_format_parse.py
+++ b/src/gallium/auxiliary/util/u_format_parse.py
@@ -138,6 +138,8 @@ class Format:
return nr_channels
def is_array(self):
+ if self.layout != PLAIN:
+ return False
ref_channel = self.channels[0]
for channel in self.channels[1:]:
if channel.size and (channel.size != ref_channel.size or channel.size % 8):
@@ -145,6 +147,8 @@ class Format:
return True
def is_mixed(self):
+ if self.layout != PLAIN:
+ return False
ref_channel = self.channels[0]
if ref_channel.type == VOID:
ref_channel = self.channels[1]
@@ -160,18 +164,24 @@ class Format:
return is_pot(self.block_size())
def is_int(self):
+ if self.layout != PLAIN:
+ return False
for channel in self.channels:
if channel.type not in (VOID, UNSIGNED, SIGNED):
return False
return True
def is_float(self):
+ if self.layout != PLAIN:
+ return False
for channel in self.channels:
if channel.type not in (VOID, FLOAT):
return False
return True
def is_bitmask(self):
+ if self.layout != PLAIN:
+ return False
if self.block_size() not in (8, 16, 32):
return False
for channel in self.channels: