[Piglit] [Review Request (master branch)] fbo: Use glLinkProgram after binding attributes to location.

Neha Bhende bhenden at vmware.com
Fri Jul 21 19:52:48 UTC 2017

After binding attribute location, test was assuming that attributes are
getting bind to specified location without calling glLinkProgram.
Sometime it gets lucky that attributes are bind to expected location
but sometimes it doesn't.
It fixes rendering corruption seen while running this test.
 tests/fbo/fbo-mrt-new-bind.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/fbo/fbo-mrt-new-bind.c b/tests/fbo/fbo-mrt-new-bind.c
index cba45cf..501778b 100644
--- a/tests/fbo/fbo-mrt-new-bind.c
+++ b/tests/fbo/fbo-mrt-new-bind.c
@@ -137,6 +137,7 @@ piglit_init(int argc, char **argv)
 	glBindAttribLocation(prog1, 0, "position");
 	glBindAttribLocation(prog1, 1, "texture_coord");
+	glLinkProgram(prog1);
 	if (!piglit_check_gl_error(GL_NO_ERROR)) {
 		printf("Setup for test failed.\n");

More information about the Piglit mailing list