Mesa (master): radeon-gallium: Use debug_get_bool_option instead of getenv.

Corbin Simpson csimpson at kemper.freedesktop.org
Sun Oct 18 03:31:14 UTC 2009


Module: Mesa
Branch: master
Commit: 3e56bef5a5f56feb65ae94a51e5db9cf943ce0ce
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e56bef5a5f56feb65ae94a51e5db9cf943ce0ce

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Fri Oct 16 09:45:07 2009 -0700

radeon-gallium: Use debug_get_bool_option instead of getenv.

---

 src/gallium/winsys/drm/radeon/core/radeon_drm.c |    4 ++--
 src/gallium/winsys/drm/radeon/core/radeon_drm.h |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.c b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
index caab33d..69f14e5 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
@@ -38,7 +38,7 @@ struct pipe_screen* radeon_create_screen(struct drm_api* api,
 {
     struct radeon_winsys* winsys = radeon_pipe_winsys(drmFB);
 
-    if (getenv("RADEON_SOFTPIPE")) {
+    if (debug_get_bool_option("RADEON_SOFTPIPE", FALSE)) {
         return softpipe_create_screen((struct pipe_winsys*)winsys);
     } else {
         struct r300_winsys* r300 = radeon_create_r300_winsys(drmFB, winsys);
@@ -51,7 +51,7 @@ struct pipe_screen* radeon_create_screen(struct drm_api* api,
 struct pipe_context* radeon_create_context(struct drm_api* api,
                                            struct pipe_screen* screen)
 {
-    if (getenv("RADEON_SOFTPIPE")) {
+    if (debug_get_bool_option("RADEON_SOFTPIPE", FALSE)) {
         return radeon_create_softpipe(screen->winsys);
     } else {
         return r300_create_context(screen,
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.h b/src/gallium/winsys/drm/radeon/core/radeon_drm.h
index 88a5c82..9a789ec 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.h
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.h
@@ -37,6 +37,7 @@
 #include "pipe/p_screen.h"
 
 #include "trace/tr_drm.h"
+#include "util/u_debug.h"
 #include "util/u_memory.h"
 
 #include "state_tracker/drm_api.h"




More information about the mesa-commit mailing list