- }
-
- const gl_attribute_map_mode mode = vao->_AttributeMapMode;
- const GLubyte *const vao_map = _mesa_vao_attribute_map[mode];
- for (unsigned vp_attrib = 0; vp_attrib < VERT_ATTRIB_MAX; ++vp_attrib) {
- if (unlikely(vp_inputs & VERT_BIT(vp_attrib)))
- inputs[vp_attrib] = &vertexAttrib[vao_map[vp_attrib]];
- else
- inputs[vp_attrib] = &vbo->currval[map[vp_attrib]];
- }
-
- _mesa_set_varying_vp_inputs(ctx, vp_inputs);
- ctx->NewDriverState |= ctx->DriverFlags.NewArray;
-}
-
-
-/**
- * Examine the enabled vertex arrays to set the exec->array.inputs[] values.
- * These will point to the arrays to actually use for drawing. Some will
- * be user-provided arrays, other will be zero-stride const-valued arrays.
- * Note that this might set the _NEW_VARYING_VP_INPUTS dirty flag so state
- * validation must be done after this call.
- */
-static void
-vbo_bind_arrays(struct gl_context *ctx)
-{
- struct vbo_context *vbo = vbo_context(ctx);
- struct vbo_exec_context *exec = &vbo->exec;
-
- _mesa_set_drawing_arrays(ctx, vbo->exec.array.inputs);
-
- if (exec->array.recalculate_inputs) {
- recalculate_input_bindings(ctx);
- exec->array.recalculate_inputs = GL_FALSE;
-
- /* Again... because we may have changed the bitmask of per-vertex varying
- * attributes. If we regenerate the fixed-function vertex program now
- * we may be able to prune down the number of vertex attributes which we
- * need in the shader.
- */
- if (ctx->NewState) {
- /* Setting "validating" to TRUE prevents _mesa_update_state from
- * invalidating what we just did.
- */
- exec->validating = GL_TRUE;
- _mesa_update_state(ctx);
- exec->validating = GL_FALSE;
- }