1. 11 Mar, 2022 1 commit
  2. 17 Feb, 2022 1 commit
  3. 11 Jan, 2022 1 commit
    • Guido Gunther's avatar
      xdg-activation: Allow to submit tokens · c9cd3502
      Guido Gunther authored
      Allows the compositor to submit tokens to the pool of
      currently active tokens. This can be useful when the
      launcher doesn't use or support xdg-activation-v1 by
      itself - e.g. when it is X11 based or use gtk_shell1.
      c9cd3502
  4. 12 Sep, 2021 4 commits
  5. 08 Jul, 2021 2 commits
    • emersion's avatar
      build: bump version to 0.14.1 · 49a57442
      emersion authored
      49a57442
    • emersion's avatar
      backend/drm: force linear layout for multi-GPU buffers · 5ea02f90
      emersion authored
      Some buffers need to be copied across GPUs. Such buffers need to be
      allocated with a format and modifier suitable for both the source
      and the destination.
      
      When explicit modifiers aren't supported, we were forcing the buffers
      to be allocated with a linear layout, because implicit modifiers
      aren't portable across GPUs. All is well with this case.
      
      When explicit modifiers are supported, we were advertising the whole
      list of destination modifiers, in the hope that the source might
      have some in common and might be able to allocate a buffer with a
      more optimized layout. This works well if the source supports explicit
      modifiers. However, if the source doesn't, then wlr_drm_format_intersect
      will fallback to implicit modifiers, and everything goes boom: the
      source uses a GPU-specific tiling and the destination interprets it
      as linear.
      
      To avoid this, just force linear unconditionally. We'll be able to
      revert this once we have a good way to indicate that an im...
      5ea02f90
  6. 07 Jul, 2021 8 commits
    • emersion's avatar
      tablet-v2: fix pad and tool object versions · 3415e371
      emersion authored
      These were hardcoded to 1. Instead, create the resource with the
      version of the parent object.
      
      (cherry picked from commit ea585dba)
      3415e371
    • emersion's avatar
      output-damage: fix output swapchain handling · 6d742464
      emersion authored
      When wlr_output.swapchain is used instead of the backend's, the
      buffer_type will be set to SCANOUT even if wlr_output_attach_render
      has been called. This tricks wlr_output_damage into thinking the
      whole output needs to be repainted.
      
      Workaround this issue by forcing buffer_type to RENDER when the
      output has a back-buffer set.
      
      Will clean all of that up when removing the precommit event handler
      altogether.
      
      This commit fixes damage tracking on the Wayland, X11 and headless
      backends.
      
      (cherry picked from commit a48e569d)
      6d742464
    • emersion's avatar
      output: detach buffer from renderer before commit · 2a6dc005
      emersion authored
      Right now we rely entirely on implicit sync for synchronizing
      access to GPU buffers. Implicit sync works by setting
      synchronization points on the buffer in writers, and letting
      readers wait on these sync points before accessing the buffer.
      
      With OpenGL, sync points are created using functions such as
      eglSwapBuffers or glFlush. If none of these special functions
      are called, no sync point will be created and readers will
      potentially access a buffer that hasn't finished rendering yet.
      
      In the context of wlroots, OpenGL is the writer and the backend
      (KMS or parent Wayland/X11 session) is the reader. After we're
      done rendering a frame, and before passing that frame to the
      backend, we need to call glFlush.
      
      glFlush is called when the buffer is detached from the renderer.
      This is a task done by output_clear_back_buffer. So let's call
      this function before invoking the impl->commit hook, instead of
      calling it after.
      
      All of this is maybe a little tricky to get right with the
      current renderer_bind_buffer API. The new
      wlr_renderer_begin_with_buffer API is much better, because glFlush
      is called on wlr_renderer_end, so it's more intuitive.
      
      Closes: https://github.com/swaywm/wlroots/issues/3020
      (cherry picked from commit c2bd63c1)
      2a6dc005
    • emersion's avatar
      backend/drm: don't clear pending cursor FB on failed commit · 1100f3a4
      emersion authored
      The previous fix tried to side-step cursor->pending_fb completely.
      However that messes up our buffer locking mechanism.
      
      Instead, stop clearing the pending cursor FB on a failed commit. The
      pending cursor FB will remain for the next commit.
      
      Fixes: 6c3d080e ("backend/drm: populate cursor plane's current_fb")
      (cherry picked from commit 4dee7a2f)
      1100f3a4
    • emersion's avatar
      Revert "backend/drm: populate cursor plane's current_fb" · b213d2b8
      emersion authored
      This reverts commit 6c3d080e.
      
      Populating wlr_drm_plane.current_fb messes up the buffer's locking.
      The previous buffer is released while it's still being displayed
      on-screen.
      
      (cherry picked from commit 5f26360b)
      b213d2b8
    • emersion's avatar
      surface: allow locking pending state in commit handler · 75f476c0
      emersion authored
      We were bumping the pending sequence number after emitting the
      commit event, so commit handlers were seeing inconsistent state
      where current.seq == pending.seq. This prevents commit handlers
      from immediately locking the pending state.
      
      Fix this by bumping the pending sequence number before firing the
      commit event.
      
      (cherry picked from commit c7018a45)
      75f476c0
    • emersion's avatar
      buffer: make enum wlr_buffer_cap public · dc2e640a
      emersion authored
      Custom backends and renderers need to implement
      wlr_backend_impl.get_buffer_caps and
      wlr_renderer_impl.get_render_buffer_caps. They can't if enum
      wlr_buffer_cap isn't made public.
      
      (cherry picked from commit a38baec1)
      dc2e640a
    • emersion's avatar
      surface: accept commits with buffer size not divisible by scale · 4b2ef3df
      emersion authored
      There are still many situations where the buffer scale is not
      divisible by scale. The fix will require a tad more work, so
      let's just log the client error for now and continue handling
      the surface commit as usual.
      
      Closes: https://github.com/swaywm/sway/issues/6352
      (cherry picked from commit 1c4b5bca)
      4b2ef3df
  7. 22 Jun, 2021 1 commit
  8. 20 Jun, 2021 2 commits
    • emersion's avatar
      backend: add output state allow-lists · 2f615468
      emersion authored
      Right now, when a new output state field is added, all backends by
      default won't reject it. This means we need to add new checks to
      each and every backend when we introduce a new state field.
      
      Instead, introduce a bitmask of supported output state fields in
      each backend, and error out if the user has submitted an unknown
      field.
      
      Some fields don't need any backend involvment to work. These are
      listed in WLR_OUTPUT_STATE_BACKEND_OPTIONAL as a convenience.
      2f615468
    • Kenny Levinsen's avatar
      Revert "meson: Make private static library symbols local" · 15c8453b
      Kenny Levinsen authored and emersion's avatar emersion committed
      This reverts commit 28d23ba6bda4f799b8d6689555cd33a40adda17e.
      
      The prelinking and symbol filtering pass breaks builds with link-time
      optimization enabled.
      15c8453b
  9. 19 Jun, 2021 3 commits
  10. 17 Jun, 2021 4 commits
  11. 16 Jun, 2021 3 commits
  12. 13 Jun, 2021 9 commits
  13. 09 Jun, 2021 1 commit
    • emersion's avatar
      render: add missing arg to wlr_renderer_impl.get_buffer_caps · 28061549
      emersion authored
      The types of buffers supported by the renderer might depend on the
      renderer's instance. For instance, a renderer might only support
      DMA-BUFs if the necessary EGL extensions are available.
      
      Pass the wlr_renderer to get_buffer_caps so that the renderer can
      perform such checks.
      
      Fixes: 982498fa ("render: introduce renderer_get_render_buffer_caps")
      28061549