Age | Commit message (Collapse) | Author |
|
Fixes #1094
|
|
The read format is dependent on the output, so we first need to make it
current. This fixes a race condition in wlr-screencopy-v1 where a dmabuf
client would cause EGL_NO_SURFACE to be bound at the time when
screencopy needs to query for the preferred format, causing GL errors.
|
|
|
|
This should be set to EGL_OPENGL_ES2_BIT.
Also fixes EGL config attributes in the headless and X11 backends.
|
|
|
|
We were assuming GL_BGRA_EXT was always supported.
We now check that it's supported for rendering. We fail if it isn't because
this format is specified as "always supported" by the Wayland protocol.
We also check if it's supported for reading pixels. A new preferred_read_format
function returns the preferred format that can be used to read pixels. This is
used by the screencopy protocol.
|
|
|
|
Also rephrase the write_pixels comment.
|
|
It's not allowed to change the format of a texture so remove
the confusing parameter.
|
|
|
|
This removes any assumptions about how the libdrm headers are installed,
and uses the pkg-config include directories as we're "supposed to".
This only adds a partial dependency, since we don't actually need to
link against libdrm.
|
|
Fix headless backend
|
|
This PR broke a private nixpkgs definition I have for wlroots: https://github.com/swaywm/wlroots/pull/1304
It is fixed by changing `#include <drm_fourcc.h>` to `#include <libdrm/drm_fourcc.h>`, which follows what is already done in the dmabuf example.
|
|
It was only working if you ran it underneath an already-working Wayland
compositor. Running with the headless backend on the API would break.
|
|
If a client uses an older version of the dmabuf protocol, use the
`formats` event instead of `modifiers` (since that didn't exist in older
versions).
With a bit of necessary guessing, support dmabuf importing even when
EGL_EXT_image_dma_buf_import_modifiers isn't present instead of
failing up front.
|
|
|
|
This fixes building wlroots as a subproject.
|
|
This reverts commit 9c886f20b97b6ab1ac85b849f1fe7f16eb199ff0.
|
|
This breaks wlroots when used as a meson subproject.
This reverts commit dea311992eb4ff3e343c3cf5b0603034223d2a42, reversing
changes made to 6db9c4b74667c1d917d720f5e96985a2461569fb.
|
|
|
|
Texture functions, that create and manipulate textures should switch
the current context if necessary.
thanks to: @emersion
Fixes #934
|
|
This reverts commit a0afedcd8fbeb2013252e629d524aa83cdd9326e.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderer is checked for NULL, but was dereferenced before that.
Found through static analysis
|
|
|
|
Fix GLES2 renderer to use glGetUniformLocations locations
|
|
|
|
|
|
Detecting whether eglSwapBuffersWithDamageEXT or
eglSwapBuffersWithDamageKHR is used should be based on the extension
string, not only on the availability of the function.
|
|
|
|
|
|
|
|
|
|
This is needed as uniform locations are driver implementation-specific.
|
|
render: remove wlr_renderer_check_import_dmabuf
|
|
|
|
Signed-off-by: Genki Sky <sky@genki.is>
|
|
It's possible to implement it outside the renderer, by creating a
texture and destroying it right away. This reduces the API surface
of the renderer.
|
|
|
|
|
|
render: bind wl_drm in renderer
|
|
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.
Fixes #987
|
|
|
|
|
|
|