[Piglit] [PATCH 1/2] shader_runner: Fix error reporting when vertex data included.

Paul Berry stereotype441 at gmail.com
Wed Aug 7 14:08:37 PDT 2013


Previously, if a link error occurred in a test that included a
"[vertex data]" section, we would go ahead and try to set up the
vertex input data anyhow, resulting in confusing GL errors.  Now we
only try to set up the vertex input data if linking succeeds.
---
 tests/shaders/shader_runner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 5d8250e..b716b87 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1982,7 +1982,7 @@ piglit_init(int argc, char **argv)
 
 	process_test_script(argv[1]);
 	link_and_use_shaders();
-	if (vertex_data_start != NULL) {
+	if (link_ok && vertex_data_start != NULL) {
 		program_must_be_in_use();
 		if (gl_version.num >= 31) {
 			GLuint vao;
-- 
1.8.3.4



More information about the Piglit mailing list