From 222fbcbfd5811d47246d89b1006dfb4ae2e869e5 Mon Sep 17 00:00:00 2001 From: Heinrich Fink Date: Thu, 13 Jun 2024 11:35:19 +0200 Subject: [PATCH] zink: remove workaround of FB modifiers forcing present state Remove a legacy workaround where presence of modifiers in framebuffer state results in `needs_present` to be set without a good reason. This prevents hitting an assertion for framebuffers that use DRM modifiers, e.g. via GBM BO alloc -> EGLImage import -> GL FBO bind. Co-authored-by: Daniel Stone Signed-off-by: Heinrich Fink Part-of: --- src/gallium/drivers/zink/zink_context.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 9e02ffb660f..47c6cb81dc9 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3679,10 +3679,6 @@ zink_set_framebuffer_state(struct pipe_context *pctx, check_framebuffer_surface_mutable(pctx, psurf); if (zink_csurface(psurf)->info.layerCount > layers) ctx->fb_layer_mismatch |= BITFIELD_BIT(i); - if (res->modifiers) { - assert(!ctx->needs_present || ctx->needs_present == res); - ctx->needs_present = res; - } if (res->obj->dt) { /* #6274 */ if (!zink_screen(ctx->base.screen)->info.have_KHR_swapchain_mutable_format &&