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 <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2026-05-25 13:36:11 -03:00 committed by Marius Vlad
parent db68886cf4
commit b71ff0f24a

View file

@ -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;
}