radeon-gallium: Use debug_get_bool_option instead of getenv.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Fri, 16 Oct 2009 16:45:07 +0000 (09:45 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Fri, 16 Oct 2009 16:45:07 +0000 (09:45 -0700)
src/gallium/winsys/drm/radeon/core/radeon_drm.c
src/gallium/winsys/drm/radeon/core/radeon_drm.h

index caab33de1ccc0879bd5af3fe53f0b392e55c3ace..69f14e54f2672ba97ec248c7fd19798460343c9b 100644 (file)
@@ -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,
index 88a5c82b284b67ed822bc771e0618833365d891a..9a789ec1a45c2cb676edad451d3e283ee4aa933c 100644 (file)
@@ -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"