aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2022-12-02render/vulkan: make shm/dmabuf split clearer in wlr_vk_format_propsSimon Ser
struct wlr_vk_format_props contains a mix of properties for shm and dmabuf, and it's not immediately clear which fields are for which kind of buffer. Use a nested struct to group the fields.
2022-12-02render/vulkan: make vulkan_format_props_find_modifier() return value constSimon Ser
2022-12-02render/vulkan: check for barrier array alloc failureSimon Ser
2022-12-02render/vulkan: improve message on format prop errorSimon Ser
Use a more appropriate message on vkGetPhysicalDeviceImageFormatProperties2() error.
2022-12-02render/vulkan: simplify vulkan_format_props_query()Simon Ser
2022-12-02render/vulkan: extract DMA-BUF format query to separate functionSimon Ser
2022-12-02wl-drm: only advertise formats supporting implicit modifiersSimon Ser
With the Vulkan renderer we don't support implicit modifiers. However wl_drm only supports implicit modifiers. Stop advertising wl_drm formats when implicit modifiers are unsupported.
2022-12-02wl-drm: don't store wlr_rendererSimon Ser
Query the formats at init time, then forget about the renderer. This will allow wl_drm to be created with a list of formats instead of a renderer, and will behave better after a GPU reset.
2022-12-02render/drm-format-set: add wlr_drm_format_set_copy()Simon Ser
2022-12-02render/vulkan: add 64-bit UNORM and SFLOAT formatsSimon Ser