[Mesa-dev] [PATCH] radeon: Explain to the user what went wrong when built without libdrm.

Eric Anholt eric at anholt.net
Wed Aug 3 16:36:42 PDT 2011


Before this commit, even LIBGL_DEBUG=verbose would just fail with:
libGL error: failed to create dri screen
---

I didn't test whether a sane build could fail this way -- my normal
build is swrast, i915, i965, and when trying to test radeon I naively
did "cd ../r300 && make".  Though I had libdrm on my system,
LIBDRM_RADEON was unset and things went badly.

 src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h b/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
index 607b747..a74c6c7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
+++ b/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
@@ -78,6 +78,9 @@ static inline uint32_t radeon_gem_name_bo(struct radeon_bo *dummy)
 
 static inline void *radeon_bo_manager_gem_ctor(int fd)
 {
+  fprintf(stderr, "[%s:%u] Mesa built without Radeon libdrm support.\n",
+	  __func__, __LINE__);
+
   return NULL;
 }
 
@@ -87,6 +90,9 @@ static inline void radeon_bo_manager_gem_dtor(void *dummy)
 
 static inline void *radeon_cs_manager_gem_ctor(int fd)
 {
+  fprintf(stderr, "[%s:%u] Mesa built without Radeon libdrm support.\n",
+	  __func__, __LINE__);
+
   return NULL;
 }
 
-- 
1.7.5.4



More information about the mesa-dev mailing list