mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-13 13:29:44 -05: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;
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
assert(atti < sizeof(attribs)/sizeof(attribs[0]));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue