mesa: fix _mesa_draw_nonzero_divisor_bits to return nonzero divisors
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 1 Mar 2020 03:08:14 +0000 (22:08 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sun, 1 Mar 2020 23:16:36 +0000 (23:16 +0000)
The bitmask is _EffEnabledNonZeroDivisor, so no need to invert it before
returning.

Fixes: fd6636ebc06d (st/mesa: simplify determination whether a draw needs min/max index)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4009>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4009>

src/mesa/main/arrayobj.h

index 19ab65b32424590fef4e825527817324239eb2af..3efcd577ae5dae014bdc6e46824ea8b65c34326d 100644 (file)
@@ -221,7 +221,7 @@ _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 vao->_EffEnabledNonZeroDivisor & ctx->Array._DrawVAOEnabledAttribs;
 }