EGL_EXT_image_dma_buf_import: fix error check with unknown drm format

Submitted by Lionel Landwerlin on Nov. 13, 2018, 2:09 p.m.

Details

Message ID 20181113140941.17138-1-lionel.g.landwerlin@intel.com
State New
Headers show
Series "EGL_EXT_image_dma_buf_import: fix error check with unknown drm format" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Lionel Landwerlin Nov. 13, 2018, 2:09 p.m.
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: 0ee445dbbc161f ("tests/spec: EXT_image_dma_buf_import invalid attributes")
---
 tests/spec/ext_image_dma_buf_import/invalid_attributes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/ext_image_dma_buf_import/invalid_attributes.c b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c
index cc0b0462a..e41447936 100644
--- a/tests/spec/ext_image_dma_buf_import/invalid_attributes.c
+++ b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c
@@ -165,7 +165,7 @@  test_invalid_format(unsigned w, unsigned h, int fd, unsigned stride,
 	img = eglCreateImageKHR(eglGetCurrentDisplay(), EGL_NO_CONTEXT,
 			EGL_LINUX_DMA_BUF_EXT, (EGLClientBuffer)0, attr);
 
-	if (!piglit_check_egl_error(EGL_BAD_ATTRIBUTE)) {
+	if (!piglit_check_egl_error(EGL_BAD_MATCH)) {
 		if (img)
 			eglDestroyImageKHR(eglGetCurrentDisplay(), img);
 		return false;

Comments

Lionel Landwerlin <lionel.g.landwerlin@intel.com> writes:

> 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: 0ee445dbbc161f ("tests/spec: EXT_image_dma_buf_import invalid attributes")

If you include that spec citation as a comment in the same style as say,
test_buffer_not_null()'s, it gets my r-b.