Module: Mesa Branch: staging/22.1 Commit: e34284b7dc4f551192be9eef7a8dcd4cf3911647 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e34284b7dc4f551192be9eef7a8dcd4cf3911647
Author: Mike Blumenkrantz <[email protected]> Date: Mon Apr 25 10:41:46 2022 -0400 kopper: always fetch and store drawable info Reviewed-by: Adam Jackson <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16179> --- src/gallium/frontends/dri/kopper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index 6fa8e70c457..1d7ec12718d 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -46,6 +46,7 @@ struct kopper_drawable { struct dri_drawable base; struct kopper_loader_info info; + bool is_pixmap; }; struct kopper_screen { @@ -283,7 +284,7 @@ kopper_allocate_textures(struct dri_context *ctx, templ.depth0 = 1; templ.array_size = 1; templ.last_level = 0; - bool is_window = cdraw->info.bos.sType != 0; + bool is_window = !cdraw->is_pixmap; uint32_t attachments = 0; for (i = 0; i < statts_count; i++) @@ -507,9 +508,10 @@ kopper_create_buffer(__DRIscreen * sPriv, return FALSE; drawable->info.has_alpha = visual->alphaBits > 0; - if (sPriv->kopper_loader->SetSurfaceCreateInfo && !isPixmap) + if (sPriv->kopper_loader->SetSurfaceCreateInfo) sPriv->kopper_loader->SetSurfaceCreateInfo(dPriv->loaderPrivate, &drawable->info); + drawable->is_pixmap = isPixmap || drawable->info.bos.sType == 0; return TRUE; }
