diff options
author | Mathias Fröhlich <[email protected]> | 2018-02-03 19:42:20 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-02-23 05:33:50 +0100 |
commit | 195bb990ed1a76e5ea9dd37af51f8270e9c3bf7d (patch) | |
tree | 60efeeed2d9427238d91f2748d320658b8979cc0 /src/mesa/vbo/vbo_context.c | |
parent | 6002ab564bfb643d5e9fd1b8c3c7c45384de570a (diff) |
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_context.c')
-rw-r--r-- | src/mesa/vbo/vbo_context.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index 7b1ebc68f16..222bdcf1f27 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -206,11 +206,15 @@ vbo_exec_invalidate_state(struct gl_context *ctx) struct vbo_exec_context *exec = &vbo->exec; if (ctx->NewState & (_NEW_PROGRAM | _NEW_ARRAY)) { - if (!exec->validating) - exec->array.recalculate_inputs = GL_TRUE; + exec->array.recalculate_inputs = GL_TRUE; _ae_invalidate_state(ctx); } + /* If _mesa_update_state is called in a non draw code path, + * changes in the VAO need to be captured. + */ + if (ctx->Array.VAO->NewArrays) + exec->array.recalculate_inputs = GL_TRUE; if (ctx->NewState & _NEW_EVAL) exec->eval.recalculate_maps = GL_TRUE; |