#include "util/u_format.h"
#include "util/u_format_s3tc.h"
#include "util/u_string.h"
+#include "util/u_debug.h"
#include "os/os_time.h"
/* XXX this should go away */
#include "state_tracker/drm_driver.h"
+static const struct debug_named_value debug_options[] = {
+ {"msgs", FD_DBG_MSGS, "Print debug messages"},
+ {"disasm", FD_DBG_DISASM, "Dump TGSI and adreno shader disassembly"},
+ DEBUG_NAMED_VALUE_END
+};
+
+DEBUG_GET_ONCE_FLAGS_OPTION(fd_mesa_debug, "FD_MESA_DEBUG", debug_options, 0)
+
int fd_mesa_debug = 0;
static const char *
struct pipe_screen *pscreen;
uint64_t val;
- char *fd_dbg = getenv("FD_MESA_DEBUG");
- if (fd_dbg)
- fd_mesa_debug = atoi(fd_dbg);
+ fd_mesa_debug = debug_get_option_fd_mesa_debug();
if (!screen)
return NULL;