summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-11-17 07:13:11 +0100
committerMathias Fröhlich <[email protected]>2018-11-21 06:27:19 +0100
commit1217a8448c1061d230956ac6e69a1bb3809dd6f2 (patch)
treea0977d47c0f0ae6ff580b4d5e0ab3fbc5bd49f58 /src/mesa/main/arrayobj.c
parent73d2d313e9fafc8e8a6ac54af1da18d476821e7a (diff)
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index c4e61a9954d..5572ae550f8 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -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 */