Here are some tests for the dma buffer importing. These are mostly things specifically listed down in the spec itself regarding attributes and their values. This version two adds three additional tests for sampling packed RGB, but testing of more complex planar (YUV) formats is left until one has the sampling support in place provided by the image external extension.
I augmented the framework to provide platform independent interface for creating and releasing the target buffers. I hope to re-use the logic for the external image testing later on. v2-v4: - clarifications on closing the buffers - added tests sampling RGB formatted buffers - check for EGL extensions, not for GL (added a utility for this) v5: - split tests into individual commits - introduced common header for drm fourcc formats v6: - various fixes according to review comments from Eric, Chad, Daniel and Ken - refactored dri2-authentication from Chad's revision of dma buffer support into its own patch. I had fixes for other review comments already in my version of the base patch. Chad: Please check if you agree into conditionally including the authentication support. I'm fine having it as you proposed originally. I just couldn't get it working on my Ubuntu laptop, and not being too familiar with the mechanism in general I thought better getting stuff for review as I have revisioned the series heavily. Eric,Chad,Daniel: In my system subsequent call of 'close()' against the same file descriptor returns -1 instead of EBADF. Hence I just check that the return value differs from zero. Chad Versace (1): framework: automatic drm authentication for dma buffer support Topi Pohjolainen (11): framework: hardware independent interface for dma buffers framework: support for creating dma buffers through libdrm tests: spec: EXT_image_dma_buf_import invalid hints tests: spec: EXT_image_dma_buf_import invalid attributes tests: spec: EXT_image_dma_buf_import missing attributes tests: spec: EXT_image_dma_buf_import fd ownership transfer tests: spec: EXT_image_dma_buf_import planar with multiple fds tests: spec: EXT_image_dma_buf_import planar with single fd tests: spec: EXT_image_dma_buf_import sample argb with miptree tests: spec: EXT_image_dma_buf_import sample xrgb with miptree tests: spec: EXT_image_dma_buf_import sample argb without miptree CMakeLists.txt | 2 + tests/spec/CMakeLists.txt | 1 + .../ext_image_dma_buf_import/CMakeLists.gles1.txt | 29 +++ .../ext_image_dma_buf_import/CMakeLists.gles2.txt | 25 ++ tests/spec/ext_image_dma_buf_import/CMakeLists.txt | 1 + .../spec/ext_image_dma_buf_import/create_yuv420.c | 154 ++++++++++++ .../create_yuv420_same_fd.c | 137 ++++++++++ .../ext_image_dma_buf_import/invalid_attributes.c | 264 ++++++++++++++++++++ .../spec/ext_image_dma_buf_import/invalid_hints.c | 142 +++++++++++ .../ext_image_dma_buf_import/missing_attributes.c | 162 ++++++++++++ .../ext_image_dma_buf_import/ownership_transfer.c | 119 +++++++++ .../ext_image_dma_buf_import/sample_argb8888.c | 66 +++++ .../sample_argb8888_level_zero_only.c | 67 +++++ .../spec/ext_image_dma_buf_import/sample_common.c | 192 ++++++++++++++ .../spec/ext_image_dma_buf_import/sample_common.h | 51 ++++ .../ext_image_dma_buf_import/sample_xrgb8888.c | 67 +++++ tests/util/CMakeLists.txt | 43 ++++ tests/util/piglit-framework-gl.c | 24 ++ tests/util/piglit-framework-gl.h | 25 ++ .../util/piglit-framework-gl/piglit_drm_dma_buf.c | 275 +++++++++++++++++++++ .../util/piglit-framework-gl/piglit_drm_dma_buf.h | 37 +++ .../util/piglit-framework-gl/piglit_gl_framework.c | 9 + .../util/piglit-framework-gl/piglit_gl_framework.h | 9 + 23 files changed, 1901 insertions(+) create mode 100644 tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt create mode 100644 tests/spec/ext_image_dma_buf_import/CMakeLists.gles2.txt create mode 100644 tests/spec/ext_image_dma_buf_import/CMakeLists.txt create mode 100644 tests/spec/ext_image_dma_buf_import/create_yuv420.c create mode 100644 tests/spec/ext_image_dma_buf_import/create_yuv420_same_fd.c create mode 100644 tests/spec/ext_image_dma_buf_import/invalid_attributes.c create mode 100644 tests/spec/ext_image_dma_buf_import/invalid_hints.c create mode 100644 tests/spec/ext_image_dma_buf_import/missing_attributes.c create mode 100644 tests/spec/ext_image_dma_buf_import/ownership_transfer.c create mode 100644 tests/spec/ext_image_dma_buf_import/sample_argb8888.c create mode 100644 tests/spec/ext_image_dma_buf_import/sample_argb8888_level_zero_only.c create mode 100644 tests/spec/ext_image_dma_buf_import/sample_common.c create mode 100644 tests/spec/ext_image_dma_buf_import/sample_common.h create mode 100644 tests/spec/ext_image_dma_buf_import/sample_xrgb8888.c create mode 100644 tests/util/piglit-framework-gl/piglit_drm_dma_buf.c create mode 100644 tests/util/piglit-framework-gl/piglit_drm_dma_buf.h -- 1.8.1.2 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit