Brian Paul <[email protected]> writes: > +/** > + * Test a long-ish display list to make sure Mesa's display list > + * implementation (linked list of blocks) works properly. > + * Ideally, this test should be run with valgrind. > + */ > + > +#include "piglit-util-gl-common.h" > + > + > +PIGLIT_GL_TEST_CONFIG_BEGIN > + config.supports_gl_compat_version = 10; > + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; > +PIGLIT_GL_TEST_CONFIG_END > + > + > +static GLuint > +build_long_list(void) > +{ > + static const GLfloat color[4] = { 1.0f, 0.5f, 0.25f, 1.0f }; > + GLuint list, i; > + > + list = glGenLists(1); > + glNewList(list, GL_COMPILE); > + > + /* build a list of non-vertex commands (since vertex data is > + * typically put into a VBO). > + */ > + for (i = 0; i < 10 * 1000; i++) { > + glEnable(GL_CULL_FACE); > + glLightfv(GL_LIGHT0, GL_AMBIENT, color); > + glStencilOp(GL_KEEP, GL_INCR, GL_DECR); > + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND); > + glBindTexture(GL_TEXTURE_2D, 1); > + glPointSize(1.0); > + glFogf(GL_FOG_DENSITY, 5.0); > + glDisable(GL_FOG); > + }
I like the idea, but I'd be worried that the implementation would notice these redundant state updates and drop them, defeating the test. On the other hand, if you're not that interested in pursuing it, since it appears to have served a purpose in Mesa development, Reviewed-by: Eric Anholt <[email protected]>
pgpNNw8ZzDAcN.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
