zink: optimize buffer rebinds
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 10 Mar 2021 23:59:49 +0000 (18:59 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Jun 2021 23:29:19 +0000 (23:29 +0000)
commite3192367ac1cdd3cfdfa671da183b3ae5f1b268b
tree120ec6d2574a4660735fe150eb8481601723a473
parent31083444032cb94b144206fca6271d21daf9e1db
zink: optimize buffer rebinds

by using the bind counts, the common cases of rebinds can be immediately
handled without unnecessary iteration, and following this each rebind can
be evaluated to ensure that every necessary descriptor was rebound in order
to catch any remaining corner cases that may not be handled in the optimized
rebind path

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