Skip to content

zink: prune old swapchains on present

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

pruning old swapchains is challenging because there's no way to definitively know when to destroy them without VK_EXT_swapchain_maintenance1 which isn't supported yet

initially, I handled it by only pruning on shutdown and whenever a new swapchain was created since those are both safe points, but this leads to scenarios where a dead swapchain can exist for the entire lifetime of an application if the swapinterval is changed

to avoid such ballooning, check whether the current swapchain has ever presented on each present queue and then prune based on this

fixes #7529 (closed)

Merge request reports

Loading