From b288e5d0ceb85a67870a5601ccb81ea52d54d6e7 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 13 Feb 2023 14:53:43 -0500 Subject: [PATCH] zink: account for null surface when trying to retain clears on fb bind not currently possible but will be soon Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index bb1f730..1ebf560 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3162,7 +3162,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx, struct zink_surface *b = zink_csurface(state->cbufs[i]); if (a == b) continue; - if (memcmp(&a->base.u.tex, &b->base.u.tex, sizeof(b->base.u.tex)) || + if (!a || !b || memcmp(&a->base.u.tex, &b->base.u.tex, sizeof(b->base.u.tex)) || a->base.texture != b->base.texture) flush_clears = true; else if (a->base.format != b->base.format) -- 2.7.4