mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-20 16:08:21 +02:00
When color management is disabled, the fragment shader was still first
ensuring straight alpha and then immediately just going back to
pre-multiplied. This is near-impossible for a shader compiler to
optimize out, I guess because of the if-statement to handle division by
zero. Having view alpha applied in between certainly didn't make it
easier.
That causes extra fragment computations that are unnecessary. In the
issue report this was found to cause a notable performance regression.
Fix the performance regression by introducing special-case paths for
when straight alpha is not needed. This skips the unnecessary
computations.
Fixes: https://gitlab.freedesktop.org/wayland/weston/-/issues/623
Fixes:
|
||
|---|---|---|
| .. | ||
| egl-glue.c | ||
| fragment.glsl | ||
| gl-renderer-internal.h | ||
| gl-renderer.c | ||
| gl-renderer.h | ||
| gl-shader-config-color-transformation.c | ||
| gl-shaders.c | ||
| meson.build | ||
| vertex.glsl | ||