/**
- * Helper functions for consuming backends to walk the
- * ctx->Array._DrawVAO for driver side array setup.
- * Note that mesa provides preprocessed minimal binding information
- * in the VAO. See _mesa_update_vao_derived_arrays for documentation.
- */
-
-/**
- * Return enabled vertex attribute bits for draw.
- */
-static inline GLbitfield
-_mesa_draw_array_bits(const struct gl_context *ctx)
-{
- return ctx->Array._DrawVAOEnabledAttribs;
-}
-
-
-/**
* Return the enabled user (= non-VBO) attrib mask and the non-zero divisor
* attrib mask for the draw.
*
}
}
-/**
- * Return enabled current values attribute bits for draw.
- */
-static inline GLbitfield
-_mesa_draw_current_bits(const struct gl_context *ctx)
-{
- return ~ctx->Array._DrawVAOEnabledAttribs;
-}
-
/**
* Return vertex buffer binding provided the attribute struct.
setup_arrays<POPCNT_NO, UPDATE_ALL>
(st, ctx->Array._DrawVAO, vp->Base.DualSlotInputs,
- vp_variant->vert_attrib_mask, _mesa_draw_array_bits(ctx),
+ vp_variant->vert_attrib_mask, ctx->Array._DrawVAOEnabledAttribs,
velements, vbuffer, num_vbuffers);
}
struct gl_context *ctx = st->ctx;
/* Process values that should have better been uniforms in the application */
- GLbitfield curmask = inputs_read & _mesa_draw_current_bits(ctx);
+ GLbitfield curmask = inputs_read & ~ctx->Array._DrawVAOEnabledAttribs;
if (curmask) {
unsigned num_attribs = util_bitcount_fast<POPCNT>(curmask);
unsigned num_dual_attribs = util_bitcount_fast<POPCNT>(curmask &
const GLbitfield dual_slot_inputs = vp->Base.DualSlotInputs;
/* Process values that should have better been uniforms in the application */
- GLbitfield curmask = inputs_read & _mesa_draw_current_bits(ctx);
+ GLbitfield curmask = inputs_read & ~ctx->Array._DrawVAOEnabledAttribs;
/* For each attribute, make an own user buffer binding. */
while (curmask) {
const gl_vert_attrib attr = (gl_vert_attrib)u_bit_scan(&curmask);
/* Setup arrays */
setup_arrays<POPCNT, UPDATE>
(st, ctx->Array._DrawVAO, dual_slot_inputs, inputs_read,
- _mesa_draw_array_bits(ctx), &velements, vbuffer, &num_vbuffers);
+ ctx->Array._DrawVAOEnabledAttribs, &velements, vbuffer, &num_vbuffers);
/* _NEW_CURRENT_ATTRIB */
/* Setup zero-stride attribs. */