mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 12:50:35 +01:00
egl: fix error string for dri2_create_image_dma_buf()
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>
This commit is contained in:
parent
e2d67765fa
commit
4c080cb8e5
1 changed files with 5 additions and 1 deletions
|
|
@ -2946,6 +2946,7 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
|||
uint64_t modifier;
|
||||
bool has_modifier = false;
|
||||
unsigned error;
|
||||
EGLint egl_error;
|
||||
|
||||
/**
|
||||
* The spec says:
|
||||
|
|
@ -3033,7 +3034,10 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
|||
&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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue