Rewrite rendering pipeline

This was needed to fix various corner cases when doing blending of colors
in linear space. The new architecture has the same performance as the
old in the common case of opaque rendering with no UI layers or images.

In the case of only positive z-index images there is a performance
decrease as the OS Window is now rendered to a offscreen texture and
then blitted to screen. However, in the future when we move to Vulkan or
I can figure out how to get Wayland to accept buffers with colors in
linear space, this performance penalty can be removed. The performance
penalty was not significant on my system but this is highly GPU
dependent. Modern GPUs are supposedly optimised for rendering to
offscreen buffers, so we will see. The awrit project might be a good
test case.

Now either we have 1-shot rendering for the case of opaque with only ext
or all the various pieces are rendered in successive draw calls into an
offscreen buffer that is blitted to the output buffer after all drawing
is done.

Fixes #8869
This commit is contained in:
Kovid Goyal
2025-08-11 00:40:26 +05:30
parent 0afa0c4e50
commit d52f2e7981
42 changed files with 1200 additions and 1176 deletions

View File

@@ -86,9 +86,9 @@ def set_custom_ibeam_cursor() -> None:
log_error(f'Failed to set custom beam cursor with error: {e}')
def load_all_shaders(semi_transparent: bool = False) -> None:
def load_all_shaders() -> None:
try:
load_shader_programs(semi_transparent)
load_shader_programs()
load_borders_program()
except CompileError as err:
raise SystemExit(err)