mesa: Use the gl_vertex_array_object::Enabled bitfield.

Instead of using gl_array_attributes::Enabled use the
much more compact representation stored in
gl_vertex_array_object::Enabled using the corresponding bits.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
Mathias Fröhlich
2018-11-17 07:13:11 +01:00
parent 73d2d313e9
commit 1217a8448c
5 changed files with 39 additions and 43 deletions

View File

@@ -832,8 +832,8 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,
for (gl_vert_attrib attr = 0; attr < VERT_ATTRIB_MAX; ++attr) {
/* Query the original api defined attrib/binding information ... */
const unsigned char *const map =_mesa_vao_attribute_map[mode];
const struct gl_array_attributes *attrib = &vao->VertexAttrib[map[attr]];
if (attrib->Enabled) {
if (vao->Enabled & VERT_BIT(map[attr])) {
const struct gl_array_attributes *attrib = &vao->VertexAttrib[map[attr]];
const struct gl_vertex_buffer_binding *binding =
&vao->BufferBinding[attrib->BufferBindingIndex];
/* ... and compare that with the computed attrib/binding */