mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
egl: add WLR_EGL_NO_MODIFIERS
Same as WLR_DRM_NO_MODIFIERS but for EGL. For debugging purposes mostly. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3451
This commit is contained in:
parent
ccf4e04036
commit
6d90518c97
2 changed files with 15 additions and 4 deletions
17
render/egl.c
17
render/egl.c
|
|
@ -107,6 +107,11 @@ static void log_modifier(uint64_t modifier, bool external_only) {
|
|||
}
|
||||
|
||||
static void init_dmabuf_formats(struct wlr_egl *egl) {
|
||||
bool no_modifiers = env_parse_bool("WLR_EGL_NO_MODIFIERS");
|
||||
if (no_modifiers) {
|
||||
wlr_log(WLR_INFO, "WLR_EGL_NO_MODIFIERS set, disabling modifiers for EGL");
|
||||
}
|
||||
|
||||
int *formats;
|
||||
int formats_len = get_egl_dmabuf_formats(egl, &formats);
|
||||
if (formats_len < 0) {
|
||||
|
|
@ -121,8 +126,10 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
|||
|
||||
uint64_t *modifiers;
|
||||
EGLBoolean *external_only;
|
||||
int modifiers_len =
|
||||
get_egl_dmabuf_modifiers(egl, fmt, &modifiers, &external_only);
|
||||
int modifiers_len = 0;
|
||||
if (!no_modifiers) {
|
||||
modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers, &external_only);
|
||||
}
|
||||
if (modifiers_len < 0) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -174,8 +181,10 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
|||
free(formats);
|
||||
|
||||
egl->has_modifiers = has_modifiers;
|
||||
wlr_log(WLR_DEBUG, "EGL DMA-BUF format modifiers %s",
|
||||
has_modifiers ? "supported" : "unsupported");
|
||||
if (!no_modifiers) {
|
||||
wlr_log(WLR_DEBUG, "EGL DMA-BUF format modifiers %s",
|
||||
has_modifiers ? "supported" : "unsupported");
|
||||
}
|
||||
}
|
||||
|
||||
static struct wlr_egl *egl_create(void) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue