[Mesa-dev] [RFC PATCH] mesa: fix _mesa_draw_nonzero_divisor_bits to return nonzero divisors

Marek Olšák maraeo at gmail.com
Sun Mar 1 05:08:45 UTC 2020


Rb. I'm on the phone.

M.

On Sat., Feb. 29, 2020, 22:53 Ilia Mirkin, <imirkin at alum.mit.edu> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20200301/433aa4b8/attachment.htm>


More information about the mesa-dev mailing list