GET_CURRENT_CONTEXT(ctx);
const AEcontext *actx = AE_CONTEXT(ctx);
const struct _glapi_table * const disp = GET_DISPATCH();
- GLboolean do_map;
+ struct gl_vertex_array_object *vao;
/* If PrimitiveRestart is enabled and the index is the RestartIndex
* then we call PrimitiveRestartNV and return.
_ae_update_state(ctx);
}
- /* Determine if we need to map/unmap VBOs */
- do_map = actx->nr_vbos && !actx->mapped_vbos;
-
- if (do_map)
- _ae_map_vbos(ctx);
+ vao = ctx->Array.VAO;
+ _mesa_vao_map_arrays(ctx, vao, GL_MAP_READ_BIT);
_mesa_array_element(ctx, (struct _glapi_table *)disp, elt);
- if (do_map)
- _ae_unmap_vbos(ctx);
+ _mesa_vao_unmap_arrays(ctx, vao);
}
_save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count)
{
GET_CURRENT_CONTEXT(ctx);
+ struct gl_vertex_array_object *vao = ctx->Array.VAO;
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLint i;
/* Make sure to process any VBO binding changes */
_mesa_update_state(ctx);
- _ae_map_vbos(ctx);
+ _mesa_vao_map_arrays(ctx, vao, GL_MAP_READ_BIT);
vbo_save_NotifyBegin(ctx, mode, true);
_mesa_array_element(ctx, GET_DISPATCH(), start + i);
CALL_End(GET_DISPATCH(), ());
- _ae_unmap_vbos(ctx);
+ _mesa_vao_unmap_arrays(ctx, vao);
}
{
GET_CURRENT_CONTEXT(ctx);
struct vbo_save_context *save = &vbo_context(ctx)->save;
- struct gl_buffer_object *indexbuf = ctx->Array.VAO->IndexBufferObj;
+ struct gl_vertex_array_object *vao = ctx->Array.VAO;
+ struct gl_buffer_object *indexbuf = vao->IndexBufferObj;
GLint i;
if (!_mesa_is_valid_prim_mode(ctx, mode)) {
/* Make sure to process any VBO binding changes */
_mesa_update_state(ctx);
- _ae_map_vbos(ctx);
+ _mesa_vao_map(ctx, vao, GL_MAP_READ_BIT);
if (_mesa_is_bufferobj(indexbuf))
indices =
CALL_End(GET_DISPATCH(), ());
- _ae_unmap_vbos(ctx);
+ _mesa_vao_unmap(ctx, vao);
}
static void GLAPIENTRY