Age | Commit message (Collapse) | Author |
|
Our wlr_format_set structs don't hold GBM usage flags. Instead, users
who want to get a LINEAR buffer can use the DRM_FORMAT_MOD_LINEAR
modifier even if the kernel driver doesn't support modifiers.
Add a special case to wlr_drm_format_intersect to properly handle this
situation.
|
|
Just use wlr_texture.{width,height} directly.
|
|
|
|
|
|
We implicitly depended on this extension.
|
|
I have noticed this with LeakSanitizer, I hope these are all occurrences.
|
|
If we're using a render buffer, query the alpha size from it.
Closes: https://github.com/swaywm/wlroots/issues/2527
|
|
If we don't have an EGL config, don't try to query anything from it.
|
|
|
|
In wlr_drm_format_dup, allocate the new wlr_drm_format using cap instead
of len. This makes it so the cap field is up-to-date and the chunk of
memory isn't too small if we append new modifiers (we don't allow this
yet but might in the future).
|
|
When using wlr_swapchain, there's no need to select an EGLConfig. Add
support for creating config-less EGL contexts.
|
|
Intersects modifiers from two wlr_drm_format structs. If either format
doesn't support modifiers, the resulting format won't support modifiers.
|
|
Replace it with wlr_egl.dmabuf_render_formats.
|
|
The Wayland protocol requires those to be supported.
|
|
Rename wlr_renderer_get_formats to wlr_renderer_get_shm_texture_formats.
This makes it clear those formats are only suitable for shm import.
|
|
Rename wlr_renderer_get_dmabuf_formats to
wlr_renderer_get_dmabuf_texture_formats. This makes it clear the formats
are only suitable for creating wlr_textures.
|
|
It describes which DMA-BUF formats can be used to render.
|
|
Instead, callers can just use wlr_renderer_get_formats and iterate over
the list.
This function was unused in wlroots.
|
|
On some setups (e.g. remote access via SSH) the current user won't have
the permission to open the primary node at all. It's still possible to
use drmGetDevices to match the primary node name returned by EGL.
Closes: https://github.com/swaywm/wlroots/issues/2488
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The swapchain maximum capacity is set to 4, so that we have enough room
for:
- A buffer currently displayed on screen
- A buffer queued for display (e.g. to KMS)
- A pending buffer that'll be queued next commit
- An additional pending buffer in case we want to invalidate the
currently pending one
|
|
|
|
|
|
|
|
This matches the signature of wlr_renderer_impl.begin
|
|
Don't force compositors to check when an empty shape is being renderered.
References #2282. This was motivated by dwl crashing when setting window
borders to 0 (djpohly/dwl#51).
|
|
Move the global into wlr_gles2_renderer. This removes global state and
allows us to have multiple renderers with different GL loaders.
|
|
|
|
|
|
These functions are unused by compositors (see e.g. [1]) and prevent
wlr_gles2_texture from accessing wlr_gles2_renderer state. This is an
issue for proper teardown [2] and for accessing GLES2 extensions.
[1]: https://github.com/swaywm/wlroots/pull/1962#issuecomment-569511830
[2]: https://github.com/swaywm/wlroots/pull/1962
|
|
eglGetCurrentDisplay() returns EGL_NO_DISPLAY when there is no context current
and eglMakeCurrent() needs a display argument.
Fixes #2327
|
|
|
|
|
|
Allows for easier debugging.
|
|
This renders only a subset of the texture, instead of the full texture.
|
|
texcoord is a vector of coordinates, with the first member being the X
axis value and the second member being the Y axis value. It makes more
sense to use the accessors with the same names.
|
|
Width and height should always be > 0 for render functions which take a
wlr_box.
References https://github.com/swaywm/wlroots/issues/2281
|
|
Prior to this commit, wlr_egl_init seemed to assume the extension string
queried via EGL_NO_DISPLAY was a subset of the extension string queried
via an initialized display. This isn't correct.
EGL_EXT_client_extensions [1] defines two types of extensions: client
extensions and display extensions. The set of supported client and
display extensions are disjoint (ie. an extension is either a client or
a display extension, not both). Client extensions are queried via
EGL_NO_DISPLAY, display extensions are queried via an initialized
display.
Rename the variables to make this clear. Remove the misleading comment.
Log both client and display extensions.
[1]: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_client_extensions.txt
|
|
|
|
|
|
|
|
EGL_EXT_image_dma_buf_import_modifiers tells us whether we should use
GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES. Using the right texture target
can fix some failures and/or improve performance on some drivers.
This does the same as a Weston commit [1].
[1]: https://gitlab.freedesktop.org/wayland/weston/commit/40c519a3e613
Closes: https://github.com/swaywm/wlroots/issues/2173
|
|
This leaves an EGL context current behind. wlr_gles2_renderer_create was
assuming the EGL context was already current because of this (because it
called a GL function right off the bat).
|
|
After swapping buffers, it doesn't make sense to perform more rendering
operations. Unset the context to reflect this.
This commit makes it so the context is always only current between
wlr_egl_make_current and wlr_egl_swap_buffers.
This is an alternative to [1].
[1]: https://github.com/swaywm/wlroots/pull/2212
|