From 39ca39d4f3f2df71422e0fbf9fe28145e437dc93 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 1 Jun 2022 11:31:49 -0400 Subject: [PATCH] kopper: use get_drawable_info path for non-x11 drawables wayland surfaces need to take this path to get resizing right cc: mesa-stable Reviewed-by: Adam Jackson Part-of: (cherry picked from commit b6a80142178ddba9d5b970b53e1f621b95235755) --- .pick_status.json | 2 +- src/gallium/frontends/dri/kopper.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 71a37ad28ad..455093791c0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1561,7 +1561,7 @@ "description": "kopper: use get_drawable_info path for non-x11 drawables", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index aad62ae3e52..2f7088fa6cc 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -680,7 +680,8 @@ kopper_update_drawable_info(struct dri_drawable *drawable) drawable->textures[ST_ATTACHMENT_BACK_LEFT] : drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; - if (is_window && ptex && kscreen->base.fd == -1) + bool do_kopper_update = is_window && ptex && kscreen->base.fd == -1; + if (cdraw->info.bos.sType == VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR && do_kopper_update) zink_kopper_update(screen, ptex, &dPriv->w, &dPriv->h); else get_drawable_info(dPriv, &x, &y, &dPriv->w, &dPriv->h);