[Piglit] [PATCH] getteximage-targets: Allow S3TC tests with GL_ANGLE_texture_compression_dxt5

Ian Romanick idr at freedesktop.org
Fri Dec 13 16:34:32 PST 2013


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

Since this test only uses pre-compressed DXT5 data, it can safely run
with GL_ANGLE_texture_compression_dxt5.  This extension is advertised
by at least the Mesa i965 driver even when libtxc_dxtn is not
installed.

NOTE: This may make some previously skipped tests fail (or crash) on
the i965 driver.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/texturing/getteximage-targets.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/texturing/getteximage-targets.c b/tests/texturing/getteximage-targets.c
index 383ee03..fa93550 100644
--- a/tests/texturing/getteximage-targets.c
+++ b/tests/texturing/getteximage-targets.c
@@ -127,7 +127,15 @@ void piglit_init(int argc, char **argv)
 		if (strcmp(argv[i], "S3TC") == 0) {
 			internalformat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
 			tolerance = 8;
-			piglit_require_extension("GL_EXT_texture_compression_s3tc");
+			if (!piglit_is_extension_supported("GL_EXT_texture_compression_s3tc")
+			    && !piglit_is_extension_supported("GL_ANGLE_texture_compression_dxt5")) {
+				fprintf(stderr,
+					"S3TC testing requires either "
+					"GL_EXT_texture_compression_s3tc or "
+					"GL_ANGLE_texture_compression_dxt5 "
+					"extension be supported.\n");
+				piglit_report_result(PIGLIT_SKIP);
+			}
 			puts("Testing S3TC.");
 		}
 	}
-- 
1.8.1.4



More information about the Piglit mailing list