[Piglit] [v8 07/13] tests/spec: EXT_image_dma_buf_import missing attributes

Chad Versace chad.versace at linux.intel.com
Wed Jul 31 15:00:28 PDT 2013


> +/**
> + * @file missing_attributes.c
> + *
> + * Tests that EGL detects missing attributes correctly.
> + *
> + * From the EXT_image_dma_buf_import spec:
> + *
> + * "If <target> is EGL_LINUX_DMA_BUF_EXT, and the list of attributes is
> + *  incomplete, EGL_BAD_PARAMETER is generated."
> + */


> +	fill_one_missing(all, missing, EGL_DMA_BUF_PLANE0_FD_EXT);
> +	pass = test_missing(fd, missing) && pass;
> +
> +	fill_one_missing(all, missing, EGL_DMA_BUF_PLANE0_OFFSET_EXT);
> +	pass = test_missing(fd, missing) && pass;
> +
> +	fill_one_missing(all, missing, EGL_DMA_BUF_PLANE0_PITCH_EXT);
> +	pass = test_missing(fd, missing) && pass;


To be complete, this test should also:
     a. Create a 2-plane dma_buf and attempt to create from it an EGLimage
        with missing PLANE1 attributes.
     b. Similar for a 3-plane dma_buf.

Despite being incomplete, the test code looks correct.
And the implementation in i965, for now, only allows creation of 1-plane
dma-buf-imported images; so the extra test coverage would be untestable
anyway.

If and when we add support for multi-plane dma-buf-imported images to i965,
let's remember to add the extra test coverage here. Similar comments apply
to patch 6.

Reviewed-by: Chad Versace <chad.versace at linux.intel.com>


More information about the Piglit mailing list