[Piglit] [PATCH] texturing/cubemap: Add an "s3tc" option to use an DXT1 internal format.

Kenneth Graunke kenneth at whitecape.org
Wed Aug 3 12:28:45 PDT 2011


The i965 driver currently fails this horribly.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 tests/texturing/cubemap.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tests/texturing/cubemap.c b/tests/texturing/cubemap.c
index fd21b50..2c73ebc 100644
--- a/tests/texturing/cubemap.c
+++ b/tests/texturing/cubemap.c
@@ -34,6 +34,7 @@ int piglit_width = (64 * 6 + PAD * 9) * 2;
 int piglit_height = 400;
 
 int max_size;
+int internal_format = GL_RGB;
 
 static GLfloat colors[][3] = {
 	{1.0, 1.0, 1.0},
@@ -286,7 +287,9 @@ piglit_init(int argc, char **argv)
 		if (strcmp(argv[i], "npot") == 0) {
 			piglit_require_extension("GL_ARB_texture_non_power_of_two");
 			max_size = 50;
-			break;
+		} else if (strcmp(argv[i], "s3tc") == 0) {
+			piglit_require_extension("GL_EXT_texture_compression_s3tc");
+			internal_format = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
 		}
 	}
 }
-- 
1.7.6



More information about the Piglit mailing list