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 <daniels@collabora.com>
Signed-off-by: Heinrich Fink <hfink@snap.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29715>
This commit is contained in:
Heinrich Fink 2024-06-13 11:35:19 +02:00
parent 4c3d1a09de
commit 222fbcbfd5

View file

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