summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/arrayobj.h')
-rw-r--r--src/mesa/main/arrayobj.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
index 584e6d818cf..19ab65b3242 100644
--- a/src/mesa/main/arrayobj.h
+++ b/src/mesa/main/arrayobj.h
@@ -212,6 +212,20 @@ _mesa_draw_user_array_bits(const struct gl_context *ctx)
/**
+ * Return which enabled vertex attributes have a non-zero instance divisor.
+ *
+ * Needs the a fully updated VAO ready for draw.
+ */
+static inline GLbitfield
+_mesa_draw_nonzero_divisor_bits(const struct gl_context *ctx)
+{
+ const struct gl_vertex_array_object *const vao = ctx->Array._DrawVAO;
+ assert(vao->NewArrays == 0);
+ return ~vao->_EffEnabledNonZeroDivisor & ctx->Array._DrawVAOEnabledAttribs;
+}
+
+
+/**
* Return enabled current values attribute bits for draw.
*/
static inline GLbitfield