renderer-gl: make resize_output() logging more accurate

Discriminate between renderbuffer discard and shadow allocation
failures. While at it, let's pring the shadow pixel format rather than
hardcoding it in a string.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2025-10-28 13:24:29 +02:00
parent 9a9423e3c4
commit e891beddc2

View file

@ -4535,8 +4535,11 @@ gl_renderer_resize_output(struct weston_output *output,
/* Discard renderbuffers as a last step in order to emit discarded
* callbacks once the renderer has correctly been updated. */
if (!gl_renderer_discard_renderbuffers(go, false))
if (!gl_renderer_discard_renderbuffers(go, false)) {
weston_log("Output %s failed to discard renderbuffers.\n",
output->name);
return false;
}
if (!shfmt)
return true;
@ -4550,6 +4553,11 @@ gl_renderer_resize_output(struct weston_output *output,
gl_texture_parameters_init(gr, &go->shadow_param, GL_TEXTURE_2D, NULL,
NULL, NULL, false);
if (!ret) {
weston_log("Output %s failed to create %s shadow.\n",
output->name, shfmt->drm_format_name);
}
return ret;
}
@ -4637,16 +4645,14 @@ gl_renderer_output_create(struct weston_output *output,
output->renderer_state = go;
if (!gl_renderer_resize_output(output, fb_size, area)) {
weston_log("Output %s failed to create 16F shadow.\n",
output->name);
output->renderer_state = NULL;
free(go);
return -1;
}
if (shadow_exists(go)) {
weston_log("Output %s uses 16F shadow.\n",
output->name);
weston_log("Output %s uses %s shadow.\n",
output->name, go->shadow_format->drm_format_name);
}
return 0;