[Piglit] [PATCH 12/13] GL_EXT_texture_integer: Use piglit_require_GLSL_version().

Eric Anholt eric at anholt.net
Sat Oct 15 13:19:41 PDT 2011


---
 .../fbo-integer-precision-clear.c                  |   11 +----------
 .../fbo-integer-precision-drawpixels.c             |   11 +----------
 .../fbo-integer-readpixels-sint-uint.c             |   11 +----------
 3 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c b/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c
index e8d733e..4a01cb8 100644
--- a/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c
+++ b/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c
@@ -233,17 +233,8 @@ piglit_display(void)
 void
 piglit_init(int argc, char **argv)
 {
-	bool es;
-	int glslMajor, glslMinor;
-
 	piglit_require_extension("GL_EXT_texture_integer");
-
-	piglit_get_glsl_version(&es, &glslMajor, &glslMinor);
-	if (glslMajor * 100 + glslMinor < 130) {
-		printf("%s requires GLSL 1.30 or later\n", TestName);
-		piglit_report_result(PIGLIT_SKIP);
-		return;
-	}
+	piglit_require_GLSL_version(130);
 
 	PassthroughFragShader = piglit_compile_shader_text(GL_FRAGMENT_SHADER,
 							   PassthroughFragShaderText);
diff --git a/tests/spec/ext_texture_integer/fbo-integer-precision-drawpixels.c b/tests/spec/ext_texture_integer/fbo-integer-precision-drawpixels.c
index f65e0e7..fa1bfec 100644
--- a/tests/spec/ext_texture_integer/fbo-integer-precision-drawpixels.c
+++ b/tests/spec/ext_texture_integer/fbo-integer-precision-drawpixels.c
@@ -281,17 +281,8 @@ piglit_display(void)
 void
 piglit_init(int argc, char **argv)
 {
-	bool es;
-	int glslMajor, glslMinor;
-
 	piglit_require_extension("GL_EXT_texture_integer");
-
-	piglit_get_glsl_version(&es, &glslMajor, &glslMinor);
-	if (glslMajor * 100 + glslMinor < 130) {
-		printf("%s requires GLSL 1.30 or later\n", TestName);
-		piglit_report_result(PIGLIT_SKIP);
-		return;
-	}
+	piglit_require_GLSL_version(130);
 
 	PassthroughFragShader = piglit_compile_shader_text(GL_FRAGMENT_SHADER,
 							   PassthroughFragShaderText);
diff --git a/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c b/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c
index e82f250..0596740 100644
--- a/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c
+++ b/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c
@@ -276,17 +276,8 @@ piglit_display(void)
 void
 piglit_init(int argc, char **argv)
 {
-   bool es;
-   int glslMajor, glslMinor;
-
    piglit_require_extension("GL_EXT_texture_integer");
-
-   piglit_get_glsl_version(&es, &glslMajor, &glslMinor);
-   if (glslMajor * 100 + glslMinor < 130) {
-      printf("%s requires GLSL 1.30 or later\n", TestName);
-      piglit_report_result(PIGLIT_SKIP);
-      return;
-   }
+   piglit_require_GLSL_version(130);
 
    PassthroughFragShader = piglit_compile_shader_text(GL_FRAGMENT_SHADER,
                                                       PassthroughFragShaderText);
-- 
1.7.7



More information about the Piglit mailing list