[Piglit] [PATCH] arb_internalformat_query-minmax: add more version/ext checking

Brian Paul brianp at vmware.com
Fri Sep 13 11:49:53 PDT 2013


The valid_formats[] list includes formats supported either by
GL 3.0 or GL_EXT_texture_float and GL_EXT_texture_rg.
---
 tests/spec/arb_internalformat_query/minmax.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/spec/arb_internalformat_query/minmax.c b/tests/spec/arb_internalformat_query/minmax.c
index c15b954..0266451 100644
--- a/tests/spec/arb_internalformat_query/minmax.c
+++ b/tests/spec/arb_internalformat_query/minmax.c
@@ -243,6 +243,12 @@ piglit_init(int argc, char **argv)
 	piglit_require_extension("GL_ARB_framebuffer_object");
 	piglit_require_extension("GL_ARB_internalformat_query");
 
+	/* Need GL 3 or extensions to support the valid_formats[] above */
+        if (piglit_get_gl_version() < 30) {
+		piglit_require_extension("GL_ARB_texture_rg");
+		piglit_require_extension("GL_ARB_texture_float");
+	}
+
 	glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
 	for (i = 0; i < ARRAY_SIZE(valid_formats); i++) {
 		pass = try(GL_RENDERBUFFER,
-- 
1.7.10.4



More information about the Piglit mailing list