Commit Graph

18 Commits

Author SHA1 Message Date
John Lindgren b1b34cd665 vulkan: perform sRGB-to-linear conversion correctly for premultiplied values
Pre-multipled sRGB values need to be un-multiplied before conversion
to linear and then re-multiplied after. Compare shaders/texture.frag.

This fixes an issue in labwc where titlebar corners (rendered as
ARGB textures) did not match the rest of the titlebar (rendered as
a solid wlr_scene_rect).

Note: 0.17 has other instances in render/vulkan/renderer.c that need
the same fix.
2024-04-11 09:24:03 +00:00
Kirill Primak 3eb89e5325 render/vulkan: fix possible double free 2024-01-17 15:44:37 +00:00
Manuel Stoeckl e0adaaffb6 render/vulkan: constrain blend to output subpass to redrawn region
This commit only applies to the render pass API.
2023-10-05 11:45:32 +00:00
Alexander Orzechowski 1b0694b794 treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
Alexander Orzechowski e9706e62f5 renderer: Use wlr_render_rect_options_get_box
Fixes: #3697
2023-09-21 02:25:34 -04:00
Alexander Orzechowski 5f6912595e renderer/vulkan: Defer device lost signal until end of pass
If the compositor were to try to handle a GPU reset within the lost
signal (by recreating the renderer) we should avoid referencing renderer
resources after the lost signal. This prevents use after free for such
compositors.
2023-08-20 21:12:06 -04:00
Alexander Orzechowski 2044cc2311 render: Introduce wlr_render_texture_options.blend_mode 2023-06-19 13:16:34 -04:00
Alexander Orzechowski 6bd44c4fcd renderer: Introduce wlr_scale_filter_mode 2023-06-19 12:25:38 -04:00
Alexander Orzechowski 3ee0f52e09 render/vulkan: Dynamically create texture views
Now that we are dynamically creating pipeline layouts, we need separate
texture views for each pipeline layout we choose to use with a texture.
2023-06-17 21:21:35 -04:00
Alexander Orzechowski 8a387b5558 render/vulkan: Dynamically create pipeline layouts
These will happen lazily when pipelines get created.
2023-06-17 21:21:31 -04:00
Alexander Orzechowski 9d31372930 render/vulkan: Handle quad pipeline through generic pipeline path 2023-06-16 19:20:03 -04:00
Alexander Orzechowski 97fdd57eb2 render/vulkan: Dynamically handle pipeline creation for textures
If we ever wanted to handle dynamic state that requires new pipelines
such as using different texture filters those can be added here with more
ease.
2023-06-16 19:09:23 -04:00
Simon Ser 30616bcf0c render/vulkan: reset scissor before post-blend subpass
Otherwise only the last command's area will be copied over.
2023-06-07 21:46:08 +02:00
Simon Ser 150a88bd03 render/vulkan: fix blend subpass matrix
renderer->render_{width,height} are unused with the render pass
API.
2023-06-07 21:30:35 +02:00
Simon Ser fd9e4b860f render/vulkan: fix bound pipeline check for output_pipe
renderer->bound_pipe is legacy, pass->bound_pipeline is used for
the render pass API code-path.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3657
2023-06-07 20:46:33 +02:00
Simon Ser beb820b573 render/vulkan: improve error handling in vulkan_begin_render_pass()
Release the command buffer if we end up not submitting it.
2023-06-01 10:42:56 +02:00
Simon Ser 0ba3ea3bcd render/vulkan: improve error handling in render_pass_submit()
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3644
2023-06-01 10:42:56 +02:00
Simon Ser e07c77f846 render/vulkan: implement render pass API 2023-05-30 09:42:19 +00:00