From 245f9a3977dcc097ded07c535b589b82191d5e94 Mon Sep 17 00:00:00 2001 From: Mathias Fröhlich Date: Sun, 25 Mar 2018 19:16:54 +0200 Subject: vbo: Readd the arrays argument to the legacy draw methods. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The legacy draw paths from back before 2012 contained a gl_vertex_array array for the inputs to be used for draw. So all draw methods from legacy drivers and everything that goes through tnl are originally written for this calling convention. The same goes for tools like t_rebase or vbo_split*, that even partly still have the original calling convention with a currently unused such pointer. Back in 2012 patch 50f7e75 mesa: move gl_client_array*[] from vbo_draw_func into gl_context introduced Array._DrawArrays, which was something that was IMO aiming for a similar direction than Array._DrawVAO introduced recently. Now several tools like t_rebase and vbo_split*, which are mostly used by tnl based drivers, would need to be converted to use the internal Array._DrawVAO instead of Array._DrawArrays. The same goes for the driver backends that use any of these tools. Alternatively we can reintroduce the gl_vertex_array array in its call argument list and put these tools finally into the tnl directory. So this change reintroduces this gl_vertex_array array for the legacy draw paths that are still required for the tools t_rebase and vbo_split*. A followup will move vbo_split also into tnl. Note that none of the affected drivers use the DriverFlags.NewArray driver bit. So it should be safe to remove this also for the legacy draw path. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/vbo/vbo.h') diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index 13f77d9db37..37aa59d3061 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -145,6 +145,7 @@ vbo_save_EndCallList(struct gl_context *ctx); * Draw a number of primitives. * \param prims array [nr_prims] describing what to draw (prim type, * vertex count, first index, instance count, etc). + * \param arrays array of vertex arrays for draw * \param ib index buffer for indexed drawing, NULL for array drawing * \param index_bounds_valid are min_index and max_index valid? * \param min_index lowest vertex index used @@ -158,6 +159,7 @@ vbo_save_EndCallList(struct gl_context *ctx); * This may be deprecated in the future */ typedef void (*vbo_draw_func)(struct gl_context *ctx, + const struct gl_vertex_array* arrays, const struct _mesa_prim *prims, GLuint nr_prims, const struct _mesa_index_buffer *ib, -- cgit v1.2.3