summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c12
-rw-r--r--src/egl/main/eglimage.c2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 52fbdff..0c50dfb 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1771,14 +1771,18 @@ dri2_create_image_khr_texture(_EGLDisplay *disp, _EGLContext *ctx,
GLuint depth;
GLenum gl_target;
unsigned error;
+ EGLint err;
if (texture == 0) {
_eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr");
return EGL_NO_IMAGE_KHR;
}
- if (_eglParseImageAttribList(&attrs, disp, attr_list) != EGL_SUCCESS)
+ err = _eglParseImageAttribList(&attrs, disp, attr_list);
+ if (err != EGL_SUCCESS){
+ _eglError(err, "dri2_create_image_khr_texture");
return EGL_NO_IMAGE_KHR;
+ }
switch (target) {
case EGL_GL_TEXTURE_2D_KHR:
@@ -1869,8 +1873,10 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
name = (EGLint) (uintptr_t) buffer;
err = _eglParseImageAttribList(&attrs, disp, attr_list);
- if (err != EGL_SUCCESS)
+ if (err != EGL_SUCCESS){
+ _eglError(err, "dri2_create_image_mesa_drm_buffer");
return NULL;
+ }
if (attrs.Width <= 0 || attrs.Height <= 0 ||
attrs.DRMBufferStrideMESA <= 0) {
@@ -2098,7 +2104,7 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
err = _eglParseImageAttribList(&attrs, disp, attr_list);
if (err != EGL_SUCCESS) {
- _eglError(err, "bad attribute");
+ _eglError(err, "dri2_create_image_dma_buf");
return NULL;
}
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index 818b597..411d1ca 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
@@ -170,7 +170,7 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
break;
default:
- /* unknown attrs are ignored */
+ err = EGL_BAD_PARAMETER;
break;
}