diff options
author | Marek Olšák <[email protected]> | 2019-10-17 18:59:23 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-10-25 19:59:04 -0400 |
commit | 34b1aa957a3f44ea9587ec43311e8434d3782cc1 (patch) | |
tree | 571b89f4e912bd4e05b83d51b619a12bd3b0cdf7 /src/egl/main | |
parent | 1d122c104a7a3d9348ab347e1e843b7e2bf3b498 (diff) |
egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXT
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-By: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglimage.c | 23 | ||||
-rw-r--r-- | src/egl/main/eglimage.h | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c index 9df6b6511d5..ef4a68f2367 100644 --- a/src/egl/main/eglimage.c +++ b/src/egl/main/eglimage.c @@ -265,6 +265,25 @@ _eglParseEXTImageDmaBufImportModifiersAttribs(_EGLImageAttribs *attrs, return EGL_SUCCESS; } +static EGLint +_eglParseEXTImageFlushExternalAttribs(_EGLImageAttribs *attrs, + _EGLDisplay *disp, + EGLint attr, EGLint val) +{ + if (!disp->Extensions.EXT_image_flush_external) + return EGL_BAD_PARAMETER; + + switch (attr) { + case EGL_IMAGE_EXTERNAL_FLUSH_EXT: + attrs->ImageFlushExternal = val; + break; + default: + return EGL_BAD_PARAMETER; + } + + return EGL_SUCCESS; +} + /** * Parse the list of image attributes. * @@ -286,6 +305,10 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *disp, EGLint attr = attrib_list[i++]; EGLint val = attrib_list[i]; + err = _eglParseEXTImageFlushExternalAttribs(attrs, disp, attr, val); + if (err == EGL_SUCCESS) + continue; + err = _eglParseKHRImageAttribs(attrs, disp, attr, val); if (err == EGL_SUCCESS) continue; diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h index 6d2e7ba8a2d..84ad0f01b0c 100644 --- a/src/egl/main/eglimage.h +++ b/src/egl/main/eglimage.h @@ -50,6 +50,9 @@ struct _egl_image_attrib_int struct _egl_image_attribs { + /* EGL_EXT_image_flush_external */ + EGLBoolean ImageFlushExternal; + /* EGL_KHR_image_base */ EGLBoolean ImagePreserved; |