diff options
author | Marek Olšák <[email protected]> | 2020-01-22 22:38:09 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-02-14 18:16:27 -0500 |
commit | fd6636ebc06d55b59851701c436b8b97f50fd7f4 (patch) | |
tree | 9227ae4b2461b4e07f72c71646ed4f0d4b21543b /src/mesa/main/arrayobj.h | |
parent | 1d933728024f907236ffe95da5f5f0eabf6052c7 (diff) |
st/mesa: simplify determination whether a draw needs min/max index
Reviewed-by: Mathias Fröhlich <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
Diffstat (limited to 'src/mesa/main/arrayobj.h')
-rw-r--r-- | src/mesa/main/arrayobj.h | 14 |
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 |