Commit graph

7568 commits

Author SHA1 Message Date
rewine
efb17980a8 ext_image_capture_source_v1: remove unused struct definition
Remove the redundant wlr_ext_foreign_toplevel_image_capture_source_v1
struct that was not used anywhere in the codebase.
2025-07-24 14:49:27 +00:00
liupeng
be5e266211 cursor: update output cursor even if output is disabled
During suspend, we first disable output and then remove the input device.
This causes cursor->state->surface released while cursor->texture leaves.
Which leads to use-after-free after resume.
2025-07-24 14:47:32 +00:00
Andri Yngvason
80c7e0f772 ext-image-capture-source: output: Apply transform to cursor
The cursor can be expected to also be transformed if the output is
transformed.
2025-07-23 15:06:24 +00:00
Yixue Wang
ccec4116b3 types/color_management: check on invalid image description
Check if image description is valid. If not, post error to client.
2025-07-20 23:01:58 +08:00
Yixue Wang
d2007d7dc1 types/color_representation: correctly cleanup in manager create
Global should be created after all other initialization finished.
Free manager in err_options.
2025-07-18 18:12:40 +08:00
David Turner
a4eb2cff46 color-representation-v1: Add wlr enums + converters
Add wlr-internal enums for the properties specified in
color-representation-v1 (encoding, range, chroma siting, alpha mode) so
that other parts of wlroots can use these without depending on the
protocol specifics and without needing to include the protocol headers.
Also add conversion functions to convert the protocol enum values into
the wlroots enum values.
2025-07-17 16:41:14 +01:00
David Turner
eff620770c color-representation-v1: new protocol
Add a minimal implementation of the color-representation-v1 protocol
(not including anything to actually use the new properties in
rendering/scanout)
2025-07-17 16:40:45 +01:00
David Turner
f5dc6416f0 util/mem: Move memdup to new util/mem.c file
This seems handy and I want to use this in wlr_color_representation.
2025-07-17 16:39:58 +01:00
YaoBing Xiao
c14aa1d0b8 render/vulkan: destroy vulkan instance when drm phdev mismatch 2025-07-15 08:59:37 +08:00
Consolatis
c39b3ce7a3 transient_seat: initialize seat destroy listener
This fixes a `wl_list_remove()` from an uninitialized listener
when using `wlr_transient_seat_v1_deny()` in a `create_seat`
handler.
2025-07-10 19:52:45 +02:00
Simon Ser
f4327f52cf xdg-toplevel-tag-v1: new protocol
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/238
2025-07-07 09:10:37 +00:00
Consolatis
6aa654b728 wlr_text_input_v3: remove event arguments from header
Fixes 2d5492c737
2025-07-06 14:10:25 +02:00
Félix Poisot
31b78a4f3a scene: fix output transfer functions
fixes: bf40f396b
2025-07-03 12:29:27 +00:00
David Turner
58c3680d96 scene: Block damage on single-pixel buffer textures
We cache whether buffers are single-pixel buffers (and if so what color
they are) to allow rendering optimizations.  But this breaks if the
client changes out the single-pixel buffer for one with a different
color, because this updates the texture in-place instead of actually
changing the buffer.

We can fix this by blocking in-place texture updates for single pixel
buffers.

Original bug: https://codeberg.org/ifreund/waylock/issues/121
See also: !5092
2025-07-01 11:38:56 +01:00
Simon Ser
48bd1831fe render/egl: fix software rendering check
Commit b4ce0d8b39 ("render/egl: accept negative DRM FD to select
software rendering") added an EXT_device_drm check to figure out
whether the user selected a device with a DRM FD or without one.
However, for KMS-only devices, Mesa will never advertise the
selected KMS node:
3f1d40d230/src/egl/main/egldevice.c (L109)

Instead, pass down a parameter to indicate whether a DRM FD was
passed in.

Fixes: b4ce0d8b39 ("render/egl: accept negative DRM FD to select software rendering")
2025-06-29 10:57:56 +02:00
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