From: Ben Skeggs Date: Tue, 12 Feb 2008 04:13:37 +0000 (+1100) Subject: nv40: fix inline u08/u16 indices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d1af60edb1dbdf69fbf08b93fe0781f33f075dd;p=mesa.git nv40: fix inline u08/u16 indices --- diff --git a/src/mesa/pipe/nv40/nv40_vbo.c b/src/mesa/pipe/nv40/nv40_vbo.c index 552058b3ae7..4e9cdb4585a 100644 --- a/src/mesa/pipe/nv40/nv40_vbo.c +++ b/src/mesa/pipe/nv40/nv40_vbo.c @@ -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]);