vbo: Readd the arrays argument to the legacy draw methods.
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_vbo_t.c
index 10b5c15e41da96c793458da75b0606c0ec92a15b..4533069692c1235a2a10a49523776fed7a808720 100644 (file)
@@ -239,6 +239,7 @@ get_max_client_stride(struct gl_context *ctx, const struct gl_vertex_array *arra
 
 static void
 TAG(vbo_render_prims)(struct gl_context *ctx,
+                     const struct gl_vertex_array *arrays,
                      const struct _mesa_prim *prims, GLuint nr_prims,
                      const struct _mesa_index_buffer *ib,
                      GLboolean index_bounds_valid,
@@ -476,6 +477,7 @@ vbo_draw_imm(struct gl_context *ctx, const struct gl_vertex_array *arrays,
 
 static void
 TAG(vbo_render_prims)(struct gl_context *ctx,
+                     const struct gl_vertex_array *arrays,
                      const struct _mesa_prim *prims, GLuint nr_prims,
                      const struct _mesa_index_buffer *ib,
                      GLboolean index_bounds_valid,
@@ -485,7 +487,6 @@ TAG(vbo_render_prims)(struct gl_context *ctx,
                      struct gl_buffer_object *indirect)
 {
        struct nouveau_render_state *render = to_render_state(ctx);
-       const struct gl_vertex_array *arrays = ctx->Array._DrawArrays;
 
        if (!index_bounds_valid)
                vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index,
@@ -514,6 +515,7 @@ TAG(vbo_render_prims)(struct gl_context *ctx,
 
 static void
 TAG(vbo_check_render_prims)(struct gl_context *ctx,
+                           const struct gl_vertex_array *arrays,
                            const struct _mesa_prim *prims, GLuint nr_prims,
                            const struct _mesa_index_buffer *ib,
                            GLboolean index_bounds_valid,
@@ -527,12 +529,12 @@ TAG(vbo_check_render_prims)(struct gl_context *ctx,
        nouveau_validate_framebuffer(ctx);
 
        if (nctx->fallback == HWTNL)
-               TAG(vbo_render_prims)(ctx, prims, nr_prims, ib,
+               TAG(vbo_render_prims)(ctx, arrays, prims, nr_prims, ib,
                                      index_bounds_valid, min_index, max_index,
                                      tfb_vertcount, stream, indirect);
 
        if (nctx->fallback == SWTNL)
-               _tnl_draw_prims(ctx, prims, nr_prims, ib,
+               _tnl_draw_prims(ctx, arrays, prims, nr_prims, ib,
                                index_bounds_valid, min_index, max_index,
                                tfb_vertcount, stream, indirect);
 }
@@ -550,7 +552,8 @@ TAG(vbo_draw)(struct gl_context *ctx,
        /* Borrow and update the inputs list from the tnl context */
        _tnl_bind_inputs(ctx);
 
-       TAG(vbo_check_render_prims)(ctx, prims, nr_prims, ib,
+       TAG(vbo_check_render_prims)(ctx, ctx->Array._DrawArrays,
+                                   prims, nr_prims, ib,
                                    index_bounds_valid, min_index, max_index,
                                    tfb_vertcount, stream, indirect);
 }