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 <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16814>
(cherry picked from commit b6a8014217)
This commit is contained in:
Mike Blumenkrantz 2022-06-01 11:31:49 -04:00 committed by Dylan Baker
parent b3b4b2d563
commit 39ca39d4f3
2 changed files with 3 additions and 2 deletions

View file

@ -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
},

View file

@ -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);