Age | Commit message (Collapse) | Author |
|
Saves us from walking a list.
|
|
This allows wlr_buffer users to extend it with tjeir own state.
|
|
This function was weird because it copied some fields but not all.
|
|
This wlr_surface_state field was a special case because we don't
want to save the whole current state: for instance, the wlr_buffer
must not be saved or else wouldn't get released soon enough.
Let's just inline the state fields we need instead.
|
|
This allows to have multiple addons of different types with the same
owner.
|
|
|
|
|
|
|
|
This allows callers to use wlr_output_test to check whether a mode
can be enabled, for instance.
Closes: https://github.com/swaywm/wlroots/issues/2250
|
|
Some listeners weren't removed and caused a use-after-free with
e.g. vkms when used as a secondary GPU.
|
|
Add a very basic smoke test which uses VKMS to fire up the DRM
backend.
|
|
wl_fixed_t is a 32-bit data type, but our doubles are 64-bit. This meant
that two doubles that would map to the same wl_fixed_t could compare
unequal, and send a duplicate motion event.
Refs swaywm/sway#4632.
|
|
The protocol allows compositors to not send any keymap to Wayland
clients. Handle a keymap-less keyboard correctly by sending
WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP instead of erroring out in the
mmap call.
|
|
|
|
|
|
When testing a modeset, make sure the caller has also provided a
buffer. This allows df0e75ba05e2 ("output: try skipping buffer
allocation if the backend allows it") to work as expected with the
DRM backend.
Closes: https://github.com/swaywm/wlroots/issues/3086
|
|
When enabling an output, skip the empty buffer allocation if the
backend accepts modesets without a buffer.
This fixes mode-setting with the noop backend.
|
|
Add a bunch of new formats for Pixman: a few missing 32-bit ones,
some 16-bit and 32-bit formats as well.
Mostly based on a Weston patch [1].
[1]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/664
|
|
These will be added to Pixman in the next commit.
|
|
The kernel orders the mode list from highest to lowest. Preserve
this ordering in the wlr_output.modes list.
|
|
|
|
According to the viewport protocol, upon wp_viewport::destroy():
> The associated wl_surface's crop and scale state is removed.
> The change is applied on the next wl_surface.commit.
Therefore, wp_viewport_destroy(viewport) should remove all viewport state.
Currently, wlroots does not remove the crop and scale state. Instead, a
client must do:
wl_fixed_t clear = wl_fixed_from_int(-1);
wp_viewport_set_source(viewport, clear, clear, clear, clear);
wp_viewport_set_destination(viewport, -1, -1);
wp_viewport_destroy(viewport);
This commit adds the necessary logic into viewport_destroy and makes
wlroots comply with the protocol.
|
|
The half-float formats depend on GL_OES_texture_half_float_linear,
not just the GL_OES_texture_half_float extension, because the latter
does not include support for linear magni/minification filters.
The new 2101010 and 16161616F formats are only available on little-
endian builds, since their gl_types are larger than a byte and thus
endianness dependent.
|
|
This change introduces a new function to check whether the renderer
has the needed GL extensions to read a given pixel format.
|
|
|
|
On little-endian, we can enable pixel formats which don't use
gl_type = GL_UNSIGNED_BYTE. See [1].
[1]: https://afrantzis.com/pixel-format-guide/
|
|
|
|
This is now unconditionally set to WLR_OUTPUT_STATE_BUFFER_SCANOUT.
|
|
This enum will get dropped in the next commit.
|
|
No backend uses these anymore.
|
|
We no longer require wlr_output_impl.{attach,rollback}_render to
be populated.
|
|
These are bools but should be pointers.
|
|
Unless we're dealing with a multi-GPU setup and the backend being
initialized is secondary, we don't need a renderer nor an allocator.
Stop initializing these.
|
|
We can now just rely on the common code for this.
|
|
|
|
We only accept SCANOUT, the buffer type should never be set to RENDER.
|
|
We can't nuke it completely, we still need it for multi-GPU.
|
|
Historically we haven't allowed direct scan-out for legacy KMS,
because legacy misses the functionality to make sure a buffer can
be scanned out. However with renderer v6 the backend can't figure
out anymore whether the buffer comes from its internal swap-chain,
because the backend doesn't have an internal swap-chain.
The legacy KMS API guarantees that the driver won't reject a buffer
as long as it's been allocated with the same parameters as the
previous one. Let's check this in legacy_crtc_test.
|
|
Sometimes we allocate a buffer with modifiers but then fail to
perform a modeset with it. This can happen on Intel because of
bandwidth limitations. To mitigate this issue, it's possible to
re-allocate the buffer with modifiers.
Add the logic to do so in wlr_output.
|
|
Some backends need a buffer in order to be able to perform a
modeset.
|
|
This allows the swapchain to be created with the correct resolution
during a mode change.
|
|
|
|
This will be necessary for the primary buffer.
|
|
This fixes static linking with libseat.
Closes #3072
|
|
Uses the EXT_device_query extension to get the EGL device matching the
requested DRM file descriptor. If the extension is not supported or no device
is found, the EGL device will be retrieved using GBM.
Depends on the EGL_EXT_device_enumeration to get the list of EGL devices.
|
|
|
|
As more options are added, more fields will be duplicated. Let's
just embed the struct in wlr_xwayland_server so that we don't need
to keep both in sync.
|
|
Remove fill_arg and replace it with stack-allocations and simple
array-filling.
|
|
This EGL extension has been added in [1]. The upsides are:
- We directly get a render node, instead of having to convert the
primary node name to a render node name.
- If EGL_DRM_RENDER_NODE_FILE_EXT returns NULL, that means there is
no render node being used by the driver.
[1]: https://github.com/KhronosGroup/EGL-Registry/pull/127
|
|
Without setting this the EGL implementation is allowed to perform
destructive actions on the buffer when imported: its contents
become undefined.
This is mostly a pedantic change, because Mesa processes the attrib
and does absolutely nothing with it.
|