mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 14:45:58 +01:00
render/egl: always add LINEAR to supported modifiers
This commit is contained in:
parent
d6be1d68b7
commit
780052d4da
1 changed files with 9 additions and 0 deletions
|
@ -125,6 +125,15 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
||||||
wlr_drm_format_set_add(&egl->dmabuf_render_formats, fmt,
|
wlr_drm_format_set_add(&egl->dmabuf_render_formats, fmt,
|
||||||
DRM_FORMAT_MOD_INVALID);
|
DRM_FORMAT_MOD_INVALID);
|
||||||
|
|
||||||
|
if (modifiers_len == 0) {
|
||||||
|
// Asume the linear layout is supported if the driver doesn't
|
||||||
|
// explicitly say otherwise
|
||||||
|
wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt,
|
||||||
|
DRM_FORMAT_MOD_LINEAR);
|
||||||
|
wlr_drm_format_set_add(&egl->dmabuf_render_formats, fmt,
|
||||||
|
DRM_FORMAT_MOD_LINEAR);
|
||||||
|
}
|
||||||
|
|
||||||
for (int j = 0; j < modifiers_len; j++) {
|
for (int j = 0; j < modifiers_len; j++) {
|
||||||
wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt,
|
wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt,
|
||||||
modifiers[j]);
|
modifiers[j]);
|
||||||
|
|
Loading…
Reference in a new issue