From: Ian Romanick <[email protected]>

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 <[email protected]>
---
 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

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to