[Piglit] [PATCH 1/1] cmake: bump gbm dependency to 17.1

Jan Vesely jan.vesely at rutgers.edu
Thu Jun 22 13:52:53 UTC 2017


c6e1dc5247 switched to use gbm_bo_get_offset and gbm_bo_get_stride_for_plane.
These symbols were added in mesa 17.1. Since there is no alternative to using them, bump the gbm requirement to 17.1.

Fixes: c6e1dc5247 "piglit_drm_dma_buf: fix GPU offsets and strides"
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 CMakeLists.txt | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4dfe4f..90d056b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,16 +137,14 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 		add_definitions(-DPIGLIT_HAS_GLX)
 	endif()
 
-	pkg_check_modules(GBM QUIET gbm)
+	pkg_check_modules(GBM QUIET gbm>=17.1)
 	if(GBM_FOUND)
 		set(PIGLIT_HAS_GBM True)
 		add_definitions(-DPIGLIT_HAS_GBM)
 		set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GBM_LIBRARIES})
-		if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION VERSION_GREATER "12.1")
-			CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP)
-			if (PIGLIT_HAS_GBM_BO_MAP)
-				add_definitions(-DPIGLIT_HAS_GBM_BO_MAP)
-			endif()
+		CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP)
+		if (PIGLIT_HAS_GBM_BO_MAP)
+			add_definitions(-DPIGLIT_HAS_GBM_BO_MAP)
 		endif()
 	endif(GBM_FOUND)
 
-- 
2.9.4



More information about the Piglit mailing list