vbo: Readd the arrays argument to the legacy draw methods.
authorMathias Fröhlich <mathias.froehlich@web.de>
Sun, 25 Mar 2018 17:16:54 +0000 (19:16 +0200)
committerMathias Fröhlich <Mathias.Froehlich@gmx.net>
Sat, 31 Mar 2018 04:32:14 +0000 (06:32 +0200)
commit245f9a3977dcc097ded07c535b589b82191d5e94
tree900515e70bb0902dca9dde2a3fc566ba0d467dbd
parent461698af267f8001aa339c8ca1aec937083ad8fb
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 <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
src/mesa/tnl/t_draw.c
src/mesa/tnl/t_rebase.c
src/mesa/tnl/tnl.h
src/mesa/vbo/vbo.h
src/mesa/vbo/vbo_split_copy.c
src/mesa/vbo/vbo_split_inplace.c