Commit graph

8 commits

Author SHA1 Message Date
Vlad Zahorodnii
b9ba12d02e wayland: Reimplement wl-drm
As of nowadays, most clients have switched to the linux-dmabuf protocol,
except Xwayland, which still needs the wl-drm protocol.

On the other hand, we would like to unify some buffer handling code.
There are a few options:

- drop the support for wl-drm protocol. Not doable, because Xwayland
  still needs it, even though it uses the linux dmabuf feedback protocol
  too
- re-implement the wl-drm protocol
- re-implement the minimal part of the wl-drm protocol needed by
  Xwayland

This change goes after the third option. Only the node name and the
capabilities will be sent. The buffer factory requests are not
implemented, but they can be if we discover that some clients need them.
2023-04-14 14:13:56 +00:00
Xaver Hugl
48fb07b367 platformsupport/scenes: move egldisplay code into a helper class 2023-04-12 14:57:49 +02:00
Vlad Zahorodnii
128570ed53 Restore correct type check for wl_drm client buffers
With the EGLStreams support gone, we can restore the correct type check
for wl_drm client buffers. The spec suggests to query the
EGL_TEXTURE_FORMAT attribute to determine whether the specified wl_buffer
is a wl_drm buffer.
2021-11-10 13:54:56 +02:00
Alex Richardson
105042ccda Correct the eglQueryWaylandBufferWL_func prototype
I am trying to build against a Qt built without OpenGL. In that case, the
openGL headers have not been included and therefore GLboolean is not
defined. Use EGLBoolean to match the EGL prototype.

See also d18486c033
2021-10-05 11:16:26 +01:00
Severin von Wnuck
bd9b42912b Fix texture format handling for Nvidia driver 2021-09-17 13:28:13 +02:00
Alexander Lohnau
525d12bee5 Run clang-format
If you want git blame to ignore formatting revisions run:
git config blame.ignoreRevsFile .git-blame-ignore-revs
2021-08-29 07:11:06 +02:00
David Redondo
8cffad3fe8 Query height instead of texture format
Texture queries do not seem to work on nvidia and QtQuick windows
will then no be rendered.
2021-07-27 17:30:16 +02:00
Vlad Zahorodnii
0d2879c62d Split BufferInterface
Currently, the BufferInterface encapsulates all the kinds of client
buffers. This has become a somewhat annoying issue as we want to
reference the shm pool if a shm buffer is destroyed, or have custom
buffer readiness logic for linux dma-buf client buffers.

Implementing all of that with the current abstractions will be
challenging as there's no good separation between different client
buffer types.

This change splits the BufferInterface class in three sub-classes -
DrmClientBuffer, LinuxDmaBufV1ClientBuffer, and ShmClientBuffer.

In addition to that, this change fixes the broken buffer ref'ing api.
2021-07-22 11:41:06 +03:00