diff options
author | Simon Ser <contact@emersion.fr> | 2021-07-23 17:22:04 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-07-23 11:27:17 -0400 |
commit | ace2eda073f838e1327abd7ffb8e5111e52f4b86 (patch) | |
tree | db2c62b5f4ac373c4cc426d8cdc403607b25d8f8 /render | |
parent | 04d4fb536d2112caf38ad9903a7ce8616a21ba33 (diff) |
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.
Diffstat (limited to 'render')
-rw-r--r-- | render/egl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/render/egl.c b/render/egl.c index 9a3ce29c..9fa2add5 100644 --- a/render/egl.c +++ b/render/egl.c @@ -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])); |