vbo: Use _DrawVAO for array type draw commands.
authorMathias Fröhlich <mathias.froehlich@web.de>
Sat, 3 Feb 2018 18:42:20 +0000 (19:42 +0100)
committerMathias Fröhlich <mathias.froehlich@web.de>
Fri, 23 Feb 2018 04:33:50 +0000 (05:33 +0100)
commit195bb990ed1a76e5ea9dd37af51f8270e9c3bf7d
tree60efeeed2d9427238d91f2748d320658b8979cc0
parent6002ab564bfb643d5e9fd1b8c3c7c45384de570a
vbo: Use _DrawVAO for array type draw commands.

Switch over to use the _DrawVAO for all the array type draws.
The _DrawVAO needs to be set before we enter _mesa_update_state, so move
setting the draw method in front of the first call to _mesa_update_state
which is in turn called from the *validate*Draw* calls. Using the
gl_vertex_array_object::_Enabled bitmask, gl_vertex_program_state::_VPMode
and gl_vertex_array_object::_AttributeMapMode we can already set
varying_vp_inputs before we call _mesa_update_state the first time.
Thus remove duplicate state validation.

v2: Update comments.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/vbo/vbo_context.c
src/mesa/vbo/vbo_exec.h
src/mesa/vbo/vbo_exec_array.c