nv40: the 0x4497 version of curie doesn't support index buffers.
authorBen Skeggs <skeggsb@gmail.com>
Sun, 3 Feb 2008 14:37:07 +0000 (01:37 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 15 Feb 2008 02:50:29 +0000 (13:50 +1100)
src/mesa/pipe/nv40/nv40_vbo.c

index 3fa8ddcb81b1b7641db784962bf71badbd744c11..0bb54c7610e3ca135b1c5f01c94f460332773298 100644 (file)
@@ -391,12 +391,17 @@ nv40_draw_elements(struct pipe_context *pipe,
                   struct pipe_buffer *indexBuffer, unsigned indexSize,
                   unsigned mode, unsigned start, unsigned count)
 {
-       if (indexSize != 1) {
-               nv40_draw_elements_vbo(pipe, indexBuffer, indexSize,
-                                      mode, start, count);
-       } else {
+       struct nv40_context *nv40 = nv40_context(pipe);
+
+       /* 0x4497 doesn't support real index buffers, and there doesn't appear
+        * to be support on any chipset for 8-bit indices.
+        */
+       if (nv40->curie->grclass == NV44TCL || indexSize == 1) {
                nv40_draw_elements_inline(pipe, indexBuffer, indexSize,
                                          mode, start, count);
+       } else {
+               nv40_draw_elements_vbo(pipe, indexBuffer, indexSize,
+                                      mode, start, count);
        }
 
        pipe->flush(pipe, 0);