nv40: fix inline u08/u16 indices
authorBen Skeggs <skeggsb@gmail.com>
Tue, 12 Feb 2008 04:13:37 +0000 (15:13 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 15 Feb 2008 02:51:11 +0000 (13:51 +1100)
src/mesa/pipe/nv40/nv40_vbo.c

index 552058b3ae7d0f99f7dab907cc25f51c22b20a88..4e9cdb4585ab6ebe3046bf758735c082cc4f0054 100644 (file)
@@ -235,9 +235,9 @@ nv40_draw_elements_u08(struct nv40_context *nv40, void *ib,
        }
 
        while (count) {
-               push = MIN2(count, 2046);
+               push = MIN2(count, 2047 * 2);
 
-               BEGIN_RING_NI(curie, NV40TCL_VB_ELEMENT_U16, push);
+               BEGIN_RING_NI(curie, NV40TCL_VB_ELEMENT_U16, push >> 1);
                for (i = 0; i < push; i+=2)
                        OUT_RING((elts[i+1] << 16) | elts[i]);
 
@@ -260,9 +260,9 @@ nv40_draw_elements_u16(struct nv40_context *nv40, void *ib,
        }
 
        while (count) {
-               push = MIN2(count, 2046);
+               push = MIN2(count, 2047 * 2);
 
-               BEGIN_RING_NI(curie, NV40TCL_VB_ELEMENT_U16, push);
+               BEGIN_RING_NI(curie, NV40TCL_VB_ELEMENT_U16, push >> 1);
                for (i = 0; i < push; i+=2)
                        OUT_RING((elts[i+1] << 16) | elts[i]);