From dbb360f5d100e653b85abddb56865109f227de7e Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 12 May 2025 12:14:57 -0400 Subject: [PATCH] zink: fix broken comparison for dummy pipe surface sizing this should create a new surface if the existing one is too small, not if it is too big cc: mesa-stable Part-of: (cherry picked from commit ef63e3e4d211e491164fea8ec494fdf7ca71d9c8) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_context.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 79cc34f40ee..00db5ba44ae 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3084,7 +3084,7 @@ "description": "zink: fix broken comparison for dummy pipe surface sizing", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index c3e1e17900f..d251aa53ba3 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -5339,7 +5339,7 @@ zink_get_dummy_pipe_surface(struct zink_context *ctx, int samples_index) if (ctx->dummy_surface[samples_index]) { /* delete old surface if ETOOSMALL */ struct zink_resource *res = zink_resource(ctx->dummy_surface[samples_index]->texture); - if (res->base.b.width0 > size || res->base.b.height0 > size) { + if (res->base.b.width0 < size || res->base.b.height0 < size) { pipe_surface_release(&ctx->base, &ctx->dummy_surface[samples_index]); needs_null_init = !samples_index && ctx->di.null_fbfetch_init; if (!samples_index)