gallium/tests: Update UTIL_FORMAT_MAX_* defines.
authorJose Fonseca <jfonseca@vmware.com>
Fri, 15 Apr 2016 14:02:02 +0000 (15:02 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Tue, 19 Apr 2016 10:28:16 +0000 (11:28 +0100)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/util/u_format_tests.h
src/gallium/tests/unit/u_format_test.c

index f59563f4f4f0b26cae9ef37acde2fb487681c2a2..d5f0b347bfa4c5bb5209e1bc49edfd85ccadf9b7 100644 (file)
@@ -34,9 +34,9 @@
 #include "pipe/p_format.h"
 
 
-#define UTIL_FORMAT_MAX_PACKED_BYTES 16
-#define UTIL_FORMAT_MAX_UNPACKED_WIDTH 4
-#define UTIL_FORMAT_MAX_UNPACKED_HEIGHT 4
+#define UTIL_FORMAT_MAX_PACKED_BYTES 32  // R64G64B64A64_FLOAT
+#define UTIL_FORMAT_MAX_UNPACKED_WIDTH 12  // ASTC 12x12
+#define UTIL_FORMAT_MAX_UNPACKED_HEIGHT 12
 
 
 /**
index 2d89e7ed45bfd80811681e10a6387792342acda2..3145d13616c071977db323a91f1fca07daa0126b 100644 (file)
@@ -693,6 +693,10 @@ test_all(void)
          continue;
       }
 
+      assert(format_desc->block.bits   <= UTIL_FORMAT_MAX_PACKED_BYTES * 8);
+      assert(format_desc->block.height <= UTIL_FORMAT_MAX_UNPACKED_HEIGHT);
+      assert(format_desc->block.width  <= UTIL_FORMAT_MAX_UNPACKED_WIDTH);
+
       if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC &&
           !util_format_s3tc_enabled) {
          continue;