const fi_type * src_buffer)
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
- const struct _mesa_prim *prim = &node->prim[node->prim_count - 1];
+ const struct _mesa_prim *prim = &node->prims[node->prim_count - 1];
GLuint nr = prim->count;
GLuint sz = save->vertex_size;
const fi_type *src = src_buffer + prim->start * sz;
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
- save->prim = save->prim_store->prims + save->prim_store->used;
+ save->prims = save->prim_store->prims + save->prim_store->used;
save->buffer_map = save->vertex_store->buffer_map + save->vertex_store->used;
assert(save->buffer_map == save->buffer_ptr);
convert_line_loop_to_strip(struct vbo_save_context *save,
struct vbo_save_vertex_list *node)
{
- struct _mesa_prim *prim = &node->prim[node->prim_count - 1];
+ struct _mesa_prim *prim = &node->prims[node->prim_count - 1];
assert(prim->mode == GL_LINE_LOOP);
node->vertex_count = save->vert_count;
node->wrap_count = save->copied.nr;
node->dangling_attr_ref = save->dangling_attr_ref;
- node->prim = save->prim;
+ node->prims = save->prims;
node->prim_count = save->prim_count;
node->vertex_store = save->vertex_store;
node->prim_store = save->prim_store;
node->vertex_store->refcount++;
node->prim_store->refcount++;
- if (node->prim[0].no_current_update) {
+ if (node->prims[0].no_current_update) {
node->current_size = 0;
node->current_data = NULL;
}
*/
save->copied.nr = _save_copy_vertices(ctx, node, save->buffer_map);
- if (node->prim[node->prim_count - 1].mode == GL_LINE_LOOP) {
+ if (node->prims[node->prim_count - 1].mode == GL_LINE_LOOP) {
convert_line_loop_to_strip(save, node);
}
- merge_prims(node->prim, &node->prim_count);
+ merge_prims(node->prims, &node->prim_count);
/* Deal with GL_COMPILE_AND_EXECUTE:
*/
(const GLfloat *) ((const char *) save->
vertex_store->buffer_map +
node->buffer_offset),
- node->attrsz, node->prim, node->prim_count,
+ node->attrsz, node->prims, node->prim_count,
node->wrap_count, node->vertex_size);
_glapi_set_dispatch(dispatch);
/* Close off in-progress primitive.
*/
- save->prim[i].count = (save->vert_count - save->prim[i].start);
- mode = save->prim[i].mode;
- weak = save->prim[i].weak;
- no_current_update = save->prim[i].no_current_update;
+ save->prims[i].count = (save->vert_count - save->prims[i].start);
+ mode = save->prims[i].mode;
+ weak = save->prims[i].weak;
+ no_current_update = save->prims[i].no_current_update;
/* store the copied vertices, and allocate a new list.
*/
/* Restart interrupted primitive
*/
- save->prim[0].mode = mode;
- save->prim[0].weak = weak;
- save->prim[0].no_current_update = no_current_update;
- save->prim[0].begin = 0;
- save->prim[0].end = 0;
- save->prim[0].pad = 0;
- save->prim[0].start = 0;
- save->prim[0].count = 0;
- save->prim[0].num_instances = 1;
- save->prim[0].base_instance = 0;
- save->prim[0].is_indirect = 0;
+ save->prims[0].mode = mode;
+ save->prims[0].weak = weak;
+ save->prims[0].no_current_update = no_current_update;
+ save->prims[0].begin = 0;
+ save->prims[0].end = 0;
+ save->prims[0].pad = 0;
+ save->prims[0].start = 0;
+ save->prims[0].count = 0;
+ save->prims[0].num_instances = 1;
+ save->prims[0].base_instance = 0;
+ save->prims[0].is_indirect = 0;
save->prim_count = 1;
}
if (save->prim_count > 0) {
/* Close off in-progress primitive. */
GLint i = save->prim_count - 1;
- save->prim[i].count = save->vert_count - save->prim[i].start;
+ save->prims[i].count = save->vert_count - save->prims[i].start;
}
/* Need to replay this display list with loopback,
const GLuint i = save->prim_count++;
assert(i < save->prim_max);
- save->prim[i].mode = mode & VBO_SAVE_PRIM_MODE_MASK;
- save->prim[i].begin = 1;
- save->prim[i].end = 0;
- save->prim[i].weak = (mode & VBO_SAVE_PRIM_WEAK) ? 1 : 0;
- save->prim[i].no_current_update =
+ save->prims[i].mode = mode & VBO_SAVE_PRIM_MODE_MASK;
+ save->prims[i].begin = 1;
+ save->prims[i].end = 0;
+ save->prims[i].weak = (mode & VBO_SAVE_PRIM_WEAK) ? 1 : 0;
+ save->prims[i].no_current_update =
(mode & VBO_SAVE_PRIM_NO_CURRENT_UPDATE) ? 1 : 0;
- save->prim[i].pad = 0;
- save->prim[i].start = save->vert_count;
- save->prim[i].count = 0;
- save->prim[i].num_instances = 1;
- save->prim[i].base_instance = 0;
- save->prim[i].is_indirect = 0;
+ save->prims[i].pad = 0;
+ save->prims[i].start = save->vert_count;
+ save->prims[i].count = 0;
+ save->prims[i].num_instances = 1;
+ save->prims[i].base_instance = 0;
+ save->prims[i].is_indirect = 0;
if (save->out_of_memory) {
_mesa_install_save_vtxfmt(ctx, &save->vtxfmt_noop);
const GLint i = save->prim_count - 1;
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
- save->prim[i].end = 1;
- save->prim[i].count = (save->vert_count - save->prim[i].start);
+ save->prims[i].end = 1;
+ save->prims[i].count = (save->vert_count - save->prims[i].start);
if (i == (GLint) save->prim_max - 1) {
_save_compile_vertex_list(ctx);
"glPrimitiveRestartNV called outside glBegin/End");
} else {
/* get current primitive mode */
- GLenum curPrim = save->prim[save->prim_count - 1].mode;
+ GLenum curPrim = save->prims[save->prim_count - 1].mode;
/* restart primitive */
CALL_End(GET_DISPATCH(), ());
if (save->prim_count > 0) {
GLint i = save->prim_count - 1;
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
- save->prim[i].end = 0;
- save->prim[i].count = save->vert_count - save->prim[i].start;
+ save->prims[i].end = 0;
+ save->prims[i].count = save->vert_count - save->prims[i].start;
}
/* Make sure this vertex list gets replayed by the "loopback"
buffer);
for (i = 0; i < node->prim_count; i++) {
- struct _mesa_prim *prim = &node->prim[i];
+ struct _mesa_prim *prim = &node->prims[i];
fprintf(f, " prim %d: %s%s %d..%d %s %s\n",
i,
_mesa_lookup_prim_by_nr(prim->mode),