[Piglit] [PATCH 3/7] arb_fragment_program: Fix several copy-and-paste errors in minmax test

Ian Romanick idr at freedesktop.org
Thu Dec 19 11:37:31 PST 2013


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

1. The extension check was wrong: GL_ARB_vertex_program instead of
GL_ARB_fragment_program.

2. The program query was wrong: GL_VERTEX_PROGRAM_ARB instead of
GL_FRAGMENT_PROGRAM_ARB.

3. The limit for GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB was wrong: 1 (the
vertex program limit) instead of 0.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/spec/arb_fragment_program/minmax.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/spec/arb_fragment_program/minmax.c b/tests/spec/arb_fragment_program/minmax.c
index 9b4d99b..ad0109f 100644
--- a/tests/spec/arb_fragment_program/minmax.c
+++ b/tests/spec/arb_fragment_program/minmax.c
@@ -66,7 +66,7 @@ min_test_program(GLenum token, GLint min, const char *name)
 {
 	GLint val;
 
-	glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, token, &val);
+	glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, token, &val);
 
 	if (val < min) {
 		fprintf(stderr, "%-50s %8d %8d (ERROR)\n", name, min, val);
@@ -81,7 +81,7 @@ min_test_program(GLenum token, GLint min, const char *name)
 void
 piglit_init(int argc, char **argv)
 {
-	piglit_require_extension("GL_ARB_vertex_program");
+	piglit_require_extension("GL_ARB_fragment_program");
 
 	printf("%-50s %8s %8s\n", "token", "minimum", "value");
 
@@ -108,7 +108,7 @@ piglit_init(int argc, char **argv)
 	MIN_PROGRAM_TEST(GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB, 0);
 
 	if (piglit_is_extension_supported("GL_ARB_vertex_program")) {
-		MIN_PROGRAM_TEST(GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB, 1);
+		MIN_PROGRAM_TEST(GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB, 0);
 		MIN_PROGRAM_TEST(GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB, 0);
 	}
 
-- 
1.8.1.4



More information about the Piglit mailing list