Félix Poisot
32d5fc1d11
render/color: introduce color_transform_compose
...
It flattens color transform pipelines, and facilitates building
pipelines of variable content
2025-12-18 14:58:28 +00:00
Félix Poisot
a962d58727
render/color: make wlr_color_primaries_from_named public
2025-12-05 19:14:49 +00:00
Félix Poisot
3d3d5fb1b7
render: remove buffer primaries from pass options
...
colorspace conversion is now carried explicitely by setting a
wlr_color_transform_matrix in the color transform
2025-11-24 23:26:14 +00:00
Félix Poisot
2cac711e55
render/vulkan: apply "matrix" color transforms in shader
2025-11-24 23:26:14 +00:00
Simon Ser
2995f31102
render/color: introduce wlr_color_transform_matrix
...
This is useful to perform color space conversions.
2025-11-24 23:26:14 +00:00
Félix Poisot
b98904705d
render/vulkan: fix single-pass linear path
...
Fixes d1c88e9 "render/vulkan: add linear single-subpass"
`find_or_create_render_setup` still assumed a single-buffer setup
always implied use of an srgb format
2025-11-23 10:30:51 +00:00
Simon Ser
fecaf6d1e8
render/vulkan: add suport for color encoding and range
2025-11-13 10:35:56 -05:00
Simon Ser
0b58bddf13
render/color: add wlr_color_transform_pipeline
...
Useful to apply multiple transforms in sequence, e.g. sRGB inverse
EOTF followed by gamma LUTs.
2025-10-18 20:36:01 +02:00
Simon Ser
3d36ab9211
render/color: add wlr_color_transform_eval()
...
Makes it so the Vulkan renderer can handle arbitrary color
transforms, and doesn't need to be updated each time a new one is
added.
2025-10-18 20:35:02 +02:00
llyyr
6e1c8748ff
render: introduce bt.1886 transfer function
2025-10-04 18:13:37 +05:30
Félix Poisot
c2d9ae2142
render: introduce Gamma 2.2 color transform
2025-10-03 19:39:17 +00:00
Simon Ser
d1c88e9497
render/vulkan: add linear single-subpass
...
When the TF is set to EXT_LINEAR, we can write out color values
straight up to a non-SRGB image view.
2025-09-20 10:50:22 +00:00
Simon Ser
3e88a79e6f
render/vulkan: replace wlr_vk_render_pass.srgb_pathway with two_pass
...
The important bit here is whether this is using a single or two
sub-passes. The flag isn't used for anything else.
Preparation for an upcoming one-subpass codepath.
2025-09-20 10:50:22 +00:00
Simon Ser
b2d09cdee9
render/vulkan: add wlr_vk_render_pass.render_buffer_out
...
Simplifies the logic and prepares for a new render setup.
2025-09-20 10:50:22 +00:00
Simon Ser
35eba5f2fe
render/vulkan: add wlr_vk_render_pass.render_setup
...
Simplifies the logic and prepares for a new render setup.
2025-09-20 10:50:22 +00:00
Simon Ser
a91f96b391
render/vulkan: introduce wlr_vk_render_buffer_out
...
Holds common state for final output buffer targets.
2025-09-20 10:50:22 +00:00
Simon Ser
54374b6fe6
render/vulkan: rename plain to two_pass
...
We will introduce a new subpass without any post-processing step.
Rename "plain" so that there's no confusion.
2025-09-20 10:50:22 +00:00
Simon Ser
ae85c31176
render/vulkan: add luminance multiplier for texture shader
2025-06-18 19:37:55 +00:00
Simon Ser
a8144088df
render/vulkan: add support for PQ for textures
2025-06-18 19:37:55 +00:00
Simon Ser
3a51a5c623
render/vulkan: add texture color transformation matrix
2025-06-18 19:37:55 +00:00
Simon Ser
56d95c2ecb
render/vulkan: introduce wlr_vk_frag_texture_pcr_data
...
Contains UBOs for texture.frag.
2025-06-18 19:37:55 +00:00
Simon Ser
8d1c6e42ac
render/vulkan: add support for texture transfer functions
2025-06-18 19:37:55 +00:00
Simon Ser
b1a9dab03e
render/vulkan: fix typo in wlr_vk_texture.views comment
2025-06-18 19:37:55 +00:00
Simon Ser
0ee0452af0
render/color, render/vulkan: add EXT_LINEAR to enum wlr_color_transfer_function
2025-06-18 19:37:55 +00:00
Simon Ser
7b6eec530c
render/vulkan: add luminance multipler for output shader
2025-06-18 00:11:33 +02:00
Simon Ser
4470683591
render/color, render/vulkan: add support for PQ transfer function
2025-06-18 00:11:31 +02:00
Simon Ser
8430a1922d
render/vulkan: add PQ inverse EOTF to output shader
2025-06-18 00:09:25 +02:00
Simon Ser
f3524de980
render, render/vulkan: add primaries to wlr_buffer_pass_options
2025-06-18 00:07:35 +02:00
Simon Ser
2ea0e386c4
render/vulkan: add color transformation matrix
2025-06-17 18:47:50 +02:00
Simon Ser
74217a4d93
render/color: introduce COLOR_TRANSFORM_LUT_3X1D
...
This will be useful to apply LUTs applied via wlr_gamma_control_v1,
and to add wlr_color_transform support to wlr_output.
2025-06-16 09:06:10 +00:00
Simon Ser
3665b53e29
render/color: replace COLOR_TRANSFORM_LUT_3D with COLOR_TRANSFORM_LCMS2
...
Converting the LCMS2 transform to a 3D LUT early causes issues:
- It's a lossy process, the consumer will not be able to pick a
3D LUT size on their own.
- It requires unnecessary conversions and allocations: an intermediate
3D LUT is allocated, but the renderer already allocates one.
- It makes it harder to support arbitrary color transforms in the
renderer, because each type needs to be handled differently.
Instead, expose a function to evaluate a color transform, and use
that to build the 3D LUT in the renderer.
2025-06-16 09:06:10 +00:00
Simon Ser
d421538b4a
render/color: add wlr_color_transform_init()
2025-06-16 09:06:10 +00:00
Kirill Primak
5fd43add1c
Fix/cleanup includes a bit
2025-04-15 20:13:29 +03:00
Simon Ser
10b8880fc7
render/color: add wlr_color_transfer_function_get_default_luminance()
2025-03-30 16:21:26 +02:00
Simon Ser
e11012a024
render/color: introduce wlr_color_primaries_from_named()
2025-03-30 16:21:26 +02:00
Simon Ser
156201fe71
render/color: add wlr_color_primaries_to_xyz()
2025-03-30 16:21:26 +02:00
Simon Ser
d8ad4809fc
render/color: include public header from private one
2025-03-30 16:21:26 +02:00
Simon Ser
7cf8e80ffe
render/allocator: add udmabuf allocator
...
udmabuf can create a DMA-BUF backed by a memfd. This is useful
when running with a software implementation of GL/Vulkan: the memfd
can be passed to the parent compositor via wl_shm and the DMA-BUF
can be imported via the usual APIs into GL/Vulkan.
2024-12-22 21:37:57 +00:00
Guido Günther
85e2b662f1
renderer: Drop mention of wlr_renderer_begin_with_buffer
...
It got removed in 3ed1268f ("render: Nuke old read pixels API")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-11-11 22:48:50 +00:00
Simon Ser
c0945b6613
render/allocator: drop allocator_autocreate_with_drm_fd()
...
This is now unused.
2024-11-07 18:55:01 +01:00
Simon Ser
4ec1defb3e
all: use public <wlr/render/allocator.h>
...
We don't need to use the private header in these files.
2024-11-07 18:48:20 +01:00
Kenny Levinsen
1f13bc72fe
render/vulkan: Garbage collect unused buffers
...
Perform a primitive garbage collection of buffers that have not been
used in the past 10 seconds, an arbitrarily selected number.
As garbage collection also makes span buffer allocation happen much more
often, logging on allocation activity leads to a lot of log noise so get
rid of that while at it.
2024-11-07 09:49:29 +00:00
Simon Ser
3bbfae73ae
render/vulkan: add support for explicit sync
2024-10-28 17:51:21 +00:00
Alexander Orzechowski
3187479c07
render/color: Invert ownership model of color_transform types.
...
Color transform can have multiple types and these different types
want to store different metadata. We previously stored this metadata
directly on wlr_color_transform even for transforms that don't use it.
Instead, let's take the prior art from wlr_scene where each scene node
is built on a base node. Notice how wlr_color_transform_lut3d now has
a `struct wlr_color_transform base`. This is advantageous in multiple
ways:
1. We don't allocate memory for metadata that will never be used.
2. This is more type safe: Compositors can pass around a
struct wlr_color_transform_lut3d if they know they only want to use a
3d_lut.
3. This is more scalable. As we add more transform types, we don't have
to keep growing a monolithic struct.
2024-08-24 14:33:22 -04:00
Simon Ser
d2374b3e4e
render/gles2: implement explicit sync API
2024-08-06 17:37:06 +00:00
Simon Ser
19ffbfe356
render/egl: add support for explicit sync extensions
2024-08-06 17:37:06 +00:00
Kirill Primak
67b88e46b0
Fix __VA_OPT__ macro invocations
2024-06-30 09:01:15 +03:00
Simon Ser
3880ee15d7
Use standard __VA_OPT__ instead of GNU's ##__VA_ARGS__
...
C23 has standardized a way to write variadic macros that accept
zero arguments:
https://open-std.org/JTC1/SC22/WG14/www/docs/n3033.htm
Use that instead of the GNU extension when available.
2024-06-27 18:13:05 +00:00
Kenny Levinsen
47c578945c
render/vulkan: Recycle memory maps for stage spans
...
Remapping buffers on every use causes a lot of unwanted pagefaults.
Reuse the mapping to significantly speed up the memcpy.
2024-06-24 15:55:10 +00:00
Manuel Stoeckl
ffdbfdbbbd
render/vulkan: add support for output color transforms
2024-04-26 17:17:36 +00:00