#include "util/bitscan.h"
#include "util/u_memory.h"
#include "util/hash_table.h"
-#include "util/indices/u_indices.h"
+#include "gallium/auxiliary/indices/u_indices.h"
#include "util/u_prim.h"
#include "gallium/include/pipe/p_state.h"
vertex_to_index ? temp_vertices_buffer : save->vertex_store->buffer_in_ram,
node->cold->ib.obj);
save->current_bo_bytes_used += total_vert_count * save->vertex_size * sizeof(fi_type);
+ node->cold->bo_bytes_used = save->current_bo_bytes_used;
if (vertex_to_index) {
_mesa_hash_table_destroy(vertex_to_index, _free_entry);
/* Deal with GL_COMPILE_AND_EXECUTE:
*/
if (ctx->ExecuteFlag) {
- struct _glapi_table *dispatch = GET_DISPATCH();
-
- _glapi_set_dispatch(ctx->Exec);
-
/* _vbo_loopback_vertex_list doesn't use the index buffer, so we have to
* use buffer_in_ram (which contains all vertices) instead of current_bo
* (which contains deduplicated vertices *when* UseLoopback is false).
vao->BufferBinding[0].Offset = -(GLintptr)(start_offset * stride);
_vbo_loopback_vertex_list(ctx, node, save->vertex_store->buffer_in_ram);
vao->BufferBinding[0].Offset = original;
-
- _glapi_set_dispatch(dispatch);
}
/* Reset our structures for the next run of vertices:
static void
-vbo_install_save_vtxfmt(struct gl_context *ctx);
+vbo_init_dispatch_save_begin_end(struct gl_context *ctx);
/* Cope with EvalCoord/CallList called within a begin/end object:
vbo_install_save_vtxfmt_noop(ctx);
}
else {
- _mesa_install_save_vtxfmt(ctx);
+ _mesa_init_dispatch_save_begin_end(ctx);
}
ctx->Driver.SaveNeedFlush = GL_FALSE;
}
save->no_current_update = no_current_update;
- vbo_install_save_vtxfmt(ctx);
+ vbo_init_dispatch_save_begin_end(ctx);
/* We need to call vbo_save_SaveFlushVertices() if there's state change */
ctx->Driver.SaveNeedFlush = GL_TRUE;
vbo_install_save_vtxfmt_noop(ctx);
}
else {
- _mesa_install_save_vtxfmt(ctx);
+ _mesa_init_dispatch_save_begin_end(ctx);
}
}
}
-/* Unlike the functions above, these are to be hooked into the vtxfmt
- * maintained in ctx->ListState, active when the list is known or
- * suspected to be outside any begin/end primitive.
- * Note: OBE = Outside Begin/End
- */
void GLAPIENTRY
save_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
{
}
void GLAPIENTRY
-save_MultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type,
- const GLvoid * const *indices, GLsizei primcount)
+save_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type,
+ const GLvoid * const *indices, GLsizei primcount)
{
GET_CURRENT_CONTEXT(ctx);
struct _glapi_table *dispatch = ctx->CurrentServerDispatch;
static void
-vbo_install_save_vtxfmt(struct gl_context *ctx)
+vbo_init_dispatch_save_begin_end(struct gl_context *ctx)
{
#define NAME_AE(x) _mesa_##x
#define NAME_CALLLIST(x) _save_##x
#define NAME_ES(x) _save_##x
struct _glapi_table *tab = ctx->Save;
- #include "api_vtxfmt_init.h"
+ #include "api_beginend_init.h"
}
* etc. received between here and the next begin will be compiled
* as opcodes.
*/
- _mesa_install_save_vtxfmt(ctx);
+ _mesa_init_dispatch_save_begin_end(ctx);
}
assert(save->vertex_size == 0);