array->Stride = 0;
array->Ptr = NULL;
array->RelativeOffset = 0;
- array->Enabled = GL_FALSE;
array->Normalized = GL_FALSE;
array->Integer = GL_FALSE;
array->Doubles = GL_FALSE;
attrib2->_EffBufferBindingIndex = bindex;
attrib2->_EffRelativeOffset = attrib2->RelativeOffset;
assert(attrib2->_EffRelativeOffset <= MaxRelativeOffset);
-
- /* Only enabled arrays shall appear in the unique bindings */
- assert(attrib2->Enabled);
}
/* Finally this is the set of effectively bound arrays with the
* original binding offset.
attrib2->_EffRelativeOffset =
binding2->Offset + attrib2->RelativeOffset - min_offset;
assert(attrib2->_EffRelativeOffset <= MaxRelativeOffset);
-
- /* Only enabled arrays shall appear in the unique bindings */
- assert(attrib2->Enabled);
}
/* Finally this is the set of effectively bound arrays */
binding->_EffOffset = min_offset;
attrib2->_EffBufferBindingIndex = bindex;
attrib2->_EffRelativeOffset = attrib2->Ptr - ptr;
assert(attrib2->_EffRelativeOffset <= binding->Stride);
-
- /* Only enabled arrays shall appear in the unique bindings */
- assert(attrib2->Enabled);
}
/* Finally this is the set of effectively bound arrays */
binding->_EffOffset = (GLintptr)ptr;
const struct gl_vertex_buffer_binding *buffer_binding =
&vao->BufferBinding[attrib_array->BufferBindingIndex];
- /* Only enabled arrays shall appear in the Enabled bitmask */
- assert(attrib_array->Enabled);
/* We have already masked out vao->VertexAttribBufferMask */
assert(!_mesa_is_bufferobj(buffer_binding->BufferObj));
const struct gl_vertex_buffer_binding *buffer_binding =
&vao->BufferBinding[attrib_array->BufferBindingIndex];
- /* Only enabled arrays shall appear in the Enabled bitmask */
- assert(attrib_array->Enabled);
/* We have already masked with vao->VertexAttribBufferMask */
assert(_mesa_is_bufferobj(buffer_binding->BufferObj));
GLshort Stride; /**< Stride as specified with gl*Pointer() */
GLenum16 Type; /**< Datatype: GL_FLOAT, GL_INT, etc */
GLenum16 Format; /**< Default: GL_RGBA, but may be GL_BGRA */
- GLboolean Enabled; /**< Whether the array is enabled */
GLubyte Size; /**< Components per element (1,2,3,4) */
unsigned Normalized:1; /**< Fixed-point values are normalized when converted to floats */
unsigned Integer:1; /**< Fixed-point values are not converted to floats */
assert(attrib < ARRAY_SIZE(vao->VertexAttrib));
assert(!vao->SharedAndImmutable);
- if (!vao->VertexAttrib[attrib].Enabled) {
+ const GLbitfield array_bit = VERT_BIT(attrib);
+ if ((vao->Enabled & array_bit) == 0) {
/* was disabled, now being enabled */
- vao->VertexAttrib[attrib].Enabled = GL_TRUE;
- const GLbitfield array_bit = VERT_BIT(attrib);
vao->Enabled |= array_bit;
vao->NewArrays |= array_bit;
assert(attrib < ARRAY_SIZE(vao->VertexAttrib));
assert(!vao->SharedAndImmutable);
- if (vao->VertexAttrib[attrib].Enabled) {
+ const GLbitfield array_bit = VERT_BIT(attrib);
+ if (vao->Enabled & array_bit) {
/* was enabled, now being disabled */
- vao->VertexAttrib[attrib].Enabled = GL_FALSE;
- const GLbitfield array_bit = VERT_BIT(attrib);
vao->Enabled &= ~array_bit;
vao->NewArrays |= array_bit;
dst->Doubles = src->Doubles;
dst->Normalized = src->Normalized;
dst->Ptr = src->Ptr;
- dst->Enabled = src->Enabled;
dst->_ElementSize = src->_ElementSize;
dst->_EffBufferBindingIndex = src->_EffBufferBindingIndex;
dst->_EffRelativeOffset = src->_EffRelativeOffset;
if (attrib->Size != size[vbo_attr])
return false;
assert(attrib->Format == GL_RGBA);
- assert(attrib->Enabled == GL_TRUE);
assert(attrib->Normalized == GL_FALSE);
assert(attrib->Integer == vbo_attrtype_to_integer_flag(tp));
assert(attrib->Doubles == vbo_attrtype_to_double_flag(tp));
_mesa_vertex_attrib_binding(ctx, *vao, vao_attr, 0);
_mesa_enable_vertex_array_attrib(ctx, *vao, vao_attr);
}
- assert(vao_enabled == (*vao)->Enabled);
assert((vao_enabled & ~(*vao)->VertexAttribBufferMask) == 0);
/* Finalize and freeze the VAO */