zink: implement a global framebuffer cache

Graphics / Mesa 3D Graphics Library / Mesa - Mike Blumenkrantz [gmail.com] - 22 March 2021 12:49 UTC

this uses the same mechanics as surface caching, but it also requires that surfaces keep refs of the framebuffers they're attached to so that they can invalidate the fb object upon destruction, as, similar to program objects, the fb objects are "owned" by their attachments

loosely based on patches by Antonio Caggiano

92a5ea13fcd zink: implement a global framebuffer cache
src/gallium/drivers/zink/zink_context.c | 61 +++++++++++++++++++++++++----
src/gallium/drivers/zink/zink_framebuffer.c | 18 +++++----
src/gallium/drivers/zink/zink_screen.c | 27 ++++++++++++-
src/gallium/drivers/zink/zink_screen.h | 2 +
src/gallium/drivers/zink/zink_surface.c | 36 +++++++++++++++++
src/gallium/drivers/zink/zink_surface.h | 1 +
6 files changed, 128 insertions(+), 17 deletions(-)

Upstream: cgit.freedesktop.org


  • Share