Skip to content
Snippets Groups Projects

Gamma correct blending with sRGB

Merged Pekka Paalanen requested to merge pq/weston:mr/color-arch into main
All threads resolved!
2 files
+ 6
9
Compare changes
  • Side-by-side
  • Inline
Files
2
  • f9bc02c2
    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: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
@@ -3317,7 +3317,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,
@@ -3333,9 +3335,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;
Loading