[Mesa-dev] [RFC PATCH] mesa: fix _mesa_draw_nonzero_divisor_bits to return nonzero divisors
Ilia Mirkin
imirkin at alum.mit.edu
Sun Mar 1 03:52:59 UTC 2020
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 at alum.mit.edu>
---
I haven't done any extensive testing on this, but it does seem to fix a
regression on nv50 where the limits were not being supplied. (And
there's an assert to make sure that they are.)
src/mesa/main/arrayobj.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
index 19ab65b3242..3efcd577ae5 100644
--- a/src/mesa/main/arrayobj.h
+++ b/src/mesa/main/arrayobj.h
@@ -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;
}
--
2.24.1
More information about the mesa-dev
mailing list