[Piglit] [PATCH 1/4] GL_ARB_texture_compression/invalid_formats: Add GL_OES_compressed_ETC1_RGB8_texture

Ian Romanick idr at freedesktop.org
Mon Aug 19 16:35:50 PDT 2013


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Anuj Phogat <anuj.phogat at gmail.com>
---
 .../spec/arb_texture_compression/invalid-formats.c | 30 +++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/tests/spec/arb_texture_compression/invalid-formats.c b/tests/spec/arb_texture_compression/invalid-formats.c
index 940e12c..1fbc281 100644
--- a/tests/spec/arb_texture_compression/invalid-formats.c
+++ b/tests/spec/arb_texture_compression/invalid-formats.c
@@ -212,6 +212,26 @@ static const struct format_list paletted_formats = {
 };
 
 /**
+ * Format belonging to GL_OES_compressed_ETC1_RGB8_texture.
+ *
+ * The GL_OES_compressed_ETC1_RGB8_texture spec says:
+ *
+ *     "New State
+ *
+ *         The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
+ *         COMPRESSED_TEXTURE_FORMATS include ETC1_RGB8_OES."
+ */
+static const struct format_list etc1_formats = {
+	{
+		{ ENUM_AND_STRING(GL_ETC1_RGB8_OES) },
+		{ NULL, 0 },
+	},
+	{
+		{ 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
@@ -226,7 +246,8 @@ const char *all_formats[] = {
 	"3dc",
 	"rgtc",
 	"srgb",
-	"paletted"
+	"paletted",
+	"etc1",
 };
 
 enum piglit_result
@@ -438,6 +459,13 @@ piglit_init(int argc, char **argv)
 					   check_errors,
 					   piglit_is_extension_supported("GL_OES_compressed_paletted_texture"))
 				&& pass;
+		} else if (strcmp(argv[i], "etc1") == 0) {
+			pass = try_formats(&etc1_formats,
+					   compressed_formats,
+					   num_compressed_formats,
+					   check_errors,
+					   piglit_is_extension_supported("GL_OES_compressed_ETC1_RGB8_texture")
+				&& pass;
 		} else {
 			fprintf(stderr,
 				"Unrecognized selection `%s'\n", argv[i]);
-- 
1.8.1.4



More information about the Piglit mailing list