r600g: Use the actual Evergreen functions to query format support on Evergreen.
[mesa.git] / src / gallium / auxiliary / util / u_format_parse.py
index 96e6451d0d259af76ee890e69755d3190609cb6f..ddb9f2443d9b805fba7b9b78f77940c59fa230c0 100755 (executable)
@@ -43,7 +43,7 @@ ZS = 'zs'
 
 
 def is_pot(x):
-   return (x & (x - 1)) == 0;
+   return (x & (x - 1)) == 0
 
 
 VERY_LARGE = 99999999999999999999999
@@ -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: