[Piglit] [PATCH] general: better test display lists in attribute test

Timothy Arceri tarceri at itsqueeze.com
Sun Jun 24 01:52:23 UTC 2018


We weren't really testing that the displays list worked since
the calls could have just been executed immediately.
---
 tests/general/attribs.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/general/attribs.c b/tests/general/attribs.c
index 05a0d4a1e..ddb0b060a 100644
--- a/tests/general/attribs.c
+++ b/tests/general/attribs.c
@@ -107,6 +107,18 @@ static void draw_quad(unsigned mode, float *v,
 		}
 		glEnd();
 		glEndList();
+
+		/* Clear to make sure the calls didn't get executed
+		 * immediately.
+		 */
+		glBegin(GL_QUADS);
+		for (i = 0; i < 4; i++) {
+			attrib(0.1, 0.1, 0.1, 0.1);
+			glVertex2fv(&verts[i*2]);
+		}
+		glEnd();
+
+		/* Now call the display list */
 		glCallList(1);
 		break;
 	default:
-- 
2.17.1



More information about the Piglit mailing list