gl-renderer: use shadow framebuffer automatically

This creates the FP16 shadow framebuffer automatically if the color
transformation from blending space to output space is not identity and
the backend does not claim to implement it on the renderer's behalf.

That makes the weston_output_set_renderer_shadow_buffer() API and
use-renderer-shadow weston.ini option obsolete.

To still cater for the one test that needs to enable the shadow
framebuffer in spite of not needing it for color correct blending, the
quirk it uses now also forces the shadow.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen
2021-04-15 16:32:28 +03:00
parent 37fe6fde49
commit d2cfbff186
2 changed files with 6 additions and 9 deletions
+3 -4
View File
@@ -3313,7 +3313,9 @@ gl_renderer_output_create(struct weston_output *output,
go->begin_render_sync = EGL_NO_SYNC_KHR;
go->end_render_sync = EGL_NO_SYNC_KHR;
if (output->use_renderer_shadow_buffer) {
if ((output->from_blend_to_output != NULL &&
output->from_blend_to_output_by_backend == false) ||
quirks->gl_force_full_redraw_of_shadow_fb) {
assert(gr->gl_supports_color_transforms);
ret = gl_fbo_texture_init(&go->shadow,
@@ -3329,9 +3331,6 @@ gl_renderer_output_create(struct weston_output *output,
free(go);
return -1;
}
} else if (quirks->gl_force_full_redraw_of_shadow_fb) {
weston_log("ERROR: gl_force_full_redraw_of_shadow_fb quirk used but shadow fb was not enabled.\n");
abort();
}
output->renderer_state = go;