[Piglit] [PATCH 2/2] Fix link error detection in glsl-link-initializer-03.
Paul Berry
stereotype441 at gmail.com
Tue Nov 1 14:27:35 PDT 2011
Previously, this test was attempting to check the link status of a
program linked by piglit_link_simple_program() using glGetProgramiv().
But piglit_link_simple_program() returns 0 on a link failure. So the
test really just needs to verify that the two program handles returned
are nonzero.
---
tests/shaders/glsl-link-initializer-03.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/shaders/glsl-link-initializer-03.c b/tests/shaders/glsl-link-initializer-03.c
index bba3778..9c3845d 100644
--- a/tests/shaders/glsl-link-initializer-03.c
+++ b/tests/shaders/glsl-link-initializer-03.c
@@ -71,9 +71,10 @@ void piglit_init(int argc, char **argv)
prog_a = piglit_link_simple_program(vert[0], vert[1]);
prog_b = piglit_link_simple_program(vert[0], vert[2]);
- glGetProgramiv(prog_a, GL_LINK_STATUS, &a);
- glGetProgramiv(prog_b, GL_LINK_STATUS, &b);
-
- piglit_report_result((a && b) ? PIGLIT_PASS : PIGLIT_FAIL);
+ /* piglit_link_simple_program() returns 0 on link failure. So
+ * verify that there was no link failure by simply checking
+ * that two programs were returned.
+ */
+ piglit_report_result((prog_a && prog_b) ? PIGLIT_PASS : PIGLIT_FAIL);
}
--
1.7.6.4
More information about the Piglit
mailing list