summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-07 12:43:27 +1000
committerTimothy Arceri <[email protected]>2017-06-09 09:13:46 +1000
commit99987fe92e5e109d7a0c114477cba52cdc6629b5 (patch)
tree7948f3be293617402f563115f53f3cb28e382368 /src/mesa/vbo/vbo_exec.c
parentf77740f14b9057de09e61e1abf086f08a68c5a1b (diff)
mesa: rework vbo_exec_init()
Here we make some assumptions about the AEcontext and set the recalculate bools directly. Some formating fixes are also made while we are here. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec.c')
-rw-r--r--src/mesa/vbo/vbo_exec.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 4db4f4088b9..de8461f1fcc 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -34,24 +34,26 @@
-void vbo_exec_init( struct gl_context *ctx )
+void
+vbo_exec_init(struct gl_context *ctx)
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
exec->ctx = ctx;
- /* Initialize the arrayelt helper
- */
- if (!ctx->aelt_context &&
- !_ae_create_context( ctx ))
- return;
+ /* aelt_context should have been created by the caller */
+ assert(ctx->aelt_context);
- vbo_exec_vtx_init( exec );
+ vbo_exec_vtx_init(exec);
ctx->Driver.NeedFlush = 0;
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
- vbo_exec_invalidate_state( ctx, ~0 );
+ /* The aelt_context state should still be dirty from its creation */
+ assert(_ae_is_state_dirty(ctx));
+
+ exec->array.recalculate_inputs = GL_TRUE;
+ exec->eval.recalculate_maps = GL_TRUE;
}