st/mesa: enable the ST_DEBUG env var in release and debugoptimized builds
authorMarek Olšák <marek.olsak@amd.com>
Fri, 10 May 2019 01:07:57 +0000 (21:07 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 13 May 2019 17:01:01 +0000 (13:01 -0400)
Useful for dumping shaders.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/state_tracker/st_debug.c
src/mesa/state_tracker/st_debug.h

index 27d50a17e5ef937962c95636fbf8b62333dced1f..7faffb581ef1b426e8c2fb9ed1e85eeaa26c6c63 100644 (file)
@@ -42,7 +42,6 @@
 
 
 
-#ifdef DEBUG
 int ST_DEBUG = 0;
 
 static const struct debug_named_value st_debug_flags[] = {
@@ -64,15 +63,12 @@ static const struct debug_named_value st_debug_flags[] = {
 };
 
 DEBUG_GET_ONCE_FLAGS_OPTION(st_debug, "ST_DEBUG", st_debug_flags, 0)
-#endif
 
 
 void
 st_debug_init(void)
 {
-#ifdef DEBUG
    ST_DEBUG = debug_get_option_st_debug();
-#endif
 }
 
 
index 6c1e915f68c53e15fdf448953b4e49c1125101cf..446baa75c64b0b99345970cda90a1fda63c71391 100644 (file)
@@ -53,13 +53,7 @@ st_print_current(void);
 #define DEBUG_GREMEDY   0x1000
 #define DEBUG_NOREADPIXCACHE 0x2000
 
-#ifdef DEBUG
 extern int ST_DEBUG;
-#define DBSTR(x) x
-#else
-#define ST_DEBUG 0
-#define DBSTR(x) ""
-#endif
 
 void st_debug_init( void );