summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-10-06 17:21:09 -0600
committerBrian Paul <[email protected]>2016-10-13 17:38:49 -0600
commitc89802aeeaee35e06c98a41dd630a60e8e7e4123 (patch)
treed6bcc7383a29e5a2ac48c519ecc92a68c516f673 /src/mesa/main/varray.c
parentc328268b9292664bd5de73ee39ed8b91ccfb38d1 (diff)
mesa: rename gl_vertex_attrib_array::VertexBinding
Rename to gl_vertex_attrib_array::BufferBindingIndex because this field is an index into the array of buffer binding points. This makes some code a little easier to follow since there's also a "VertexBinding" field in gl_vertex_array_object. Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 027ae7c8317..a2f957a66d2 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -140,15 +140,15 @@ vertex_attrib_binding(struct gl_context *ctx,
else
vao->VertexAttribBufferMask |= VERT_BIT(attribIndex);
- if (array->VertexBinding != bindingIndex) {
+ if (array->BufferBindingIndex != bindingIndex) {
const GLbitfield64 array_bit = VERT_BIT(attribIndex);
FLUSH_VERTICES(ctx, _NEW_ARRAY);
- vao->VertexBinding[array->VertexBinding]._BoundArrays &= ~array_bit;
+ vao->VertexBinding[array->BufferBindingIndex]._BoundArrays &= ~array_bit;
vao->VertexBinding[bindingIndex]._BoundArrays |= array_bit;
- array->VertexBinding = bindingIndex;
+ array->BufferBindingIndex = bindingIndex;
vao->NewArrays |= array_bit;
}
@@ -928,7 +928,7 @@ get_vertex_array_attrib(struct gl_context *ctx,
case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB:
return array->Normalized;
case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
- return vao->VertexBinding[array->VertexBinding].BufferObj->Name;
+ return vao->VertexBinding[array->BufferBindingIndex].BufferObj->Name;
case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
if ((_mesa_is_desktop_gl(ctx)
&& (ctx->Version >= 30 || ctx->Extensions.EXT_gpu_shader4))
@@ -944,12 +944,12 @@ get_vertex_array_attrib(struct gl_context *ctx,
case GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB:
if ((_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_instanced_arrays)
|| _mesa_is_gles3(ctx)) {
- return vao->VertexBinding[array->VertexBinding].InstanceDivisor;
+ return vao->VertexBinding[array->BufferBindingIndex].InstanceDivisor;
}
goto error;
case GL_VERTEX_ATTRIB_BINDING:
if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles31(ctx)) {
- return array->VertexBinding - VERT_ATTRIB_GENERIC0;
+ return array->BufferBindingIndex - VERT_ATTRIB_GENERIC0;
}
goto error;
case GL_VERTEX_ATTRIB_RELATIVE_OFFSET:
@@ -2333,7 +2333,7 @@ _mesa_copy_vertex_attrib_array(struct gl_context *ctx,
dst->Size = src->Size;
dst->Type = src->Type;
dst->Format = src->Format;
- dst->VertexBinding = src->VertexBinding;
+ dst->BufferBindingIndex = src->BufferBindingIndex;
dst->RelativeOffset = src->RelativeOffset;
dst->Format = src->Format;
dst->Integer = src->Integer;
@@ -2374,7 +2374,7 @@ _mesa_print_arrays(struct gl_context *ctx)
continue;
const struct gl_vertex_buffer_binding *binding =
- &vao->VertexBinding[array->VertexBinding];
+ &vao->VertexBinding[array->BufferBindingIndex];
const struct gl_buffer_object *bo = binding->BufferObj;
fprintf(stderr, " %s: Ptr=%p, Type=%s, Size=%d, ElemSize=%u, "