diff options
author | Mathias Fröhlich <[email protected]> | 2018-03-25 19:16:54 +0200 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-03-31 06:32:14 +0200 |
commit | 245f9a3977dcc097ded07c535b589b82191d5e94 (patch) | |
tree | 900515e70bb0902dca9dde2a3fc566ba0d467dbd /src/mesa/vbo/vbo.h | |
parent | 461698af267f8001aa339c8ca1aec937083ad8fb (diff) |
vbo: Readd the arrays argument to the legacy draw methods.
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 <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo.h')
-rw-r--r-- | src/mesa/vbo/vbo.h | 2 |
1 files changed, 2 insertions, 0 deletions
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, |