[Piglit] [v9] Tests for EXT_image_dma_buf_import

Topi Pohjolainen topi.pohjolainen at intel.com
Fri Aug 9 03:42:54 PDT 2013


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 does not test for planar buffers but leaves those for
later.

Framework is augmented to provide platform independent interface for
creating and releasing the target buffers in order to keep the tests
themselves clearer and easier to understand.

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.

v7:
   - check for EBADF also and not just close()-failure
     (Eric,Chad,Daniel)
   - proper linking of EGL extension calls
   - use 'bool' instead of "zero for success, non-zero for failure"

v8:
   - introduce tests exercising intel specific restrictions. Intel
     driver allows imported dma-buffers to be read only and even then
     only through the image external sampling extension.

v9 (Chad):
   - introduce new image probe to gles and use in the sampling tests
   - add missing dependencies to 'EGL_KHR_image_base'
   - allow tests to be skipped if formats are not supported
   - merge sampling tests into one binary

Chad Versace (1):
  framework: automatic drm authentication for dma buffer support

Topi Pohjolainen (12):
  glapi: fix parsing of extensions containing string "EGL_"
  framework: gl-profile style image probe for gles
  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 sample argb
  tests/spec: EXT_image_dma_buf_import intel unsupported format
  tests/spec: EXT_image_dma_buf_import intel dma-buf with img-ext only
  tests/spec: EXT_image_dma_buf_import intel img-ext with dma-buf only

 CMakeLists.txt                                     |   2 +
 glapi/parse_glspec.py                              |   3 +-
 tests/all.tests                                    |  11 +
 tests/spec/CMakeLists.txt                          |   1 +
 .../ext_image_dma_buf_import/CMakeLists.gles1.txt  |  29 +++
 .../ext_image_dma_buf_import/CMakeLists.gles2.txt  |  24 ++
 tests/spec/ext_image_dma_buf_import/CMakeLists.txt |   1 +
 tests/spec/ext_image_dma_buf_import/image_common.c |  78 ++++++
 tests/spec/ext_image_dma_buf_import/image_common.h |  44 ++++
 .../intel_external_sampler_only.c                  | 152 +++++++++++
 .../intel_external_sampler_with_dma_only.c         | 103 ++++++++
 .../intel_unsupported_format.c                     | 114 +++++++++
 .../ext_image_dma_buf_import/invalid_attributes.c  | 261 +++++++++++++++++++
 .../spec/ext_image_dma_buf_import/invalid_hints.c  | 141 +++++++++++
 .../ext_image_dma_buf_import/missing_attributes.c  | 162 ++++++++++++
 .../ext_image_dma_buf_import/ownership_transfer.c  | 127 ++++++++++
 .../spec/ext_image_dma_buf_import/sample_common.c  | 164 ++++++++++++
 .../spec/ext_image_dma_buf_import/sample_common.h  |  37 +++
 tests/spec/ext_image_dma_buf_import/sample_rgb.c   | 112 +++++++++
 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  | 278 +++++++++++++++++++++
 .../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 +
 tests/util/piglit-util-gl-common.h                 |   2 +
 tests/util/piglit-util-gles.c                      |  63 +++++
 28 files changed, 2055 insertions(+), 1 deletion(-)
 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/image_common.c
 create mode 100644 tests/spec/ext_image_dma_buf_import/image_common.h
 create mode 100644 tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
 create mode 100644 tests/spec/ext_image_dma_buf_import/intel_external_sampler_with_dma_only.c
 create mode 100644 tests/spec/ext_image_dma_buf_import/intel_unsupported_format.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_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_rgb.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



More information about the Piglit mailing list