diff options
author | Emil Velikov <[email protected]> | 2017-07-13 20:04:33 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-07-19 13:06:50 +0100 |
commit | 644ac2b780366582fe1fee9a677b1f6a508e65dc (patch) | |
tree | 06d3f8c1785833a8f2d37d46957321278da9d4e2 /src | |
parent | a0755f2e6a1b41b2c5e295fa5ff8eb8dfbf5eb41 (diff) |
egl: propagate EGL_BAD_ATTRIBUTE during EGLImage attr parsing
Earlier commit refactored/split the parsing into separate hunks.
While no functional change was intended, it did not attribute that
different error is set when the attrib. value is incorrect.
Fixes: 3ee2be4113d ("egl: split _eglParseImageAttribList into per
extension functions")
Cc: Michel Dänzer <[email protected]>
Reported-by: Michel Dänzer <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Michel Dänzer <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/main/eglimage.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c index a96075fe558..72a556e8dbd 100644 --- a/src/egl/main/eglimage.c +++ b/src/egl/main/eglimage.c @@ -302,6 +302,13 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy, if (err == EGL_SUCCESS) continue; + /* EXT_image_dma_buf_import states that if invalid value is provided for + * its attributes, we should return EGL_BAD_ATTRIBUTE. + * Bail out ASAP, since follow-up calls can return another EGL_BAD error. + */ + if (err == EGL_BAD_ATTRIBUTE) + return _eglError(err, __func__); + err = _eglParseEXTImageDmaBufImportModifiersAttribs(attrs, dpy, attr, val); if (err == EGL_SUCCESS) continue; |