Age | Commit message (Collapse) | Author |
|
A wlroots user can easily get confused and think that `cap` refers to
wlroots buffer capabilities, not array capacity.
|
|
They are never used in practice, which makes all of our flag
handling effectively dead code. Also, APIs such as KMS don't
provide a good way to deal with the flags. Let's just fail the
DMA-BUF import when clients provide flags.
|
|
|
|
|
|
For `required` to disable search the value needs to be of `feature` type.
Checking `gles2` via `in` keyword returns a `bool` but `required: false`
makes the dependency optional instead of disabled.
|
|
calloc is moved to right before egl is called to avoid requiring to free()
unused memory.
Found via scan-build
|
|
Found via scan-build
|
|
There's no pkg-config file we can check for sadly, so check
vulkan/vulkan.h as a fallback.
Closes: https://github.com/swaywm/wlroots/issues/3272
|
|
Signed-off-by: Joshua Ashton <joshua@froggi.es>
|
|
This new renderer is implemented with the existing wlr_renderer API
(which is known to be sub-optimal for some operations). It's not
used by default, but users can opt-in by setting WLR_RENDERER=vulkan.
The renderer depends on VK_EXT_image_drm_format_modifier and
VK_EXT_physical_device_drm.
Co-authored-by: Simon Ser <contact@emersion.fr>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
|
|
This allows us to obtain a new DRM file description without relying
on filesystem permissions.
|
|
If we aren't trying to create a dumb buffer allocator, and if the
DRM device has a render node (ie, not a split render/display SoC),
then we can use the render node instead of the primary node. This
should allow wlroots to run under seatd when the current user
doesn't have the permission to open primary nodes (logind has a
quirk to allow physically logged in users to open primary nodes).
|
|
This reverts commit 833437d5921339f2862ccfb0493617630ea3937d.
|
|
This reverts commit ea7357b70366588069c83f158e6a4eb2d3a702b3.
|
|
This reverts commit 780052d4da0c93f9210dd87d2100b116af7ff308.
|
|
This reverts commit 6d281d96cb93b8de972039d5cb00bfce49d9a58c.
|
|
This was used to make the intersection of INVALID and LINEAR result
in LINEAR. We can now just require LINEAR to be in both lists.
|
|
|
|
See [1] for the motivation.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
|
|
|
|
|
|
This allows callers to specify the operations they'll perform on
the returned data pointer. The motivations for this are:
- The upcoming Linux MAP_NOSIGBUS flag may only be usable on
read-only mappings.
- gbm_bo_map with GBM_BO_TRANSFER_READ hurts performance.
|
|
Makes it easier to find out which branch is taken when debugging
issues like [1].
[1]: https://github.com/swaywm/wlroots/issues/3156
|
|
Closes: https://github.com/swaywm/wlroots/issues/3156
|
|
Using the same DRM file description for the DRM backend and for the
GBM allocator will result in GEM handle ref'counting issues [1].
Re-open the DRM FD to fix these issues.
[1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
|
|
This will be necessary for the next patch, to avoid messing up BO
handles shared between the GL implementation and the DRM backend.
|
|
Add render/allocator/ and include/render/allocator/ to hold
everything allocator-related.
|
|
|
|
Saves us from walking a list.
|
|
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 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/
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
Now that we have our own wl_drm implementation, there's no reason
to provide custom renderer hooks to init a wl_display in the
interface. We can just initialize the wl_display generically,
depending on the renderer capabilities.
|
|
We don't always need to enable blending: when the texture doesn't
have alpha or when the color is opaque, we can disable it.
|
|
Use our internal pixel format table to figure out whether an
imported DMA-BUF has alpha.
|
|
Khronos refers to extensions with their namespace as a prefix in
uppercase. Change our naming to align with Khronos conventions.
This also makes grepping easier.
|
|
Khronos refers to extensions with their namespace as a prefix in
uppercase. Change our naming to align with Khronos conventions.
This also makes grepping easier.
|
|
A texture is opaque when it does *not* have alpha.
Fixes https://github.com/swaywm/wlroots/issues/2907
|
|
|
|
Our GLES2 renderer doesn't use it anymore, so we can drop it.
|
|
Everything needs to go through the unified wlr_buffer interface
now.
If necessary, there are two ways support for
EGL_WL_bind_wayland_display could be restored by compositors:
- Either by using GBM to convert back EGL Wayland buffers to
DMA-BUFs, then wrap the DMA-BUF into a wlr_buffer.
- Or by wrapping the EGL Wayland buffer into a special wlr_buffer
that doesn't implement any wlr_buffer_impl hook, and special-case
that buffer type in the renderer.
|