Alexander Orzechowski
1ee75786b4
drm_format_set_union: Require initialized dst and remove assert
2023-05-04 18:19:33 +00:00
novenary
d7917d2076
xwayland: allow compositor to set withdrawn state
2023-05-04 18:05:00 +00:00
Simon Ser
2827ec6b7b
xwayland: enable use of a xserver subproject
...
Makes it easier to work on Xwayland and wlroots features in
parallel.
References: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1048
2023-05-04 18:02:32 +00:00
Simon Ser
403eac51c4
render/vulkan: fix code style for function brackets
2023-05-04 13:31:29 +02:00
Alexander Orzechowski
ec796afb6e
wlr_compositor: Decide opacity from new has_buffer flag.
...
`wlr_surface_get_texture` will always return NULL if the compositor was
not given a renderer.
2023-05-04 11:53:26 +02:00
Alexander Orzechowski
394accbe4a
wlr_compositer: Keep track if surface has committed a buffer before.
...
This would break if you are running with a NULL renderer.
2023-05-04 11:53:26 +02:00
Alexander Orzechowski
2dd9549085
drm_format_set: Mark as unstable
...
This is supposed to be an unstable interface and it was a mistake that
this header was not included.
2023-05-03 19:08:14 +02:00
Alexander Orzechowski
cbe8876050
linux_dmabuf_v1: Use wlr_drm_format_set_union
2023-05-03 12:38:28 -04:00
Austin Shafer
ec37d55a5e
Add union function for format sets
2023-05-03 12:06:48 -04:00
Simon Ser
bf8ae8a036
output/cursor: fix buffer size when nested and scaled
...
The Wayland, X11 and headless backends don't really care about the
cursor size. We were picking a size identical to the texture size
in that case. This is incorrect for LoDPI cursor textures on HiDPI
outputs: in that case, we need to scale up the cursor texture.
Fixes the cursor being chopped off under the Wayland backend with
scale > 1.
2023-05-03 11:32:51 +02:00
Simon Ser
a93fc8afd6
render: introduce blend mode
...
Allow callers to pick the blend mode when rendering a rect. The
"none" mode can be used to disable blending and clear rects.
2023-05-02 21:32:51 +02:00
Simon Ser
6b7d1d732a
render/pixman: fix scaling in render_pass_add_texture()
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3642
Fixes: 6830bfc17f ("render/pixman: implement render pass API")
2023-05-02 15:49:17 +00:00
Alexander Orzechowski
d5320e5f20
tinywl: Release everything before destroy
...
This makes -Db_sanatize=address happy.
2023-05-02 10:48:31 -04:00
Simon Ser
f5a5712a02
render/vulkan: use VK_KHR_synchronization2
...
This simplifies the vkQueueSubmit call, removing the need to pass
timeline semaphore point values as separate arrays.
2023-04-28 15:36:39 +00:00
Simon Ser
6830bfc17f
render/pixman: implement render pass API
2023-04-25 17:26:35 +02:00
Simon Ser
6ce371a317
render/pixman: add begin_pixman_data_ptr_access()
...
This logic is used twice.
2023-04-25 17:26:35 +02:00
Simon Ser
d7fcc1e96f
scene: port to wlr_render_pass
2023-04-25 17:26:35 +02:00
Simon Ser
587852056c
output: add wlr_output_add_software_cursors_to_render_pass()
...
Same as wlr_output_render_software_cursors(), but takes a
struct wlr_render_pass.
2023-04-25 17:26:34 +02:00
Simon Ser
471249ae4f
render/pass: add legacy render pass implementation
...
Add a render pass implementation which leverages the legacy
rendering API. This is helpful during the migration.
2023-04-25 17:25:10 +02:00
Simon Ser
4a1ad32534
render: add render pass helpers
2023-04-25 17:25:10 +02:00
Simon Ser
756dedae20
Add a new renderer API
...
Goals:
- Extensibility: we need to be able to add new params to the calls
to render a texture/rect. For instance we'll need to add fences to
the render texture operation for explicit sync purposes.
- No implicit state: no more bind_buffer, begin, end.
- No matrices: these hurt Pixman and we don't need them.
- Clip regions for optimized damage repainting.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3188
2023-04-25 17:25:10 +02:00
Edgars Cīrulis
17ad034480
xcursor: Resolve warning in xcursor_build_theme_dir
...
Signed-off-by: Edgars Cīrulis <edgarsscirulis@gmail.com>
2023-04-25 10:16:59 +00:00
Simon Zeni
b6ffc26cb2
.builds/archlinux: add x86 build
2023-02-24 15:41:43 -05:00
Simon Zeni
2397e38224
.builds: move clang build to alpine
2023-02-24 14:16:06 -05:00
Simon Ser
ab7eabac84
output: leverage wlr_output_configure_primary_swapchain()
...
Replace our current logic to setup the primary swapchain with
wlr_output_configure_primary_swapchain().
- Removes some code, reducing duplication
- Stop overwriting wlr_output.swapchain with a yet-to-be-tested
swapchain: remove the error_destroy_swapchain label.
2023-02-24 18:22:20 +00:00
Simon Ser
fef8ab22e3
output: introduce wlr_output_configure_primary_swapchain()
...
The goal is to simplify wlr_output by moving all of its rendering
API into separate helpers. Here is a first step to sunset
wlr_output_attach_render(). Instead, compositors call
wlr_output_configure_primary_swapchain(), wlr_swapchain_acquire(),
wlr_renderer_begin_with_buffer() and wlr_output_attach_buffer().
Note that compositors can supply a base struct wlr_output_state.
This is useful to allocate a buffer suitable for submission with
a modeset, for instance.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3079
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3197
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3984
2023-02-24 18:22:20 +00:00
Jan Beich
59acc69737
vulkan: silence -Wint-conversion on 32-bit architectures
...
render/vulkan/renderer.c:388:70: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'VkFence' (aka 'unsigned long long') [-Werror,-Wint-conversion]
VkResult res = vkQueueSubmit(renderer->dev->queue, 1, &submit_info, NULL);
^~~~
render/vulkan/renderer.c:1141:81: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'VkFence' (aka 'unsigned long long') [-Werror,-Wint-conversion]
VkResult res = vkQueueSubmit(renderer->dev->queue, submit_count, submit_infos, NULL);
^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
/usr/local/include/vulkan/vulkan_core.h:4054:49: note: passing argument to parameter 'fence' here
VkFence fence);
^
Fixes: a8a194d695 ("render/vulkan: switch to timeline semaphores")
2023-02-24 16:41:40 +00:00
Simon Ser
8619ffab21
swapchain: remove allocator listener on destroy
...
Past that point the wlr_allocator is gone and the listeners are
invalidated.
2023-02-24 00:07:41 +01:00
Simon Ser
254c5fc752
Switch to "meson setup"
...
Fixes this warning:
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
2023-02-22 11:01:04 +01:00
Simon Ser
b33ab26fe7
render/swapchain: make public
...
We've had this struct for a while. It'd be useful for compositors
if they want to manage the swap chains themselves instead of being
forced to use wlr_output's. Some compositors might also want to use
a swapchain without an output.
2023-02-21 17:14:31 +01:00
Simon Ser
c667e64892
backend: disable DRM backend monitor when WLR_DRM_DEVICES is used
...
WLR_DRM_DEVICES specifies a static list of DRM devices to open
at startup.
Do not create DRM backends for hotplugged DRM devices when it's
set.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3595
2023-02-21 12:55:26 +01:00
Simon Ser
7303e13808
backend: avoid adding NULL backend in attempt_backend_by_name()
2023-02-21 12:52:20 +01:00
Simon Ser
2849712356
backend: create DRM backend monitor when WLR_BACKENDS is used
2023-02-21 12:51:46 +01:00
Simon Ser
3874577d3c
output-layer: document interactions with screen capture
...
When e.g. screencopy-v1 is active, callers are responsible for
disabling output layers.
2023-02-21 10:35:30 +00:00
Simon Ser
bea6bee55d
backend/headless: unconditionally accept all output layers
...
We don't need to do anything special to handle these.
2023-02-21 10:12:35 +00:00
Simon Ser
8338d17d7e
backend/drm: drop wlr_drm_layer.pending_{width,height}
...
No need to store this info in struct wlr_drm_layer. We can just
extract the size when we need it.
2023-02-21 09:45:47 +00:00
Simon Ser
7215bd1e0f
output: expose wlr_output_state_set_buffer()
2023-02-21 09:43:43 +00:00
Simon Ser
4629d0ef40
output: expose wlr_output_state_finish()
...
Same as the original function, but check for the bitfield before
calling pixman_region32_fini(), because that function expects an
initialized region.
2023-02-21 09:43:43 +00:00
Simon Ser
d25ab03326
screencopy-v1: drop unnecessary pixman_region32_t casts
...
The Pixman API now accepts const parameters.
2023-02-21 09:37:59 +00:00
Simon Ser
bbd5145d8a
backend/drm: drop unnecessary pixman_region32_t casts
...
The Pixman API now accepts const parameters.
2023-02-21 09:37:59 +00:00
John Lindgren
7d90cd055d
xwayland: Send synthetic ConfigureNotify per ICCCM 4.1.5
...
X11 clients expect a ConfigureNotify after a ConfigureRequest. If
the compositor/window manager chooses not to honor the request
(e.g. due to the window being maximized), XWayland will not send a
"real" ConfigureNotify event and the window manager is expected to
send a synthetic event instead. Otherwise, the X11 client is left
waiting and may not repaint its window properly.
For comparison, see Openbox's client_configure() or Weston's
weston_wm_window_send_configure_notify().
v2: Move logic to wlr_xwayland_surface_configure()
2023-02-21 09:32:06 +00:00
Alexander Orzechowski
3ef9f91283
wlr_scene: Add dmabuf_feedback helper
2023-02-20 17:21:17 -05:00
Alexander Orzechowski
4ddc20e14c
wlr_scene: Extract considering logic for direct scanout
2023-02-20 16:53:59 -05:00
Alexander Orzechowski
323f0b94db
wlr_scene: Cleanup header includes
...
We don't need to pull wlr_compositor.
2023-02-20 16:53:59 -05:00
Simon Ser
9a425841b0
examples/output-layers: relay feedback events
2023-02-20 18:38:57 +01:00
Simon Ser
849c362ffb
linux-dmabuf-v1: add helper for output layer feedback events
2023-02-20 18:38:57 +01:00
Simon Ser
22d9df2af4
backend/drm: send output layer feedback events
2023-02-20 18:38:57 +01:00
Simon Ser
e1335a792a
output-layer: add feedback event
2023-02-20 18:38:57 +01:00
Simon Ser
4d6fbb2289
backend/drm: add support for output layers
2023-02-20 18:38:57 +01:00
Simon Ser
2398621b8b
backend/drm: add libliftoff composition layer
...
This will be useful for implementing the output layers API.
2023-02-20 18:38:57 +01:00