[Piglit] [PATCH 0/4] Fix build on systems with Mesa < 9.2 or without libdrm

Chad Versace chad.versace at linux.intel.com
Tue Sep 10 11:07:50 PDT 2013


Ian recently discovered that Topi's new dma_buf tests break the build on Linux
systems with libdrm<2.4.28. And I discovered that they broke the build on
systems with Mesa < 9.2. No surprise, really, since these tests do some wacky
things and introduce new dependencies for which Piglit has no precedent. It's
never possible to test patches on every imaginable configuration.

This series *should* fix the build in these circumstances, but, again, I wasn't
able to test the patches in all desired system configurations.

In fixing the build, I added a new CMake option, PIGLIT_BUILD_DMA_BUF_TESTS.
During CMake configuration, this option is automatically enabled if your
systems has the requisites.

I tested the patches as follows in an Archlinux chroot:

  - System has libdrm=2.4.38, xcb-dri2-1.9.1, old eglext.h without
    EGL_EXT_image_dma_buf_import. Run cmake. Verify that Piglit builds
    successfully, and that the dma_buf tests do get built and all pass.

  - System has libdrm=2.4.37, xcb-dri2=1.9.1, and old eglext.h. Run cmake.
    Verify that Piglit builds successfully, and that no dma_buf tests get
    built.

  - System has libdrm=2.4.38, no xcb-dri2, and old eglext.h. Run cmake.  Verify
    that Piglit builds successfully, and that no dma_buf tests get built.

  - System is missing at least one dma_buf requirement. Run cmake. Then,
    manually enable the dma_buf tests by setting
    CMakeCache:PIGLIT_BUILD_DMA_BUF_TESTS=ON. Verify that the next invocation of
    `make` emits a fatal CMake error with message:
        PIGLIT_BUILD_DMA_BUF_TESTS require libdrm,
        libdrm_intel>=2.4.38, and xcb-dri2

The series lives on my branch 'fix-build-dma-buf'.

Chad Versace (4):
  cmake,dma_buf: Refactor decisions to build dma_buf tests
  cmake,dma_buf: Require xcb-dri2 for dma_buf tests
  cmake,dma_buf: Require libdrm_intel>=2.4.38 to build dma_buf tests
  ext_image_dma_buf_import: Fix build with mesa < 9.2

 CMakeLists.txt                                     | 34 ++++++++++++++++++++++
 .../ext_image_dma_buf_import/CMakeLists.gles1.txt  |  4 +--
 .../ext_image_dma_buf_import/CMakeLists.gles2.txt  |  5 ++--
 tests/spec/ext_image_dma_buf_import/image_common.h | 30 +++++++++++++++++++
 tests/util/CMakeLists.txt                          | 22 +++-----------
 .../util/piglit-framework-gl/piglit_drm_dma_buf.c  |  6 ----
 6 files changed, 72 insertions(+), 29 deletions(-)

-- 
1.8.3.1



More information about the Piglit mailing list