vbo: remove dead code in vbo_can_merge_prims
[mesa.git] / src / mesa / vbo / vbo_exec.c
index 34dbc001c927861db43848fc4e953f349a97e643..f1b1f8bff955dc37351d4ad3e47bc4f9a909b87a 100644 (file)
@@ -109,23 +109,17 @@ _vbo_attribute_alias_map[VP_MODE_MAX][VERT_ATTRIB_MAX] = {
 
 
 void
-vbo_exec_init(struct gl_context *ctx)
+vbo_exec_init(struct gl_context *ctx, bool use_buffer_objects)
 {
    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
 
    exec->ctx = ctx;
 
-   /* aelt_context should have been created by the caller */
-   assert(ctx->aelt_context);
-
-   vbo_exec_vtx_init(exec);
+   vbo_exec_vtx_init(exec, use_buffer_objects);
 
    ctx->Driver.NeedFlush = 0;
    ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
 
-   /* The aelt_context state should still be dirty from its creation */
-   assert(_ae_is_state_dirty(ctx));
-
    exec->eval.recalculate_maps = GL_TRUE;
 }
 
@@ -134,11 +128,6 @@ void vbo_exec_destroy( struct gl_context *ctx )
 {
    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
 
-   if (ctx->aelt_context) {
-      _ae_destroy_context( ctx );
-      ctx->aelt_context = NULL;
-   }
-
    vbo_exec_vtx_destroy( exec );
 }
 
@@ -202,10 +191,9 @@ vbo_can_merge_prims(const struct _mesa_prim *p0, const struct _mesa_prim *p1)
    if (p0->start + p0->count != p1->start)
       return false;
 
-   if (p0->basevertex != p1->basevertex ||
-       p0->num_instances != p1->num_instances ||
-       p0->base_instance != p1->base_instance)
-      return false;
+   assert(p0->basevertex == p1->basevertex &&
+          p0->num_instances == p1->num_instances &&
+          p0->base_instance == p1->base_instance);
 
    /* can always merge subsequent GL_POINTS primitives */
    if (p0->mode == GL_POINTS)