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>
dev
Pekka Paalanen 4 years ago
parent 37fe6fde49
commit d2cfbff186
  1. 7
      libweston/renderer-gl/gl-renderer.c
  2. 8
      tests/output-damage-test.c

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

@ -139,16 +139,14 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
* color regardless of damage. The blit uses damage too, and
* the damage pattern that is tested for needs to appear in
* that step.
*
* The quirk also ensures the shadow framebuffer is created
* even if not needed.
*/
setup.test_quirks.gl_force_full_redraw_of_shadow_fb = true;
/* To skip instead of fail the test if shadow not available */
setup.test_quirks.required_capabilities = WESTON_CAP_COLOR_OPS;
weston_ini_setup(&setup,
cfgln("[output]"),
cfgln("name=headless"),
cfgln("use-renderer-shadow=true"));
}
return weston_test_harness_execute_as_client(harness, &setup);

Loading…
Cancel
Save