zink: add error logging for SRGB framebuffer without KHR_swapchain_mutable_format

this is going to explode, so at least print an error explaining why

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15808>
This commit is contained in:
Mike Blumenkrantz 2022-04-07 17:55:09 -04:00 committed by Marge Bot
parent bbede22850
commit 4bb45bcd16

View file

@ -2766,6 +2766,12 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
assert(!ctx->needs_present || ctx->needs_present == res); assert(!ctx->needs_present || ctx->needs_present == res);
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 &&
surf->format != res->base.b.format)
mesa_loge("zink: SRGB framebuffer unsupported without KHR_swapchain_mutable_format");
}
res->fb_binds++; res->fb_binds++;
ctx->gfx_pipeline_state.void_alpha_attachments |= util_format_has_alpha1(surf->format) ? BITFIELD_BIT(i) : 0; ctx->gfx_pipeline_state.void_alpha_attachments |= util_format_has_alpha1(surf->format) ? BITFIELD_BIT(i) : 0;
} }