zink: wrap framebuffer surfaces to preserve gallium expectations
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 31 Aug 2021 15:33:26 +0000 (11:33 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Sep 2021 05:47:47 +0000 (05:47 +0000)
commit46a262dc1e4c8c9f2a9dd49479487b721642d71c
treebdca0e78c6f581de5c03e246a9d16e5a3da59753
parent01f00eb90d3080dbebec19d224ce89b28e0fe8be
zink: wrap framebuffer surfaces to preserve gallium expectations

gallium needs pipe_surface::context to reflect the context used to create
the surface, but zink caches surfaces, so instead return a wrapper object
that can be destroyed without blowing up the stack

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