- /* Locked drawarrays. Reuse any previously transformed data.
- */
- _tnl_vb_bind_arrays( ctx, ctx->Array.LockFirst, ctx->Array.LockCount );
- VB->FirstPrimitive = start;
- VB->Primitive[start] = mode | PRIM_BEGIN | PRIM_END | PRIM_LAST;
- VB->PrimitiveLength[start] = count - start;
- tnl->Driver.RunPipeline( ctx );
- } else {
- /* The arrays are small enough to fit in a single VB; just bind
- * them and go. Any untransformed data will be copied on
- * clipping.
- *
- * Invalidate any cached data dependent on these arrays.
- */
- _tnl_vb_bind_arrays( ctx, start, count );
- VB->FirstPrimitive = 0;
- VB->Primitive[0] = mode | PRIM_BEGIN | PRIM_END | PRIM_LAST;
- VB->PrimitiveLength[0] = count - start;
- tnl->pipeline.run_input_changes |= ctx->Array._Enabled;
- tnl->Driver.RunPipeline( ctx );
- tnl->pipeline.run_input_changes |= ctx->Array._Enabled;
- }
- }
+ tnl->vb.Primitive = &prim;
+ tnl->vb.Primitive[0].mode = mode | PRIM_BEGIN | PRIM_END;
+ tnl->vb.Primitive[0].start = start;
+ tnl->vb.Primitive[0].count = count;
+ tnl->vb.PrimitiveCount = 1;
+
+ tnl->Driver.RunPipeline( ctx );
+ }