Skip to content

zink: rescue surfaces/bufferviews for cache hits during deletion

Mike Blumenkrantz requested to merge zmike/mesa:zink-rescue into main

this is a wild race condition, but it's possible for these to get their final unref, enter their destructor, and then get a cache hit while waiting on the lock to remove themselves from the cache

in such a scenario, a second, normal check of the refcount will suffice, as the increment is atomic, and the value will otherwise be zero

fixes crashes in basemark

cc: mesa-stable

Merge request reports