From b71ff0f24a809f518843de43bf07e3cf7ead157e Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Mon, 25 May 2026 13:36:11 -0300 Subject: [PATCH] gl-renderer: return early when skipping test In setup_shader_blending_or_shadow(), we can have a test quirk forcing usage of in-shader blending. But not all devices support that. Weston currently handles this by skipping the test on these devices rather than taking the failure paths in setup_shader_blending_or_shadow(). Otherwise, people would not be able to locally run the test suite on devices that don't support in-shader blending. After deciding to skip the test, simply return from the function instead of falling back to shadow buffer usage. Neither in-shader blending or shadow buffer are going to be used, as weston_compositor_exit_with_code(RESULT_SKIP) was already called. Signed-off-by: Leandro Ribeiro --- libweston/renderer-gl/gl-renderer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index bc5eaf228..345bebd74 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -4880,10 +4880,16 @@ setup_shader_blending_or_shadow(struct gl_renderer *gr, case WESTON_BLENDING_IMPL_SHADER: go->shader_blender = gl_shader_blender_create(gr, output); if (!go->shader_blender) { + /** + * If there's a test quirk to create in-shader blender but we + * can't do that (driver may not support), let's skip the test + * instead of failing. + */ weston_log("Error: quirks were used to force in-shader blending, " "but it's not supported by the GLES implementation.\n" "Quitting...\n"); weston_compositor_exit_with_code(wc, RESULT_SKIP); + return true; } break; }