aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-13backend/drm: clear pending cursor FB in drm_connector_commit_state()Simon Ser
Ensure we unlock any pending cursor FB when disabling a connector.
2022-12-13backend/drm: update wlr_drm_connnector.crtc in drm_connector_commit_state()Simon Ser
If the commit fails, then our local state becomes out-of-sync with the kernel's. Additionally, when disabling a connector without going through dealloc_crtc(), conn->crtc would still be set. Fix this by updating conn->crtc in drm_connector_commit_state().
2022-12-13backend/drm: print stringified connector status in realloc_crtcs()Simon Ser
The raw enum value wasn't informative enough. It's not trivial to tell whether 0 means connected or disconnected. Drop the status from the state after realloc, since the exact same information is printed right above.
2022-12-13backend/drm: add drm_connector_status_str()Simon Ser
Helper to stringify a connector status.
2022-12-13render/egl: stop advertising render support for external-only formatsSimon Ser
Some formats like YUV are only supported by Mesa for sampling, not for rendering. However we always unconditionally added the INVALID modifier to the list of render formats. Check whether all modifiers are external-only, in that case, don't add INVALID to the list of render formats.
2022-12-12egl: consistently use EGLint for DMA-BUF formatSimon Ser
EGL_EXT_image_dma_buf_import_modifiers [1] uses EGLint to carry formats. We were casting it to int (which may not be the same width) and uint32_t (which may change the value). Instead, use EGLint everywhere. [1]: https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt
2022-12-09util/region: forbid "shrinking" a region with wlr_region_expand()Kirill Primak
The logic isn't correct.
2022-12-08render/pixman: skip mask for opaque texture renderingSimon Ser
2022-12-08xwayland: use HAVE_ prefix for xcb_xfixes_set_client_disconnect_modeSimon Ser
86fc2199f85a ("build: unify naming for HAVE_* defines") has switched over all other feature defines from HAS_* to HAVE_*, but missed this one.
2022-12-08xwayland: remove find_program() fallback when dep is not foundSimon Ser
The dep allows us to check dep variables to discover supported features. With the binary we assume none of the features are supported. If a user forgets to install the pkg-config file (e.g. because it's in a split package) we end up incorrectly disabling all features. Instead let's error out.
2022-12-07backend/drm: store pending FB in stateSimon Ser
Instead of having a pending_fb field on the struct wlr_drm_plane, move it to struct wlr_drm_connector_state. That way, there's no risk having a stale pending FB around: the state doesn't survive across tests and commits. The cursor is a special case because it's disconnected from the atomic state: the wlr_backend_impl.set_cursor hook sets the cursor for the next commit. Move the field to wlr_drm_connector.cursor_pending_fb.
2022-12-07backend/drm: use separate field to store pending cursor FBSimon Ser
We'll move the pending primary FB into the connector state in the next commit, dropping wlr_drm_plane.pending_fb in the process. Introduce a dedicated field for the cursor, which has to be managed in a special way due to our set_cursor API.
2022-12-07backend/drm: pass fb as arg in set_plane_props()Simon Ser
plane_get_next_fb() will go away in subsequent commits. Primary and cursor will differ with the new logic. Let's prepare for this.
2022-12-07backend/drm: stop using goto in set_plane_props()Simon Ser
We only have one error code-path, no need for goto here.
2022-12-07backend/drm: simplify dealloc_crtc() commitSimon Ser
No need to manually call drm_connector_state_init() here, we can just let drm_connector_commit_state() handle it.
2022-12-07xdg-shell: use defunct_role_object errorKirill Primak
2022-12-07backend/drm: fix VRR testSimon Ser
We were calling drm_connector_supports_vrr() before drm_connector_alloc_crtc(). Thus, when an output is currently off, the VRR test would always fail, because it checks that the vrr_enabled CRTC prop exists.
2022-12-06build: unify naming for HAVE_* definesSimon Ser
We sometimes used HAS_, sometimes polluted the LIBINPUT_ namespace, etc.
2022-12-06backend/libinput: use internal_configSimon Ser
Removes project arguments.
2022-12-06render/allocator/gbm: use internal_configSimon Ser
Removes a project argument.
2022-12-06xcursor: use internal_configSimon Ser
Removes a project argument, improves escaping.
2022-12-06xwayland: use internal_configSimon Ser
Avoids the need to have a separate config.h, and removes C compiler arguments.
2022-12-06build: use a configuration file for internal featuresSimon Ser
This avoids re-building the whole project when switching one Meson option. This shrinks down the compiler invocation command line, making it more readable and making it easier to inspect which flags are passed in (the generated file can be opened). Additionally this is more consistent with our external feature handling, which uses <wlr/config.h> already.
2022-12-06backend/x11: ensure buffers are released on shutdownSimon Ser
2022-12-06backend/wayland: ensure buffers are released on shutdownSimon Ser
destroy_wl_buffer() is called from backend_destroy(). We need to ensure the wlr_buffer is unlocked when we're waiting for a wl_buffer.release event from the parent compositor.
2022-12-06util/env: make env_parse_switch() return a size_tSimon Ser
This function is guaranteed to never return a negative value. This is important because we use arr[env_parse_switch(...)] in a few places.
2022-12-06util/env: add docsSimon Ser
I always forget what env_parse_switch() does on error.
2022-12-06render: simplify renderer_autocreate_with_drm_fd()Simon Ser
Use early returns to remove the !renderer checks.
2022-12-06render/vulkan: wait for DMA-BUF fencesSimon Ser
The Vulkan spec doesn't guarantee that the driver will wait for implicitly synchronized client buffers before texturing from them. radv happens to perform the wait, but anv doesn't. Fix this by extracting implicit fences from DMA-BUFs, importing them into Vulkan as a VkSemaphore objects, and make the render pass wait on these VkSemaphores.
2022-12-06render/dmabuf: add dmabuf_export_sync_file()Simon Ser
2022-12-06tinywl: handle wlr_output.events.request_stateKirill Primak
2022-12-06wlr_xdg_activation_v1: add new_token eventRonan Pigott
2022-12-05output-layout: improve APIKirill Primak
- wlr_output_layout_add{,_auto}() now return a bool indicating whether the function has succeeded. - wlr_output_layout_move() is removed. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1083
2022-12-05output-layout: remove wlr_output_layout_output_stateKirill Primak
wlroots uses "// private state" comments to denote structure fields which shouldn't be accessed by compositors, so let's drop wlr_output_layout_output_state and inline its fields into wlr_output_layout_output; this also simplifies layout output creation.
2022-12-05output-layout: fix function decl indentationKirill Primak
2022-12-05xwayland/xwm: replace role with addonSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3545
2022-12-05compositor: add wlr_surface.events.precommitSimon Ser
2022-12-05addon: Allow NULL owner of addonKenny Levinsen
An owner is not always required or practical. Rather than have the user set a bogus owner in these cases, allow the user to set a NULL owner.
2022-12-05xwayland/xwm: rename xwm_map_shell_surface()Simon Ser
Rename xwm_map_shell_surface() to xwayland_surface_associate(). This function doesn't actually "map" the surface in Wayland parlance, the wl_surface may not have a buffer attached yet.
2022-12-03compositor: document wlr_surface_{enter,leave,send_frame_done}Simon Ser
2022-12-03wlr_drm: Add missing wlr_buffer importAlexander Orzechowski
2022-12-03render/vulkan: use initializers for VkSubmitInfoSimon Ser
2022-12-03render/vulkan: remove stage_cb conditionalSimon Ser
We always have a stage_cb at this point.
2022-12-03render/vulkan: remove pre_cb in vulkan_end()Simon Ser
pre_cb was an alias for stage_cb->vk. Let's just use a single variable instead. Additionally, early return when vulkan_record_stage_cb() fails. We were crashing in vkCmdPipelineBarrier() if that happened.
2022-12-03render/vulkan: fix vkCmdClearAttachments validation errorSimon Ser
Skip clears with an empty scissor. Fixes the following validation error: 00:00:09.734 [wlr] [render/vulkan/vulkan.c:61] Validation Error: [ VUID-vkCmdClearAttachments-rect-02682 ] Object 0: handle = 0x62600001b100, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xadbd476f | CmdClearAttachments(): pRects[0].rect.extent.width is zero. The Vulkan spec states: The rect member of each element of pRects must have an extent.width greater than 0 (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdClearAttachments-rect-02682) (VUID-vkCmdClearAttachments-rect-02682)
2022-12-02render/vulkan: fix commaSimon Ser
2022-12-02render/vulkan: use initializers for VkImageMemoryBarrierSimon Ser
2022-12-02render/vulkan: fix missing pSignalSemaphores for stage CBSimon Ser
We were filling VkTimelineSemaphoreSubmitInfoKHR.pSignalSemaphoreValues, but we were missing VkSubmitInfo.pSignalSemaphores. This was causing VkTimelineSemaphoreSubmitInfoKHR.pSignalSemaphoreValues to be ignored. By chance, the render command buffer was using the next timeline point, so we were waiting for that instead.
2022-12-02render/vulkan: move VkDescriptorSetAllocateInfo downSimon Ser
Move it down, right before it's used.
2022-12-02render/drm_format_set: fill dst in wlr_drm_format_set_copySimon Zeni