aboutsummaryrefslogtreecommitdiff
path: root/layers
diff options
context:
space:
mode:
authorTobin Ehlis <tobin@lunarg.com>2015-01-08 14:26:53 -0700
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-02-04 17:58:05 -0700
commit6a03176363d8cedbed3549ecac309943fdbf19ed (patch)
tree48e2b9c633d9a45e6827f00d934338cc65662ee5 /layers
parente2dbaefe9e273e96e7399d5ecf948bf550e8241d (diff)
downloadusermoji-6a03176363d8cedbed3549ecac309943fdbf19ed.tar.xz
layers: Default MemTracker and DrawState to verbose stdout mode when no settings file present.
Diffstat (limited to 'layers')
-rw-r--r--layers/draw_state.c9
-rw-r--r--layers/mem_tracker.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/layers/draw_state.c b/layers/draw_state.c
index d8527bb9..b4f303e8 100644
--- a/layers/draw_state.c
+++ b/layers/draw_state.c
@@ -43,7 +43,7 @@ pthread_mutex_t globalLock = PTHREAD_MUTEX_INITIALIZER;
// Ptr to LL of dbg functions
static XGL_LAYER_DBG_FUNCTION_NODE *g_pDbgFunctionHead = NULL;
-static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_ERROR;
+static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_INFO;
static XGL_LAYER_DBG_ACTION g_debugAction = XGL_DBG_LAYER_ACTION_LOG_MSG;
static FILE *g_logFile = NULL;
@@ -922,20 +922,21 @@ static void synchAndPrintDSConfig()
static void initDrawState()
{
const char *strOpt;
- // initialize MemTracker options
+ // initialize DrawState options
strOpt = getLayerOption("DrawStateReportLevel");
if (strOpt != NULL)
g_reportingLevel = atoi(strOpt);
+
strOpt = getLayerOption("DrawStateDebugAction");
if (strOpt != NULL)
- g_debugAction = atoi(strOpt);
+ g_debugAction = atoi(strOpt);
+
if (g_debugAction & XGL_DBG_LAYER_ACTION_LOG_MSG)
{
strOpt = getLayerOption("DrawStateLogFilename");
if (strOpt)
{
g_logFile = fopen(strOpt, "w");
-
}
if (g_logFile == NULL)
g_logFile = stdout;
diff --git a/layers/mem_tracker.c b/layers/mem_tracker.c
index 1d971f51..55b7be83 100644
--- a/layers/mem_tracker.c
+++ b/layers/mem_tracker.c
@@ -39,7 +39,7 @@ static pthread_once_t g_initOnce = PTHREAD_ONCE_INIT;
// Ptr to LL of dbg functions
static XGL_LAYER_DBG_FUNCTION_NODE *g_pDbgFunctionHead = NULL;
-static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_ERROR;
+static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_INFO;
static XGL_LAYER_DBG_ACTION g_debugAction = XGL_DBG_LAYER_ACTION_LOG_MSG;
static FILE *g_logFile = NULL;
@@ -838,16 +838,17 @@ static void initMemTracker()
strOpt = getLayerOption("MemTrackerReportLevel");
if (strOpt != NULL)
g_reportingLevel = atoi(strOpt);
+
strOpt = getLayerOption("MemTrackerDebugAction");
if (strOpt != NULL)
- g_debugAction = atoi(strOpt);
+ g_debugAction = atoi(strOpt);
+
if (g_debugAction & XGL_DBG_LAYER_ACTION_LOG_MSG)
{
strOpt = getLayerOption("MemTrackerLogFilename");
if (strOpt)
{
g_logFile = fopen(strOpt, "w");
-
}
if (g_logFile == NULL)
g_logFile = stdout;