Using dri2_create_image_khr_texture_error() here prints an error
like so:
command: eglCreateImageKHR, error: EGL_BAD_ALLOC (0x3003), message: "dri2_create_image_khr_texture"
This is confusing, because dri2_create_image_khr_texture() is
unrelated to this error.
Instead, print a more accurate error manually.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19156>
uint64_t modifier;
bool has_modifier = false;
unsigned error;
+ EGLint egl_error;
/**
* The spec says:
&error,
NULL);
}
- dri2_create_image_khr_texture_error(error);
+
+ egl_error = egl_error_from_dri_image_error(error);
+ if (egl_error != EGL_SUCCESS)
+ _eglError(egl_error, "createImageFromDmaBufs failed");
if (!dri_image)
return EGL_NO_IMAGE_KHR;