mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-29 16:05:59 +01:00
render/egl: set EGL_IMAGE_PRESERVED_KHR
Without setting this the EGL implementation is allowed to perform destructive actions on the buffer when imported: its contents become undefined. This is mostly a pedantic change, because Mesa processes the attrib and does absolutely nothing with it.
This commit is contained in:
parent
04d4fb536d
commit
ace2eda073
1 changed files with 5 additions and 0 deletions
|
@ -525,6 +525,11 @@ EGLImageKHR wlr_egl_create_image_from_dmabuf(struct wlr_egl *egl,
|
||||||
attribs[atti++] = attributes->modifier >> 32;
|
attribs[atti++] = attributes->modifier >> 32;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Our clients don't expect our usage to trash the buffer contents
|
||||||
|
attribs[atti++] = EGL_IMAGE_PRESERVED_KHR;
|
||||||
|
attribs[atti++] = EGL_TRUE;
|
||||||
|
|
||||||
attribs[atti++] = EGL_NONE;
|
attribs[atti++] = EGL_NONE;
|
||||||
assert(atti < sizeof(attribs)/sizeof(attribs[0]));
|
assert(atti < sizeof(attribs)/sizeof(attribs[0]));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue