[Piglit] [PATCH 3/4] cmake, dma_buf: Require libdrm_intel>=2.4.38 to build dma_buf tests
Chad Versace
chad.versace at linux.intel.com
Tue Sep 10 11:07:53 PDT 2013
The dma_buf tests, when running on Intel hardware, use DRM prime
buffers. Support for prime buffers arrived in libdrm_intel>=2.4.38.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
CMakeLists.txt | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 955516b..4ec5ddf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,7 +104,11 @@ ENDIF()
# The presence of libdrm is not sufficient. At least one libdrm_${hardware}
# library is also needed.
#
-if(LIBDRM_FOUND AND LIBDRM_INTEL_FOUND AND XCB_DRI2_FOUND)
+# When building for Intel, libdrm_intel>=2.4.38 is required because support for
+# drm-prime arrived in that version.
+#
+if(LIBDRM_FOUND AND XCB_DRI2_FOUND AND
+ (LIBDRM_INTEL_VERSION VERSION_GREATER "2.4.37"))
set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID true)
else()
set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID false)
@@ -120,8 +124,8 @@ endif()
# we need to validate it.
if(PIGLIT_BUILD_DMA_BUF_TESTS AND NOT PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID)
message(FATAL_ERROR
- "PIGLIT_BUILD_DMA_BUF_TESTS require libdrm and libdrm_intel, "
- "and xcb-dri2")
+ "PIGLIT_BUILD_DMA_BUF_TESTS require libdrm, "
+ "libdrm_intel>=2.4.38, and xcb-dri2")
endif()
IF(PIGLIT_BUILD_GLX_TESTS)
--
1.8.3.1
More information about the Piglit
mailing list