mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-06-17 23:18:23 +02:00
gl-renderer: rename needs_fb_curves to has_blend_to_output
In function setup_shader_blending_or_shadow(), needs_shadow is a hard requirement, while needs_fb_curves isn't. When needs_fb_curves is true, we try to create an in-shader blender (which makes use of fb curves) and, if that fails, we fallback to a shadow buffer (avoiding fb curves completely). The term "need" makes things a bit confusing, as the fallback path is allowed. So rename needs_fb_curves to has_blend_to_output, making the fallback path more natural. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
963ceeab5e
commit
db68886cf4
1 changed files with 13 additions and 6 deletions
|
|
@ -4852,17 +4852,24 @@ setup_shader_blending_or_shadow(struct gl_renderer *gr,
|
|||
{
|
||||
struct weston_compositor *wc = output->compositor;
|
||||
const struct weston_testsuite_quirks *quirks = &wc->test_data.test_quirks;
|
||||
bool needs_fb_curves;
|
||||
bool has_blend_to_output;
|
||||
bool needs_shadow;
|
||||
|
||||
needs_shadow = quirks->gl_force_full_redraw_of_shadow_fb;
|
||||
needs_fb_curves = output->color_outcome->from_blend_to_output &&
|
||||
!output->from_blend_to_output_by_backend;
|
||||
/**
|
||||
* has_blend_to_output requires either in-shader blending (our
|
||||
* preference) or, as a fallback, a shadow buffer. Shadow buffer require
|
||||
* an extra blit and also 16-bit floating point pixel formats, which uses
|
||||
* more memory and bandwidth in comparison to in-shader blending.
|
||||
*/
|
||||
|
||||
if (needs_fb_curves)
|
||||
needs_shadow = quirks->gl_force_full_redraw_of_shadow_fb;
|
||||
has_blend_to_output = output->color_outcome->from_blend_to_output &&
|
||||
!output->from_blend_to_output_by_backend;
|
||||
|
||||
if (has_blend_to_output)
|
||||
weston_assert_true(wc, gl_features_has(gr, FEATURE_COLOR_TRANSFORMS));
|
||||
|
||||
if (!needs_shadow && needs_fb_curves) {
|
||||
if (!needs_shadow && has_blend_to_output) {
|
||||
switch (quirks->blending_impl) {
|
||||
case WESTON_BLENDING_IMPL_AUTO:
|
||||
go->shader_blender = gl_shader_blender_create(gr, output);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue