diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-09-28 15:43:07 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-09-28 15:43:07 -0400 |
commit | 8d6bb9ee4e9def306454e9ecda1980793dcf7ad5 (patch) | |
tree | f7c4bbbb98f7deac7ea54d6dca49fced89f64d23 /indra/llcommon | |
parent | e6297ab3d6262014d3b501703154437bea523be1 (diff) |
SL-451 - SSE-optimized matrix multiply, used in initSkinningMatrixPalette()
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llerror.cpp | 17 | ||||
-rw-r--r-- | indra/llcommon/llerror.h | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 5ed348e13c..16ae1f0604 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1493,3 +1493,20 @@ namespace LLError } } +bool debugLoggingEnabled(const std::string& tag) +{ + const char* tags[] = {tag.c_str()}; + ::size_t tag_count = 1; + LLError::CallSite _site(LLError::LEVEL_DEBUG, __FILE__, __LINE__, + typeid(_LL_CLASS_TO_LOG), __FUNCTION__, false, tags, tag_count); + if (LL_UNLIKELY(_site.shouldLog())) + { + return true; + } + else + { + return false; + } +} + + diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 3beef65723..555a189b00 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -363,4 +363,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG; #define LL_INFOS_ONCE(...) lllog(LLError::LEVEL_INFO, true, ##__VA_ARGS__) #define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, ##__VA_ARGS__) +// Check at run-time whether logging is enabled, without generating output +bool debugLoggingEnabled(const std::string& tag); + #endif // LL_LLERROR_H |