On Thu, 10 May 2012 12:11:55 -0700, Jordan Justen <[email protected]> wrote: > In test_draw_by_index (glArrayElement/glDrawElements): > * GL_UNSIGNED_BYTE: add testing 100. > * GL_UNSIGNED_SHORT: add testing 0xffff. > * GL_UNSIGNED_INT: add testing 0xffffffff. > > Signed-off-by: Jordan Justen <[email protected]> > --- > tests/general/primitive-restart.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/general/primitive-restart.c > b/tests/general/primitive-restart.c > index b79fddd..108e19b 100644 > --- a/tests/general/primitive-restart.c > +++ b/tests/general/primitive-restart.c > @@ -281,15 +281,15 @@ test_draw_by_index(GLboolean one_by_one, GLboolean > use_vbo, > > switch (indexType) { > case GL_UNSIGNED_BYTE: > - restart_index = 255; > + restart_index = use_vbo ? 0xff : 100; > typeStr = "GL_UNSIGNED_BYTE"; > break; > case GL_UNSIGNED_SHORT: > - restart_index = 1000; > + restart_index = one_by_one ? 1000 : 0xffff; > typeStr = "GL_UNSIGNED_SHORT"; > break; > case GL_UNSIGNED_INT: > - restart_index = 1000 * 1000; > + restart_index = use_vbo ? 0xffffffff : 1000 * 1000; > typeStr = "GL_UNSIGNED_INT"; > break; > default:
This looks strange to me to key which index off of some unrelated test parameter. I think you should probably test both paths both ways. For example, the driver's software fallback code is going to have different codepaths hit based on vbos or not, so you wouldn't want to never hit the sw fallback because you always have the nice cut index when vbos are used.
pgpJ901JoeGTr.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
