mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
egl: Set EGL_IMAGE_PRESERVED_KHR on DMABUF import
Otherwise drivers would be free to alter the buffer content. While no driver is known to do so, it's probably good to make things explicit. See also `import_simple_dmabuf()` in Weston. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2990>
This commit is contained in:
parent
29ec2d2e20
commit
2dd5196267
@ -609,7 +609,7 @@ meta_egl_create_dmabuf_image (MetaEgl *egl,
|
||||
const uint64_t *modifiers,
|
||||
GError **error)
|
||||
{
|
||||
EGLint attribs[37];
|
||||
EGLint attribs[39];
|
||||
int atti = 0;
|
||||
|
||||
/* This requires the Mesa commit in
|
||||
@ -626,6 +626,8 @@ meta_egl_create_dmabuf_image (MetaEgl *egl,
|
||||
attribs[atti++] = height;
|
||||
attribs[atti++] = EGL_LINUX_DRM_FOURCC_EXT;
|
||||
attribs[atti++] = drm_format;
|
||||
attribs[atti++] = EGL_IMAGE_PRESERVED_KHR;
|
||||
attribs[atti++] = EGL_TRUE;
|
||||
|
||||
if (n_planes > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user