aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-30linux-dmabuf-v1: introduce wlr_linux_dmabuf_v1_create()Simon Ser
Some compositors may want to use the linux-dmabuf-v1 implementation with a completely custom renderer. Add a function to create the global with a default feedback.
2022-11-30linux-dmabuf-v1: drop wlr_renderer fieldSimon Ser
This isn't used anymore.
2022-11-30linux-dmabuf-v1: don't use wlr_renderer to send legacy format listSimon Ser
The wlr_renderer field will go away in a subsequent commit. Build the legacy device list from the default feedback instead.
2022-11-30linux-dmabuf-v1: don't use wlr_renderer to sanity check DMA-BUFsSimon Ser
The wlr_renderer field will go away in a subsequent commit. Instead of trying to create a texture, try to import the DMA-BUF into the DRM device FD.
2022-11-30linux-dmabuf-v1: add version arg to create()Simon Ser
To be able to add support for newer versions without breaking changes.
2022-11-30linux-dmabuf-v1: add "_with_renderer" suffix to create() functionSimon Ser
Make it clear this is a helper consuming a wlr_renderer. We'll add a lower-level create() function which doesn't take it in the next commit.
2022-11-29types/wlr_seat: finish keyboard_state during wlr_seat_destroySimon Zeni
2022-11-29scene/layer_shell_v1.c: remove redundant commentJohan Malm
2022-11-29scene/layer_shell_v1.c: set exclusive zone correctlyJohan Malm
...when only one edge is anchored. The layer-shell protocol specifies that a positive exclusive-zone value is 'meaningful' if the surface is anchored to either: 1. one edge 2. one edge and both perpendicular edges. For example, if you wish to position a layer-shell client along the top edge and make it exclusive, you should be able to either set anchor=TOP or anchor=TOP|LEFT|RIGHT. It appears that many panels/bars use the latter approach (anchor to an edge and also both perpendicular edges) which is probably why this has not been reported previously. This patch adds support for the first case and thereby makes exclusive zone behaviour consistent with the protocol and also with sway's extant layer-shell implementation.
2022-11-29wlr_scene: Expand damage cull region with fractional scalesAlexander Orzechowski
2022-11-29wlr_scene: Don't cull the entire output when entering direct scanoutAlexander Orzechowski
We don't need to.
2022-11-28scene: fix output damage expansion conditionKirill Primak
Now, it is checked whether an output pixel corresponds to an integer number of buffer pixels; if it doesn't, the region is altered to take this into account.
2022-11-28render/vulkan: import semaphore to DMA-BUF instead of blockingSimon Ser
Right now the Vulkan renderer blocks until the frame is complete after rendering. This is necessary because Vulkan doesn't interoperate well with implicit sync we use everywhere else. Use the new kernel API to import a sync_file into a DMA-BUF to avoid blocking.
2022-11-28render/dmabuf: add dmabuf_import_sync_fileSimon Ser
References: https://lore.kernel.org/dri-devel/20220506180216.2095060-1-jason@jlekstrand.net/
2022-11-28render/vulkan: release stage buffers after command buffer completesSimon Ser
We need to wait for the pending command buffer to complete before re-using stage buffers. Otherwise we'll overwrite the stage buffer with new contents before the texture is fully uploaded.
2022-11-28render/vulkan: destroy textures after command buffer completesSimon Ser
We need to wait for any pending command buffer to complete before we're able to fully destroy a struct wlr_vk_texture: the Vulkan spec requires the VkDescriptorSet to be kept alive. So far we've done this in vulkan_end(), after blocking until the command buffer completes. We'll soon stop blocking, so move this logic in get_command_buffer(), where we check which commands buffers have completed in a non-blocking fashion.
2022-11-28render/vulkan: drop unused fields from wlr_vk_format_modifier_propsSimon Ser
export_imported is never used, and dmabuf_flags is already checked in query_modifier_support().
2022-11-27build: exclude <wlr/types/wlr_drm_lease_v1.h> without DRM backendSimon Ser
When the DRM backend is disabled, so is the DRM lease protocol. Prevent the header from being installed in that case.
2022-11-26scene: set output damage during direct scan-outSimon Ser
This allows the backend to have access to the frame damage, as reported by the scanned-out client. Some KMS drivers can make use of it (e.g. for PSR, or optimized USB transfers in the GUD driver), and the Wayland/X11 backends forward it to the parent compositor.
2022-11-26scene: use wlr_output_state for direct scanoutSimon Ser
Avoids polluting wlr_output.pending with temporary state. Removes the need to call wlr_output_rollback() in error codepaths.
2022-11-25render/vulkan: align staging buffers for texture uploadManuel Stoeckl
vkCmdCopyBufferToImage requires that the buffer offset be a multiple of the texel block size, which for single plane uncompressed formats is the same as the number of bytes per pixel. This commit adds an alignment parameter to vulkan_get_stage_span which ensures that the provided span (and the sequence of image copy operations derived which use it) have this alignment.
2022-11-25backend/session: make optionalSimon Ser
Some compositors are not interested in wlr_session, for instance nested compositors. Disabling wlr_session removes the udev dependency.
2022-11-25backend: use time helpers to implement timeoutsSimon Ser
Instead of hand-rolling get_current_time_msec(), let's just re-use the helper we already have in "util/time.h".
2022-11-25util/time: use int64_t return value for get_current_time_msec()Simon Ser
0xFFFFFFFF milliseconds is 4,294,967,295 ms so about 50 days. A little bit too close for comfort. Use int64_t instead of uint64_t to avoid C's implicit conversion footguns in computations.
2022-11-25backend: error out when missing DRM and libinput in wlr_backend_autocreate()Simon Ser
Instead of returning an empty multi backend, fail with a clear error when both the DRM and libinput backends are disabled.
2022-11-25backend/session: disable libseat examples for subproject by defaultSimon Ser
We have no use for these.
2022-11-25shm: add create() function without a wlr_rendererSimon Ser
This allows compositors which don't use wlr_renderer to still use wlroots' wl_shm implementation.
2022-11-25render/vulkan: add support for RGB565 texture formatManuel Stoeckl
Since this does not have a matching _SRGB-type vulkan format, add a new shader variant/pipeline to perform the sRGB->linear texture conversion.
2022-11-24scene: introduce wlr_scene_buffer.events.outputs_updateKirill Primak
This event is useful for e.g. sending the preferred buffer scale to the client.
2022-11-24compositor: make renderer optionalSimon Ser
This is a first step towards moving texture uploading out of wlr_compositor. This commit allows compositors to opt-out of the texture uploading by passing a NULL wlr_renderer. An immediate user of this is gamescope, which currently implements a stub wlr_renderer just to make wlr_compositor happy.
2022-11-24compositor: release current buffer after commit eventSimon Ser
Some compositors may want to access the original buffer in their commit handler.
2022-11-24compsitor: document wlr_compositor_create()Simon Ser
2022-11-24backend/multi: stop pulling <wlr/backend/session.h>Simon Ser
Unused.
2022-11-24render/gles2, render/pixman: stop pulling <wlr/backend.h>Simon Ser
No reason why the GLES2/Pixman renderers should depend on the backend.
2022-11-24backend: stop pulling <wlr/backend/session.h>Simon Ser
We can just forward-declare the struct instead.
2022-11-24backend/session: drop unused <libudev.h>Simon Ser
We don't actually need to pull that header here.
2022-11-24render: stop pulling <wlr/backend.h>Simon Ser
Let's just forward-declare struct wlr_backend instead. We need to fixup the Vulkan renderer: it needs makedev(), which got included by chance via <wlr/backend.h> → <wlr/backend/session.h> → <libudev.h>.
2022-11-24seat/pointer: Initialize low_res_valueGuido Günther
Fixes In file included from /usr/include/wayland-server-core.h:32, from ../types/seat/wlr_seat_pointer.c:6: In function 'wl_fixed_from_double', inlined from 'wlr_seat_pointer_send_axis' at ../types/seat/wlr_seat_pointer.c:367:6: /usr/include/wayland-util.h:641:17: error: 'low_res_value' may be used uninitialized [-Werror=maybe-uninitialized] 641 | u.d = d + (3LL << (51 - 8)); | ~~^~~~~~~~~~~~~~~~~~~ ../types/seat/wlr_seat_pointer.c: In function 'wlr_seat_pointer_send_axis': ../types/seat/wlr_seat_pointer.c:329:16: note: 'low_res_value' was declared here 329 | double low_res_value; | ^~~~~~~~~~~~~
2022-11-22Relax 80 column limitSimon Ser
80 cols is a bit short. Linux uses a soft 100 limit, let's do the same.
2022-11-21render/vulkan: update shm texture data in one batchManuel Stoeckl
2022-11-18xwayland/xwm: add support for xwayland-shell-v1Simon Ser
2022-11-18xwayland/shell: add wlr_xwayland_shell_v1_surface_from_serial()Simon Ser
2022-11-18xwayland/server: delay non-lazy startupSimon Ser
This allows users to setup event listeners before the server is actually started.
2022-11-18xwayland/server: add start signalSimon Ser
This can be used to know when wlr_xwayland_server decides to start a new Xwayland process. At that point the wl_client has already been created but the Xwayland process hasn't been started yet.
2022-11-18xwayland: add wlr_xwayland_shell_v1_destroy()Simon Ser
2022-11-18xwayland: add wlr_xwayland_shell_v1_set_client()Simon Ser
2022-11-18xwayland-shell-v1: new protocol implementationSimon Ser
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/163
2022-11-17wl-drm: use resource interfaceSimon Ser
Instead of hardcoding builtin resource types in wlr_buffer_from_resource(), use the modular resource interface.
2022-11-17linux-dmabuf-v1: use resource interfaceSimon Ser
Instead of hardcoding builtin resource types in wlr_buffer_from_resource(), use the modular resource interface.
2022-11-17Nuke deprecated include/wlr/types/wlr_surface.hKirill Primak
Use wlr_compositor.h and wlr_subcompositor.h instead.