diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-10-15 17:23:34 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-10-15 17:25:53 -0700 |
commit | a0c247597de5837686a9066ba741837b2d971c69 (patch) | |
tree | 382040a31ac405f7250ab564ca09435e22b6319d /tests/shaders/glsl-explicit-location-03.c | |
parent | 05c4cdd483899b537293bcf78bd1945cda3bbfe4 (diff) |
Refactor open-coded routines to piglit_link_check_status_quiet
Diffstat (limited to 'tests/shaders/glsl-explicit-location-03.c')
-rw-r--r-- | tests/shaders/glsl-explicit-location-03.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/tests/shaders/glsl-explicit-location-03.c b/tests/shaders/glsl-explicit-location-03.c index 6e9f6dfab..b288280bb 100644 --- a/tests/shaders/glsl-explicit-location-03.c +++ b/tests/shaders/glsl-explicit-location-03.c @@ -42,33 +42,6 @@ piglit_display(void) return PIGLIT_FAILURE; } -/** - * Don't use piglit_link_check_status because it will log a message to stderr - * when the link fails. Since this test wants the link to fail, logging an - * error message will cause the test to be listed as "warn" instead of "pass". - */ -GLboolean -link_check_status(GLint prog) -{ - GLint ok; - - glGetProgramiv(prog, GL_LINK_STATUS, &ok); - if (!ok) { - GLchar *info; - GLint size; - - glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size); - info = malloc(size); - - glGetProgramInfoLog(prog, size, NULL, info); - printf("Failed to link: %s\n", info); - - free(info); - } - - return ok; -} - void piglit_init(int argc, char **argv) { GLint vert[2]; @@ -93,7 +66,7 @@ void piglit_init(int argc, char **argv) glAttachShader(prog, vert[1]); glLinkProgram(prog); - ok = link_check_status(prog); + ok = piglit_link_check_status_quiet(prog); if (ok) fprintf(stderr, "Linking with conflicting explicit locations " |