zink: only warn once for SRGB fb without KHR_swapchain_mutable_format

Fixes: 4bb45bcd16 ("zink: add error logging for SRGB framebuffer without KHR_swapchain_mutable_format")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16642>
(cherry picked from commit c97aee426e)

Conflicts:
	src/gallium/drivers/zink/zink_context.c
This commit is contained in:
Mike Blumenkrantz 2022-05-20 12:39:03 -04:00 committed by Dylan Baker
parent cf3abbaa58
commit 67509f57a3
2 changed files with 8 additions and 3 deletions

View file

@ -2569,7 +2569,7 @@
"description": "zink: only warn once for SRGB fb without KHR_swapchain_mutable_format",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "4bb45bcd168039be52ca7764310a58d5a0832617"
},

View file

@ -2808,8 +2808,13 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
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");
surf->format != res->base.b.format) {
static bool warned = false;
if (!warned) {
mesa_loge("zink: SRGB framebuffer unsupported without KHR_swapchain_mutable_format");
warned = true;
}
}
}
res->fb_binds++;
ctx->gfx_pipeline_state.void_alpha_attachments |= util_format_has_alpha1(surf->format) ? BITFIELD_BIT(i) : 0;