BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
- ctx->translate->run_elts8(ctx->translate, elts, push, 0, ctx->chan->cur);
+ ctx->translate->run_elts8(ctx->translate, elts, nr, 0, ctx->chan->cur);
ctx->chan->cur += size;
- count -= push;
- elts += push;
+ count -= nr;
+ elts += nr;
if (nr != push) {
+ count--;
+ elts++;
BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
OUT_RING (ctx->chan, 0);
OUT_RING (ctx->chan, ctx->prim);
BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
- ctx->translate->run_elts16(ctx->translate, elts, push, 0, ctx->chan->cur);
+ ctx->translate->run_elts16(ctx->translate, elts, nr, 0, ctx->chan->cur);
ctx->chan->cur += size;
- count -= push;
- elts += push;
+ count -= nr;
+ elts += nr;
if (nr != push) {
+ count--;
+ elts++;
BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
OUT_RING (ctx->chan, 0);
OUT_RING (ctx->chan, ctx->prim);
BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
- ctx->translate->run_elts(ctx->translate, elts, push, 0, ctx->chan->cur);
+ ctx->translate->run_elts(ctx->translate, elts, nr, 0, ctx->chan->cur);
ctx->chan->cur += size;
- count -= push;
- elts += push;
+ count -= nr;
+ elts += nr;
if (nr != push) {
+ count--;
+ elts++;
BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
OUT_RING (ctx->chan, 0);
OUT_RING (ctx->chan, ctx->prim);
if (info->primitive_restart) {
BEGIN_RING(chan, RING_3D(PRIM_RESTART_INDEX), 1);
OUT_RING (chan, info->restart_index);
+
+ if (info->restart_index > 65535)
+ shorten = FALSE;
}
nvc0_draw_elements(nvc0, shorten,