mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
egl/dri: fix error value with unknown drm format
According to the EGL_EXT_image_dma_buf_import spec, creating an EGL
image with a DRM format not supported should yield the BAD_MATCH
error :
"
* If <target> is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT
attribute is set to a format not supported by the EGL, EGL_BAD_MATCH
is generated.
"
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 20de7f9f22 ("egl/dri2: support for creating images out of dma buffers")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
(cherry picked from commit 1c56d21156)
This commit is contained in:
parent
546c4b2db0
commit
842be2ed22
1 changed files with 1 additions and 1 deletions
|
|
@ -2280,7 +2280,7 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
|
|||
{
|
||||
unsigned plane_n = dri2_num_fourcc_format_planes(attrs->DMABufFourCC.Value);
|
||||
if (plane_n == 0) {
|
||||
_eglError(EGL_BAD_ATTRIBUTE, "invalid format");
|
||||
_eglError(EGL_BAD_MATCH, "unknown drm fourcc format");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue