summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2022-04-28 12:47:13 -0400
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2022-04-28 21:53:00 -0400
commite0bf9a7ea87f425871bdf2a10184a555231b1e79 (patch)
treef87246349ccffd61ecd21af55375e27409febe5c
parent699361504782a0cb3aae028aff01ebd89a1ed936 (diff)
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 <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16190>
-rw-r--r--src/gallium/frontends/dri/kopper.c8
1 files 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;