if (nr != push) {
count--;
elts++;
- BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
- OUT_RING (ctx->chan, 0);
- OUT_RING (ctx->chan, NVA0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT |
- (ctx->prim & ~NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT));
+ BEGIN_RING(ctx->chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (ctx->chan, ctx->restart_index);
}
}
}
if (nr != push) {
count--;
elts++;
- BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
- OUT_RING (ctx->chan, 0);
- OUT_RING (ctx->chan, NVA0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT |
- (ctx->prim & ~NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT));
+ BEGIN_RING(ctx->chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (ctx->chan, ctx->restart_index);
}
}
}
if (nr != push) {
count--;
elts++;
- BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
- OUT_RING (ctx->chan, 0);
- OUT_RING (ctx->chan, NVA0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT |
- (ctx->prim & ~NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT));
+ BEGIN_RING(ctx->chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (ctx->chan, ctx->restart_index);
}
}
}
ctx.instance_id = info->start_instance;
ctx.prim = nv50_prim_gl(info->mode);
+ if (info->primitive_restart) {
+ BEGIN_RING(ctx.chan, RING_3D(PRIM_RESTART_ENABLE), 2);
+ OUT_RING (ctx.chan, 1);
+ OUT_RING (ctx.chan, info->restart_index);
+ } else
+ if (nv50->state.prim_restart) {
+ BEGIN_RING(ctx.chan, RING_3D(PRIM_RESTART_ENABLE), 1);
+ OUT_RING (ctx.chan, 0);
+ }
+ nv50->state.prim_restart = info->primitive_restart;
+
while (inst--) {
BEGIN_RING(ctx.chan, RING_3D(VERTEX_BEGIN_GL), 1);
OUT_RING (ctx.chan, ctx.prim);