zink: fix broken comparison for dummy pipe surface sizing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

this should create a new surface if the existing one is too small,
not if it is too big

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34933>
This commit is contained in:
Mike Blumenkrantz 2025-05-12 12:14:57 -04:00 committed by Marge Bot
parent 824194aa0b
commit ef63e3e4d2

View file

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