zink: fix enabled vertex buffer mask calculation
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 15 Sep 2021 14:50:03 +0000 (10:50 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Sep 2021 01:43:40 +0000 (01:43 +0000)
commit53aade0ef0def4ea7f8468cdec04acd2384e2d2c
treeb65cea2dea131c3351416c01c6d0531e0511f655
parent09bb8602f336e02da930eae15a2d56986ff418f3
zink: fix enabled vertex buffer mask calculation

the mask can't entirely be calculated based on the integer parameters,
as it's possible for some of the "bind" slots to actually be unbinds,
so remove bits as necessary to fix this

also add some debug asserts to ensure I don't break this again for the
tenth time

Fixes: 6dd02a5139a ("zink: stop using util_set_vertex_buffers_mask()")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12871>
src/gallium/drivers/zink/zink_context.c