From 4bb45bcd168039be52ca7764310a58d5a0832617 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 7 Apr 2022 17:55:09 -0400 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/zink/zink_context.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 358bd9f2453..da42871119e 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2766,6 +2766,12 @@ zink_set_framebuffer_state(struct pipe_context *pctx, 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 && + surf->format != res->base.b.format) + mesa_loge("zink: SRGB framebuffer unsupported without KHR_swapchain_mutable_format"); + } res->fb_binds++; ctx->gfx_pipeline_state.void_alpha_attachments |= util_format_has_alpha1(surf->format) ? BITFIELD_BIT(i) : 0; }