[Piglit] [PATCH 3/5] arb_get_texture_sub_image: Allow compressed test to run with GL_EXT_texture_compression_dxt1 and friends

Ian Romanick idr at freedesktop.org
Wed Dec 2 08:43:54 PST 2015


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

All of the data is pre-compressed DXT[134] textures, so there is no need
for any of the more functional S3TC related extensions.

Also... GL_ARB_texture_non_power_of_two is a required part of OpenGL
2.0.  Since the test already requires OpenGL 2.0, there is no reason to
also check for the extension.

At some point someone should modify this test to exercise the
extension with the full set of compressed texture formats supported by
the implementation...

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/spec/arb_get_texture_sub_image/getcompressed.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/spec/arb_get_texture_sub_image/getcompressed.c b/tests/spec/arb_get_texture_sub_image/getcompressed.c
index 488cde9..1a65607 100644
--- a/tests/spec/arb_get_texture_sub_image/getcompressed.c
+++ b/tests/spec/arb_get_texture_sub_image/getcompressed.c
@@ -291,8 +291,17 @@ piglit_init(int argc, char **argv)
 
 	piglit_require_extension("GL_ARB_get_texture_sub_image");
 	piglit_require_extension("GL_ARB_compressed_texture_pixel_storage");
-	piglit_require_extension("GL_EXT_texture_compression_s3tc");
-	piglit_require_extension("GL_ARB_texture_non_power_of_two");
+
+	if (!piglit_is_extension_supported("GL_EXT_texture_compression_s3tc") &&
+	    !(piglit_is_extension_supported("GL_EXT_texture_compression_dxt1") &&
+	      piglit_is_extension_supported("GL_ANGLE_texture_compression_dxt3") &&
+	      piglit_is_extension_supported("GL_ANGLE_texture_compression_dxt5"))) {
+                printf("Test requires either GL_EXT_texture_compression_s3tc "
+		       "or GL_EXT_texture_compression_dxt1, "
+		       "GL_ANGLE_texture_compression_dxt3, and "
+		       "GL_ANGLE_texture_compression_dxt5\n");
+                piglit_report_result(PIGLIT_SKIP);
+        }
 
 	pass = test_getsubimage(GL_TEXTURE_2D, 256, 128, 1,
 				GL_COMPRESSED_RGB_S3TC_DXT1_EXT) && pass;
-- 
2.5.0



More information about the Piglit mailing list