[Piglit] [PATCH v2 2/2] primitive-restart: add testing of additional restart indicies

Jordan Justen jordan.l.justen at intel.com
Thu May 10 12:11:55 PDT 2012


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 <jordan.l.justen at intel.com>
---
 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:
-- 
1.7.10



More information about the Piglit mailing list