From e0bf9a7ea87f425871bdf2a10184a555231b1e79 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 28 Apr 2022 12:47:13 -0400 Subject: [PATCH] kopper: rename a confusing variable is_pixmap is defined in kopper_allocate_textures() as being (!window && x11), which is very different from this check, which determines whether the drawable is a window so rename it to keep things consistent Reviewed-by: Adam Jackson Part-of: --- src/gallium/frontends/dri/kopper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index aec685b7c18..34205da47d6 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -56,7 +56,7 @@ struct kopper_drawable { struct dri_drawable base; struct kopper_loader_info info; __DRIimage *image; //texture_from_pixmap - bool is_pixmap; + bool is_window; }; struct kopper_screen { @@ -494,7 +494,7 @@ kopper_allocate_textures(struct dri_context *ctx, const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader; struct kopper_drawable *cdraw = (struct kopper_drawable *)drawable; - bool is_window = !cdraw->is_pixmap; + bool is_window = cdraw->is_window; bool is_pixmap = !is_window && cdraw->info.bos.sType == VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; width = drawable->dPriv->w; @@ -817,7 +817,7 @@ kopper_create_buffer(__DRIscreen * sPriv, if (sPriv->kopper_loader->SetSurfaceCreateInfo) sPriv->kopper_loader->SetSurfaceCreateInfo(dPriv->loaderPrivate, &drawable->info); - drawable->is_pixmap = isPixmap || drawable->info.bos.sType == 0; + drawable->is_window = !isPixmap && drawable->info.bos.sType != 0; return TRUE; } @@ -840,7 +840,7 @@ kopperSwapBuffers(__DRIdrawable *dPriv) drawable->texture_stamp = dPriv->lastStamp - 1; dri_flush(dPriv->driContextPriv, dPriv, __DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT, __DRI2_THROTTLE_SWAPBUFFER); kopper_copy_to_front(ctx->st->pipe, dPriv, ptex); - if (!kdraw->is_pixmap && !zink_kopper_check(ptex)) + if (kdraw->is_window && !zink_kopper_check(ptex)) return -1; if (!drawable->textures[ST_ATTACHMENT_FRONT_LEFT]) { return 0;