Simon Ser
8c7041c4e8
backend/drm: relay full HDR metadata
2025-06-26 11:02:26 +00:00
Simon Ser
aecb867098
output: add full HDR metadata to wlr_output_image_description
...
This allows sinks to improve their tone mapping.
2025-06-26 11:02:26 +00:00
Simon Ser
bf40f396bf
scene: grab image description from output state
...
Alternative to https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5089
2025-06-26 09:56:12 +00:00
Simon Ser
2498036e67
output: add output_pending_image_description()
2025-06-26 09:56:12 +00:00
Simon Ser
e76f8ac2b3
output: add wlr_output.image_description
...
Stores the current image description.
2025-06-26 09:56:12 +00:00
tokyo4j
6d8bb66f98
xwm: add support for _NET_WM_ICON
2025-06-26 08:50:02 +00:00
Isaac Freund
f5e7caf599
util/box: set dest to empty if boxes don't intersect
...
Currently if both box_a and box_b are non-empty but do not intersect,
this function does not set dest to an empty box. This contradicts the
doc comments and is surprising for users.
2025-06-21 09:54:24 +00:00
Simon Ser
98af337175
output: shorten output enabled checks
...
Use a more concise loop instead of repeated logic.
No behavior change.
2025-06-20 19:02:54 +02:00
Simon Ser
0c272a3842
scene: add support for color-management-v1 primaries
2025-06-18 19:37:55 +00:00
Simon Ser
071773cb27
scene: add primaries support to wlr_scene_buffer
2025-06-18 19:37:55 +00:00
Simon Ser
ae85c31176
render/vulkan: add luminance multiplier for texture shader
2025-06-18 19:37:55 +00:00
Simon Ser
fa1feb447f
render, render/vulkan: add primaries to wlr_render_texture_options
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
ec422ac389
render/vulkan: prepare texture shader for new transforms
2025-06-18 19:37:55 +00:00
Simon Ser
7a1161438c
scene: add support for color-management-v1 transfer functions
2025-06-18 19:37:55 +00:00
Simon Ser
4efec11721
scene: add transfer function support for wlr_scene_buffer
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
dd3d9be41e
render/pass: add wlr_render_texture_options.transfer_function
...
Also add a bit in wlr_renderer.features to indicate support.
2025-06-18 19:37:55 +00:00
Simon Ser
c8d94000a6
color-management-v1: add EXT_LINEAR
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
f5a0992686
render/vulkan: fix multiplication order for output color matrix
...
This had the same bug as the texture side, but I forgot to fix it.
See:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4988#note_2867416
Fixes: f3524de980 ("render, render/vulkan: add primaries to wlr_buffer_pass_options")
2025-06-18 21:25:37 +02:00
Simon Ser
7b6eec530c
render/vulkan: add luminance multipler for output shader
2025-06-18 00:11:33 +02:00
Simon Ser
b482e9089b
backend/drm: add support for image description transfer function
2025-06-18 00:11:33 +02:00
Simon Ser
dc258b2237
output: add transfer function to image description
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
f024d1b8c8
backend/drm: add support for color primaries
2025-06-18 00:07:58 +02:00
Simon Ser
e64de4d55f
output: add color primaries to output state
2025-06-18 00:07:58 +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
a5706e2fb9
render/vulkan: use array declaration in encode_proj_matrix()
...
This makes it more obvious what the final layout of the matrix will
be.
2025-06-17 19:41:29 +02:00
Simon Ser
1df2274f6c
render/vulkan: rename mat3_to_mat4() to encode_proj_matrix()
...
This function is specific to projection matrices.
2025-06-17 19:35:16 +02:00
Simon Ser
30c6efedf1
render/vulkan: use output_pipe_srgb for non-NULL sRGB color transform
2025-06-17 18:50:25 +02:00
Simon Ser
2ea0e386c4
render/vulkan: add color transformation matrix
2025-06-17 18:47:50 +02:00
Simon Ser
a30c102163
output: drop gamma LUT from state
...
This has been superseded by color transforms.
2025-06-16 09:06:10 +00:00
Simon Ser
bfcb4211f6
wlr_gamma_control_v1: use color transforms
2025-06-16 09:06:10 +00:00
Simon Ser
f10dd1da1c
backend/drm: add support for color transforms
2025-06-16 09:06:10 +00:00
Simon Ser
97f6946c8d
output: add color transform to state
...
Color transforms are better suited than raw gamma tables, because:
- They don't need to get copied around: they are ref'counted.
- They can represent more color operations (will be useful for the
upcoming KMS color pipeline API, and for the Wayland color
management protocol).
2025-06-16 09:06:10 +00: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
9b97e2607d
render/color: use variable instead of type in sizeof()
...
Conforms to the wlroots code style.
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
Simon Ser
c6133f9912
scene: send surface preferred transform alongside DMA-BUF feedback
...
wl_surface.preferred_buffer_transform is mainly useful to make
direct scan-out more likely. It shouldn't make a difference with
GL/Vulkan rendering.
2025-06-16 07:54:00 +00:00
Simon Ser
6204fc3278
scene: use output with highest refresh rate for frame pacing
...
If a surface is mirrored on two outputs, we don't want to pick the
first output if the second has a higher refresh rate.
Also fixes duplicate frame/feedback events when a surface is added
to multiple scenes.
2025-06-16 07:54:00 +00:00
Simon Ser
51d051497d
scene: filter frame_done primary output in surface handler
...
This lets the surface handler decide which output to send frame
callbacks from. The output_sample event already works this way.
Introduce wlr_scene_surface_send_frame_done() as a replacement for
wlr_scene_buffer_send_frame_done() when a compositor doesn't have
an output at hand.
2025-06-16 07:54:00 +00:00
Simon Ser
8713ac72fb
scene: configure clients with the highest output scale
...
If a surface appears on two outputs with the same intersection
area, or even if a surface appears on an output with a small
intersection area, we want to use the highest scale.
Fixes flip-flop when a surface is added to multiple scenes.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3901
2025-06-16 07:54:00 +00:00
Simon Ser
95b2771bfd
scene: ignore outputs with too small intersection with nodes
...
If a node has a very small intersection with an output, there's no
point in trying to adapt the node's rendering to that output.
2025-06-16 07:54:00 +00:00
Simon Ser
da820070f4
ext_image_capture_source_v1: add helper to capture scene nodes
2025-06-16 07:54:00 +00:00