st/manager: update framebuffer size if texture has been resized
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 29 Sep 2021 17:15:01 +0000 (13:15 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Apr 2022 00:17:40 +0000 (00:17 +0000)
zink/kopper can and does expect this when resizing swapchains,
so don't ignore it

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>

src/mesa/state_tracker/st_manager.c

index a3ac106a77e4aa6038b53bd3e4f211126b3a4a58..e49ce3ae6f2e691db8d1923e18d2ad6507b75a79 100644 (file)
@@ -262,7 +262,9 @@ st_framebuffer_validate(struct gl_framebuffer *stfb,
 
       rb = stfb->Attachment[idx].Renderbuffer;
       assert(rb);
-      if (rb->texture == textures[i]) {
+      if (rb->texture == textures[i] &&
+          rb->Width == textures[i]->width0 &&
+          rb->Height == textures[i]->height0) {
          pipe_resource_reference(&textures[i], NULL);
          continue;
       }