summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanley Chery <nanley.g.chery@intel.com>2015-07-27 10:07:53 -0700
committerNanley Chery <nanley.g.chery@intel.com>2015-10-05 16:05:04 -0700
commitebee6dab2ba4290c8748be05116cc86eecf63dc3 (patch)
tree1ef364fd1da74c1bbb07d6aad4ad5d55dc4e6251
parent1e258ce22523a25a3620631c0694aeb60772f98f (diff)
arb_texture_compression/invalid-formats: Add ASTC to list of formats
ASTC formats are added to the list of formats that should not be returned by the COMPRESSED_TEXTURE_FORMATS query. v2. add astc test to all.py (Chad). Reviewed-by: Chad Versace <chad.versace@intel.com> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
-rw-r--r--tests/all.py5
-rw-r--r--tests/spec/arb_texture_compression/invalid-formats.c51
2 files changed, 55 insertions, 1 deletions
diff --git a/tests/all.py b/tests/all.py
index 679991c77..5de1c8cb3 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4168,6 +4168,11 @@ with profile.group_manager(
g(['oes_compressed_etc1_rgb8_texture-miptree'], 'miptree')
with profile.group_manager(
+ PiglitGLTest,
+ grouptools.join('spec', 'khr_texture_compression_astc')) as g:
+ g(['arb_texture_compression-invalid-formats', 'astc'], 'invalid formats')
+
+with profile.group_manager(
PiglitGLTest,
grouptools.join('spec', 'oes_compressed_paletted_texture')) as g:
g(['oes_compressed_paletted_texture-api'], 'basic API')
diff --git a/tests/spec/arb_texture_compression/invalid-formats.c b/tests/spec/arb_texture_compression/invalid-formats.c
index e67f00ee8..7a081bf5e 100644
--- a/tests/spec/arb_texture_compression/invalid-formats.c
+++ b/tests/spec/arb_texture_compression/invalid-formats.c
@@ -76,7 +76,7 @@ struct format_list {
/**
* Formats that are part of the extension but should not be exposed.
*/
- struct format_tuple bad[5];
+ struct format_tuple bad[29];
};
/**
@@ -267,6 +267,46 @@ static const struct format_list etc2_formats = {
};
/**
+ * Formats belonging to GL_KHR_texture_compression_astc_ldr
+ */
+static const struct format_list astc_formats = {
+ {
+ { NULL, 0 },
+ },
+ {
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_4x4_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_5x4_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_5x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_6x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_6x6_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_8x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_8x6_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_8x8_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_10x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_10x6_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_10x8_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_10x10_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_12x10_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_RGBA_ASTC_12x12_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR) },
+ { ENUM_AND_STRING(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR) },
+ { NULL, 0 },
+ }
+};
+
+/**
* List of all known compression methods to test
*
* The dummy first element is because this list is used by \c main to replace
@@ -284,6 +324,7 @@ const char *all_formats[] = {
"paletted",
"etc1",
"etc2",
+ "astc",
};
enum piglit_result
@@ -520,6 +561,14 @@ piglit_init(int argc, char **argv)
piglit_is_extension_supported("GL_ARB_ES3_compatibility"),
true)
&& pass;
+ } else if (strcmp(argv[i], "astc") == 0) {
+ pass = try_formats(&astc_formats,
+ compressed_formats,
+ num_compressed_formats,
+ check_errors,
+ piglit_is_extension_supported("GL_KHR_texture_compression_astc_ldr"),
+ false)
+ && pass;
} else {
fprintf(stderr,
"Unrecognized selection `%s'\n", argv[i]);