Module: Mesa
Branch: staging/22.1
Commit: ef86acd25cabeae4a768e29dbd65e8de92452b62
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ef86acd25cabeae4a768e29dbd65e8de92452b62

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu May  5 12:06:14 2022 -0400

kopper: invalidate drawables when resizing textures in place

this guarantees that swapchains shared between contexts will stay
in sync

Reviewed-by: Adam Jackson <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16351>

---

 src/gallium/frontends/dri/kopper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/frontends/dri/kopper.c 
b/src/gallium/frontends/dri/kopper.c
index 452daf087ef..b7e84ff3156 100644
--- a/src/gallium/frontends/dri/kopper.c
+++ b/src/gallium/frontends/dri/kopper.c
@@ -559,6 +559,8 @@ kopper_allocate_textures(struct dri_context *ctx,
             if (drawable->textures[i] && i < ST_ATTACHMENT_DEPTH_STENCIL && 
!is_pixmap) {
                drawable->textures[i]->width0 = width;
                drawable->textures[i]->height0 = height;
+               /* force all contexts to revalidate framebuffer */
+               p_atomic_inc(&drawable->base.stamp);
             } else
                pipe_resource_reference(&drawable->textures[i], NULL);
             pipe_resource_reference(&drawable->msaa_textures[i], NULL);

Reply via email to