diff options
author | Mathias Fröhlich <[email protected]> | 2018-03-04 18:15:53 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-03-10 07:33:51 +0100 |
commit | 64d2a20480547d5897fd9d7b8fd306f2625138cb (patch) | |
tree | 15d831310fe0a2e2ff7d3c58eac8fceecc738f15 /src/mesa/vbo | |
parent | d62f0df3541ab9ee7a4999f0ecedc52f8d1ab8cc (diff) |
mesa: Make gl_vertex_array contain pointers to first order VAO members.
Instead of keeping a copy of the vertex array content in
struct gl_vertex_array only keep pointers to the first order
information originaly in the VAO.
For that represent the current values by struct gl_array_attributes
and struct gl_vertex_buffer_binding.
v2: Change comments.
Remove gl... prefix from variables except in the i965 directory where
it was like that before. Reindent because of that.
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r-- | src/mesa/vbo/vbo.h | 4 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_context.c | 52 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec.c | 16 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 22 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_private.h | 3 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_split.c | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_split.h | 4 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_split_copy.c | 97 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_split_inplace.c | 6 |
10 files changed, 115 insertions, 93 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index 345aa6b0d23..d6cf8e2afe5 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -216,7 +216,7 @@ struct split_limits void vbo_split_prims(struct gl_context *ctx, - const struct gl_vertex_array *arrays[], + const struct gl_vertex_array *arrays, const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, @@ -266,7 +266,7 @@ struct vbo_inputs * current values. The array of pointers is updated incrementally * based on the current and vertex_processing_mode values below. */ - const struct gl_vertex_array *inputs[VERT_ATTRIB_MAX]; + struct gl_vertex_array inputs[VERT_ATTRIB_MAX]; /** Those VERT_BIT_'s where the inputs array point to current values. */ GLbitfield current; /** Store which aliasing current values - generics or materials - are set. */ diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index 3dc3222c0db..acb28d02938 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -53,20 +53,17 @@ check_size(const GLfloat *attr) * Helper for initializing a vertex array. */ static void -init_array(struct gl_context *ctx, struct gl_vertex_array *array, +init_array(struct gl_context *ctx, struct gl_array_attributes *attrib, unsigned size, const void *pointer) { - memset(array, 0, sizeof(*array)); - - array->Size = size; - array->Type = GL_FLOAT; - array->Format = GL_RGBA; - array->StrideB = 0; - array->_ElementSize = array->Size * sizeof(GLfloat); - array->Ptr = pointer; - - _mesa_reference_buffer_object(ctx, &array->BufferObj, - ctx->Shared->NullBufferObj); + memset(attrib, 0, sizeof(*attrib)); + + attrib->Size = size; + attrib->Type = GL_FLOAT; + attrib->Format = GL_RGBA; + attrib->Stride = 0; + attrib->_ElementSize = size * sizeof(GLfloat); + attrib->Ptr = pointer; } @@ -80,15 +77,15 @@ init_legacy_currval(struct gl_context *ctx) struct vbo_context *vbo = vbo_context(ctx); GLuint i; - /* Set up a constant (StrideB == 0) array for each current + /* Set up a constant (Stride == 0) array for each current * attribute: */ for (i = 0; i < VERT_ATTRIB_FF_MAX; i++) { - struct gl_vertex_array *array = &vbo->currval[VERT_ATTRIB_FF(i)]; + const unsigned attr = VERT_ATTRIB_FF(i); + struct gl_array_attributes *attrib = &vbo->current[attr]; - init_array(ctx, array, - check_size(ctx->Current.Attrib[i]), - ctx->Current.Attrib[i]); + init_array(ctx, attrib, check_size(ctx->Current.Attrib[attr]), + ctx->Current.Attrib[attr]); } } @@ -100,9 +97,10 @@ init_generic_currval(struct gl_context *ctx) GLuint i; for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; i++) { - struct gl_vertex_array *array = &vbo->currval[VBO_ATTRIB_GENERIC0 + i]; + const unsigned attr = VBO_ATTRIB_GENERIC0 + i; + struct gl_array_attributes *attrib = &vbo->current[attr]; - init_array(ctx, array, 1, ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + i]); + init_array(ctx, attrib, 1, ctx->Current.Attrib[attr]); } } @@ -117,8 +115,8 @@ init_mat_currval(struct gl_context *ctx) * attribute: */ for (i = 0; i < MAT_ATTRIB_MAX; i++) { - struct gl_vertex_array *array = - &vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT + i]; + const unsigned attr = VBO_ATTRIB_MAT_FRONT_AMBIENT + i; + struct gl_array_attributes *attrib = &vbo->current[attr]; unsigned size; /* Size is fixed for the material attributes, for others will @@ -138,7 +136,7 @@ init_mat_currval(struct gl_context *ctx) break; } - init_array(ctx, array, size, ctx->Light.Material.Attrib[i]); + init_array(ctx, attrib, size, ctx->Light.Material.Attrib[i]); } } @@ -237,6 +235,11 @@ _vbo_CreateContext(struct gl_context *ctx) return GL_FALSE; } + vbo->binding.Offset = 0; + vbo->binding.Stride = 0; + vbo->binding.InstanceDivisor = 0; + _mesa_reference_buffer_object(ctx, &vbo->binding.BufferObj, + ctx->Shared->NullBufferObj); init_legacy_currval(ctx); init_generic_currval(ctx); init_mat_currval(ctx); @@ -276,11 +279,8 @@ _vbo_DestroyContext(struct gl_context *ctx) } if (vbo) { - GLuint i; - for (i = 0; i < VBO_ATTRIB_MAX; i++) { - _mesa_reference_buffer_object(ctx, &vbo->currval[i].BufferObj, NULL); - } + _mesa_reference_buffer_object(ctx, &vbo->binding.BufferObj, NULL); vbo_exec_destroy(ctx); if (ctx->API == API_OPENGL_COMPAT) diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c index 69a150c78b7..c0b0a11fe51 100644 --- a/src/mesa/vbo/vbo_exec.c +++ b/src/mesa/vbo/vbo_exec.c @@ -267,11 +267,14 @@ update_vao_inputs(struct gl_context *ctx, /* Fill in the client arrays from the VAO */ const GLubyte *const map = _mesa_vao_attribute_map[vao->_AttributeMapMode]; - const struct gl_vertex_array *array = vao->_VertexArray; - const struct gl_vertex_array **iarray = &inputs->inputs[0]; + const struct gl_array_attributes *attribs = &vao->VertexAttrib[0]; + const struct gl_vertex_buffer_binding *bindings = &vao->BufferBinding[0]; while (enable) { const int attr = u_bit_scan(&enable); - iarray[attr] = &array[map[attr]]; + struct gl_vertex_array *input = &inputs->inputs[attr]; + const struct gl_array_attributes *attrib = &attribs[map[attr]]; + input->VertexAttrib = attrib; + input->BufferBinding = &bindings[attrib->BufferBindingIndex]; } } @@ -294,12 +297,13 @@ update_current_inputs(struct gl_context *ctx, mask |= current & VERT_BIT_MAT_ALL; struct vbo_context *vbo = vbo_context(ctx); - const struct gl_vertex_array *const currval = &vbo->currval[0]; - const struct gl_vertex_array **iarray = &inputs->inputs[0]; + const struct gl_array_attributes *const currval = &vbo->current[0]; const GLubyte *const map = _vbo_attribute_alias_map[mode]; while (mask) { const int attr = u_bit_scan(&mask); - iarray[attr] = &currval[map[attr]]; + struct gl_vertex_array *input = &inputs->inputs[attr]; + input->VertexAttrib = &currval[map[attr]]; + input->BufferBinding = &vbo->binding; } inputs->current = current; diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 317fc43d1c5..b3971715b57 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -174,7 +174,7 @@ vbo_exec_copy_to_current(struct vbo_exec_context *exec) /* Note: the exec->vtx.current[i] pointers point into the * ctx->Current.Attrib and ctx->Light.Material.Attrib arrays. */ - GLfloat *current = (GLfloat *)vbo->currval[i].Ptr; + GLfloat *current = (GLfloat *)vbo->current[i].Ptr; fi_type tmp[8]; /* space for doubles */ int dmul = 1; @@ -195,7 +195,7 @@ vbo_exec_copy_to_current(struct vbo_exec_context *exec) exec->vtx.attrtype[i]); } - if (exec->vtx.attrtype[i] != vbo->currval[i].Type || + if (exec->vtx.attrtype[i] != vbo->current[i].Type || memcmp(current, tmp, 4 * sizeof(GLfloat) * dmul) != 0) { memcpy(current, tmp, 4 * sizeof(GLfloat) * dmul); @@ -205,13 +205,13 @@ vbo_exec_copy_to_current(struct vbo_exec_context *exec) * directly. */ /* Size here is in components - not bytes */ - vbo->currval[i].Size = exec->vtx.attrsz[i] / dmul; - vbo->currval[i]._ElementSize = - vbo->currval[i].Size * sizeof(GLfloat) * dmul; - vbo->currval[i].Type = exec->vtx.attrtype[i]; - vbo->currval[i].Integer = + vbo->current[i].Size = exec->vtx.attrsz[i] / dmul; + vbo->current[i]._ElementSize = + vbo->current[i].Size * sizeof(GLfloat) * dmul; + vbo->current[i].Type = exec->vtx.attrtype[i]; + vbo->current[i].Integer = vbo_attrtype_to_integer_flag(exec->vtx.attrtype[i]); - vbo->currval[i].Doubles = + vbo->current[i].Doubles = vbo_attrtype_to_double_flag(exec->vtx.attrtype[i]); /* This triggers rather too much recalculation of Mesa state @@ -248,10 +248,10 @@ vbo_exec_copy_from_current(struct vbo_exec_context *exec) for (i = VBO_ATTRIB_POS + 1; i < VBO_ATTRIB_MAX; i++) { if (exec->vtx.attrtype[i] == GL_DOUBLE || exec->vtx.attrtype[i] == GL_UNSIGNED_INT64_ARB) { - memcpy(exec->vtx.attrptr[i], vbo->currval[i].Ptr, + memcpy(exec->vtx.attrptr[i], vbo->current[i].Ptr, exec->vtx.attrsz[i] * sizeof(GLfloat)); } else { - const fi_type *current = (fi_type *) vbo->currval[i].Ptr; + const fi_type *current = (fi_type *) vbo->current[i].Ptr; switch (exec->vtx.attrsz[i]) { case 4: exec->vtx.attrptr[i][3] = current[3]; case 3: exec->vtx.attrptr[i][2] = current[2]; @@ -379,7 +379,7 @@ vbo_exec_wrap_upgrade_vertex(struct vbo_exec_context *exec, exec->vtx.attrtype[j]); COPY_SZ_4V(dest + new_offset, newSize, tmp); } else { - fi_type *current = (fi_type *)vbo->currval[j].Ptr; + fi_type *current = (fi_type *)vbo->current[j].Ptr; COPY_SZ_4V(dest + new_offset, sz, current); } } diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h index 1f3d31f577a..112a4605c7b 100644 --- a/src/mesa/vbo/vbo_private.h +++ b/src/mesa/vbo/vbo_private.h @@ -44,7 +44,8 @@ struct _mesa_prim; struct vbo_context { - struct gl_vertex_array currval[VBO_ATTRIB_MAX]; + struct gl_vertex_buffer_binding binding; + struct gl_array_attributes current[VBO_ATTRIB_MAX]; /* The array of inputs used for _DrawVAO draws. */ struct vbo_inputs draw_arrays; diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index 137fb6e3fd1..69d28312d3f 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -52,7 +52,7 @@ copy_vao(struct gl_context *ctx, const struct gl_vertex_array_object *vao, while (mask) { const int i = u_bit_scan(&mask); const struct gl_array_attributes *attrib = &vao->VertexAttrib[i]; - struct gl_vertex_array *currval = &vbo->currval[shift + i]; + struct gl_array_attributes *currval = &vbo->current[shift + i]; const GLubyte size = attrib->Size; const GLenum16 type = attrib->Type; fi_type tmp[4]; diff --git a/src/mesa/vbo/vbo_split.c b/src/mesa/vbo/vbo_split.c index 974a708dcb6..ffe1d67489a 100644 --- a/src/mesa/vbo/vbo_split.c +++ b/src/mesa/vbo/vbo_split.c @@ -100,7 +100,7 @@ split_prim_inplace(GLenum mode, GLuint *first, GLuint *incr) void vbo_split_prims(struct gl_context *ctx, - const struct gl_vertex_array *arrays[], + const struct gl_vertex_array arrays[], const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, diff --git a/src/mesa/vbo/vbo_split.h b/src/mesa/vbo/vbo_split.h index dbd629979db..fea2b48aecc 100644 --- a/src/mesa/vbo/vbo_split.h +++ b/src/mesa/vbo/vbo_split.h @@ -51,7 +51,7 @@ split_prim_inplace(GLenum mode, GLuint *first, GLuint *incr); void vbo_split_inplace(struct gl_context *ctx, - const struct gl_vertex_array *arrays[], + const struct gl_vertex_array arrays[], const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, @@ -64,7 +64,7 @@ vbo_split_inplace(struct gl_context *ctx, */ void vbo_split_copy(struct gl_context *ctx, - const struct gl_vertex_array *arrays[], + const struct gl_vertex_array arrays[], const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c index 2de909f512f..09b5b3b6511 100644 --- a/src/mesa/vbo/vbo_split_copy.c +++ b/src/mesa/vbo/vbo_split_copy.c @@ -37,6 +37,7 @@ #include "main/glformats.h" #include "main/macros.h" #include "main/mtypes.h" +#include "main/varray.h" #include "vbo_split.h" #include "vbo.h" @@ -51,7 +52,7 @@ */ struct copy_context { struct gl_context *ctx; - const struct gl_vertex_array **array; + const struct gl_vertex_array *array; const struct _mesa_prim *prim; GLuint nr_prims; const struct _mesa_index_buffer *ib; @@ -62,15 +63,15 @@ struct copy_context { struct { GLuint attr; GLuint size; - const struct gl_vertex_array *array; const GLubyte *src_ptr; - struct gl_vertex_array dstarray; + struct gl_vertex_buffer_binding dstbinding; + struct gl_array_attributes dstattribs; } varying[VERT_ATTRIB_MAX]; GLuint nr_varying; - const struct gl_vertex_array *dstarray_ptr[VERT_ATTRIB_MAX]; + struct gl_vertex_array dstarray[VERT_ATTRIB_MAX]; struct _mesa_index_buffer dstib; GLuint *translated_elt_buf; @@ -103,9 +104,9 @@ struct copy_context { static GLuint -attr_size(const struct gl_vertex_array *array) +attr_size(const struct gl_array_attributes *attrib) { - return array->Size * _mesa_sizeof_type(array->Type); + return attrib->Size * _mesa_sizeof_type(attrib->Type); } @@ -139,7 +140,7 @@ check_flush(struct copy_context *copy) */ static void dump_draw_info(struct gl_context *ctx, - const struct gl_vertex_array **arrays, + const struct gl_vertex_array *arrays, const struct _mesa_prim *prims, GLuint nr_prims, const struct _mesa_index_buffer *ib, @@ -154,13 +155,17 @@ dump_draw_info(struct gl_context *ctx, printf(" Prim mode 0x%x\n", prims[i].mode); printf(" IB: %p\n", (void*) ib); for (j = 0; j < VERT_ATTRIB_MAX; j++) { - printf(" array %d at %p:\n", j, (void*) arrays[j]); + const struct gl_vertex_array *array = &arrays[j]; + const struct gl_vertex_buffer_binding *binding + = array->BufferBinding; + const struct gl_array_attributes *attrib = array->VertexAttrib; + const GLubyte *ptr = _mesa_vertex_attrib_address(attrib, binding); + printf(" array %d at %p:\n", j, (void*) &arrays[j]); printf(" ptr %p, size %d, type 0x%x, stride %d\n", - arrays[j]->Ptr, - arrays[j]->Size, arrays[j]->Type, arrays[j]->StrideB); + ptr, attrib->Size, attrib->Type, binding->Stride); if (0) { GLint k = prims[i].start + prims[i].count - 1; - GLfloat *last = (GLfloat *) (arrays[j]->Ptr + arrays[j]->StrideB * k); + GLfloat *last = (GLfloat *) (ptr + binding->Stride * k); printf(" last: %f %f %f\n", last[0], last[1], last[2]); } @@ -173,7 +178,7 @@ static void flush(struct copy_context *copy) { struct gl_context *ctx = copy->ctx; - const struct gl_vertex_array **saved_arrays = ctx->Array._DrawArrays; + const struct gl_vertex_array *saved_arrays = ctx->Array._DrawArrays; GLuint i; /* Set some counters: @@ -182,7 +187,7 @@ flush(struct copy_context *copy) #if 0 dump_draw_info(copy->ctx, - copy->dstarray_ptr, + copy->dstarray, copy->dstprim, copy->dstprim_nr, ©->dstib, @@ -192,7 +197,7 @@ flush(struct copy_context *copy) (void) dump_draw_info; #endif - ctx->Array._DrawArrays = copy->dstarray_ptr; + ctx->Array._DrawArrays = copy->dstarray; ctx->NewDriverState |= ctx->DriverFlags.NewArray; copy->draw(ctx, @@ -253,8 +258,11 @@ elt(struct copy_context *copy, GLuint elt_idx) GLuint i; for (i = 0; i < copy->nr_varying; i++) { - const struct gl_vertex_array *srcarray = copy->varying[i].array; - const GLubyte *srcptr = copy->varying[i].src_ptr + elt * srcarray->StrideB; + const struct gl_vertex_array *srcarray = ©->array[i]; + const struct gl_vertex_buffer_binding* srcbinding + = srcarray->BufferBinding; + const GLubyte *srcptr + = copy->varying[i].src_ptr + elt * srcbinding->Stride; memcpy(csr, srcptr, copy->varying[i].size); csr += copy->varying[i].size; @@ -428,18 +436,21 @@ replay_init(struct copy_context *copy) */ copy->vertex_size = 0; for (i = 0; i < VERT_ATTRIB_MAX; i++) { - struct gl_buffer_object *vbo = copy->array[i]->BufferObj; + const struct gl_vertex_array *array = ©->array[i]; + const struct gl_vertex_buffer_binding *binding = array->BufferBinding; - if (copy->array[i]->StrideB == 0) { - copy->dstarray_ptr[i] = copy->array[i]; + if (binding->Stride == 0) { + _mesa_copy_vertex_array(©->dstarray[i], array); } else { + const struct gl_array_attributes *attrib = array->VertexAttrib; + struct gl_buffer_object *vbo = binding->BufferObj; + const GLubyte *ptr = _mesa_vertex_attrib_address(attrib, binding); GLuint j = copy->nr_varying++; copy->varying[j].attr = i; - copy->varying[j].array = copy->array[i]; - copy->varying[j].size = attr_size(copy->array[i]); - copy->vertex_size += attr_size(copy->array[i]); + copy->varying[j].size = attr_size(attrib); + copy->vertex_size += attr_size(attrib); if (_mesa_is_bufferobj(vbo) && !_mesa_bufferobj_mapped(vbo, MAP_INTERNAL)) @@ -447,10 +458,10 @@ replay_init(struct copy_context *copy) MAP_INTERNAL); copy->varying[j].src_ptr = - ADD_POINTERS(vbo->Mappings[MAP_INTERNAL].Pointer, - copy->array[i]->Ptr); + ADD_POINTERS(vbo->Mappings[MAP_INTERNAL].Pointer, ptr); - copy->dstarray_ptr[i] = ©->varying[j].dstarray; + copy->dstarray[i].VertexAttrib = ©->varying[j].dstattribs; + copy->dstarray[i].BufferBinding = ©->varying[j].dstbinding; } } @@ -509,19 +520,24 @@ replay_init(struct copy_context *copy) /* Setup new vertex arrays to point into the output buffer: */ for (offset = 0, i = 0; i < copy->nr_varying; i++) { - const struct gl_vertex_array *src = copy->varying[i].array; - struct gl_vertex_array *dst = ©->varying[i].dstarray; - - dst->Size = src->Size; - dst->Type = src->Type; - dst->Format = GL_RGBA; - dst->StrideB = copy->vertex_size; - dst->Ptr = copy->dstbuf + offset; - dst->Normalized = src->Normalized; - dst->Integer = src->Integer; - dst->Doubles = src->Doubles; - dst->BufferObj = ctx->Shared->NullBufferObj; - dst->_ElementSize = src->_ElementSize; + const struct gl_vertex_array *src = ©->array[i]; + const struct gl_array_attributes *srcattr = src->VertexAttrib; + struct gl_vertex_array *dst = ©->dstarray[i]; + struct gl_vertex_buffer_binding *dstbind = ©->varying[i].dstbinding; + struct gl_array_attributes *dstattr = ©->varying[i].dstattribs; + + dstattr->Size = srcattr->Size; + dstattr->Type = srcattr->Type; + dstattr->Format = GL_RGBA; + dstbind->Stride = copy->vertex_size; + dstattr->Ptr = copy->dstbuf + offset; + dstattr->Normalized = srcattr->Normalized; + dstattr->Integer = srcattr->Integer; + dstattr->Doubles = srcattr->Doubles; + dstbind->BufferObj = ctx->Shared->NullBufferObj; + dstattr->_ElementSize = srcattr->_ElementSize; + dst->BufferBinding = dstbind; + dst->VertexAttrib = dstattr; offset += copy->varying[i].size; } @@ -559,7 +575,8 @@ replay_finish(struct copy_context *copy) /* Unmap VBO's */ for (i = 0; i < copy->nr_varying; i++) { - struct gl_buffer_object *vbo = copy->varying[i].array->BufferObj; + struct gl_buffer_object *vbo = + copy->array[i].BufferBinding->BufferObj; if (_mesa_is_bufferobj(vbo) && _mesa_bufferobj_mapped(vbo, MAP_INTERNAL)) ctx->Driver.UnmapBuffer(ctx, vbo, MAP_INTERNAL); } @@ -577,7 +594,7 @@ replay_finish(struct copy_context *copy) */ void vbo_split_copy(struct gl_context *ctx, - const struct gl_vertex_array *arrays[], + const struct gl_vertex_array *arrays, const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c index 2c363c27767..971c52a078c 100644 --- a/src/mesa/vbo/vbo_split_inplace.c +++ b/src/mesa/vbo/vbo_split_inplace.c @@ -41,7 +41,7 @@ */ struct split_context { struct gl_context *ctx; - const struct gl_vertex_array **array; + const struct gl_vertex_array *array; const struct _mesa_prim *prim; GLuint nr_prims; const struct _mesa_index_buffer *ib; @@ -63,7 +63,7 @@ static void flush_vertex( struct split_context *split) { struct gl_context *ctx = split->ctx; - const struct gl_vertex_array **saved_arrays = ctx->Array._DrawArrays; + const struct gl_vertex_array *saved_arrays = ctx->Array._DrawArrays; struct _mesa_index_buffer ib; GLuint i; @@ -268,7 +268,7 @@ split_prims(struct split_context *split) void vbo_split_inplace(struct gl_context *ctx, - const struct gl_vertex_array *arrays[], + const struct gl_vertex_array *arrays, const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, |