diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index cf3d41cf6cf80e99f5d00609e0da6a992815e9b5..d61d5c6491f3aee80b0c16ab83a0cbc1c7851690 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -212,7 +212,7 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex ) // needed? // joint->storeScaleForReset( newScale ); -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG // BENTO for detailed stack tracing of params. std::stringstream ostr; ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset; diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 2eb52e3768a3e6a9c9efbb0b81b4cd176004535d..51bc7077ab05e9f19ebe860c74c7b9634e283707 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -328,7 +328,7 @@ const LLVector3& LLJoint::getPosition() bool do_debug_joint(const std::string& name) { -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG if (std::find(LLJoint::s_debugJointNames.begin(), LLJoint::s_debugJointNames.end(),name) != LLJoint::s_debugJointNames.end()) { return true; @@ -350,7 +350,7 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment LLUUID mesh_id; if (apply_attachment_overrides && m_attachmentPosOverrides.findActiveOverride(mesh_id,active_override)) { -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG if (pos != active_override && do_debug_joint(getName())) { LLScopedContextString str("setPosition"); @@ -360,7 +360,7 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment #endif pos = active_override; } -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG if ((pos != getPosition()) && do_debug_joint(getName())) { LLScopedContextString str("setPosition"); @@ -897,7 +897,7 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_ LLVector3 active_override; if (apply_attachment_overrides && m_attachmentScaleOverrides.findActiveOverride(mesh_id,active_override)) { -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG if (scale != active_override && do_debug_joint(getName())) { LLScopedContextString str("setScale"); @@ -907,7 +907,7 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_ #endif scale = active_override; } -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG if ((mXform.getScale() != scale) && do_debug_joint(getName())) { LLScopedContextString str("setScale"); diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h index edc0b6c68391711f5201e68df9ab0a4c3d8c43b5..63a3ea10a57cbb4d3aa3675f550b9ceab700b290 100644 --- a/indra/llcommon/llcallstack.h +++ b/indra/llcommon/llcallstack.h @@ -79,7 +79,7 @@ struct LLContextStatus LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status); -#ifdef ENABLE_DEBUG +#if ENABLE_DEBUG_MACRO #define dumpStack(tag) \ static const bool enable_log = debugLoggingEnabled(tag); \ if (enable_log) \ diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 1600064373d213a94c1ef4c423f229ee9abe7111..d85f1a41558b24ec549409a7e2ad4e887cc502a3 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -42,10 +42,13 @@ const int LL_ERR_NOERR = 0; // #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output. #define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output #define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output. -#define ENABLE_DEBUG 1 +#if LL_TEST +#define ENABLE_DEBUG_MACRO 1 +#else +#define ENABLE_DEBUG_MACRO 0 +#endif #ifdef _DEBUG -#define ENABLE_DEBUG 1 #define SHOW_DEBUG #define SHOW_WARN #define SHOW_INFO @@ -53,12 +56,10 @@ const int LL_ERR_NOERR = 0; #else // _DEBUG #ifdef LL_RELEASE_WITH_DEBUG_INFO -#define ENABLE_DEBUG 1 #define SHOW_ASSERT #endif // LL_RELEASE_WITH_DEBUG_INFO #ifdef RELEASE_SHOW_DEBUG -#define ENABLE_DEBUG 1 #define SHOW_DEBUG #endif @@ -293,7 +294,7 @@ namespace LLError } //this is cheaper than llcallstacks if no need to output other variables to call stacks. -#if ENABLE_DEBUG +#if ENABLE_DEBUG_MACRO #define LL_PUSH_CALLSTACKS() LLError::LLCallStacks::push(__FUNCTION__, __LINE__) #define llcallstacks \ @@ -365,7 +366,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG; std::ostringstream* _out = LLError::Log::out(); \ (*_out) -#ifdef ENABLE_DEBUG +#if ENABLE_DEBUG_MACRO #define lllog_debug(level, once, ...) \ do { \ diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index f8cedd9f9a3683203b461b70cd780d42caf4e4ce..1ee2389be5fb366d25e2a49f5a5406a7869b29ac 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -193,7 +193,7 @@ void assert_glerror(); void clear_glerror(); -#if ENABLE_DEBUG +#ifdef SHOW_DEBUG # define stop_glerror() assert_glerror() # define llglassertok() assert_glerror() #else diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3b24c6091e65ca93059762987ac1bb15eea99466..97a8679fadeb0ec4d75af678d3229aebcbd3c89a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2479,7 +2479,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0])%upd_freq==0); } -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG LLScopedContextString str("avatar_idle_update " + getFullname()); #endif @@ -4375,7 +4375,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } BOOL visible = isVisible(); -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG bool is_control_avatar = isControlAvatar(); // capture state to simplify tracing bool is_attachment = false; if (is_control_avatar) @@ -6109,7 +6109,7 @@ bool LLVOAvatar::jointIsRiggedTo(const LLJoint *joint) const void LLVOAvatar::clearAttachmentOverrides() { -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG LLScopedContextString str("clearAttachmentOverrides " + getFullname()); #endif @@ -6143,7 +6143,7 @@ void LLVOAvatar::clearAttachmentOverrides() //----------------------------------------------------------------------------- void LLVOAvatar::rebuildAttachmentOverrides() { -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG LLScopedContextString str("rebuildAttachmentOverrides " + getFullname()); LL_DEBUGS("AnimatedObjects") << "rebuilding" << LL_ENDL; @@ -6195,7 +6195,7 @@ void LLVOAvatar::rebuildAttachmentOverrides() // ----------------------------------------------------------------------------- void LLVOAvatar::updateAttachmentOverrides() { -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG LLScopedContextString str("updateAttachmentOverrides " + getFullname()); LL_DEBUGS("AnimatedObjects") << "updating" << LL_ENDL; @@ -6319,7 +6319,7 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL return; } -#ifdef ENABLE_DEBUG +#ifdef SHOW_DEBUG LLScopedContextString str("addAttachmentOverridesForObject " + getFullname()); LL_DEBUGS("AnimatedObjects") << "adding" << LL_ENDL; @@ -10185,7 +10185,7 @@ void LLVOAvatar::updateRiggingInfo() } //LL_INFOS() << "done update rig count is " << countRigInfoTab(mJointRiggingInfoTab) << LL_ENDL; -#if ENABLE_DEBUG +#ifdef SHOW_DEBUG LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL; S32 joint_count, box_count; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5af9cdacf423a903b0a15408bd7e844b92e87175..ec778d82bf81e3505041bcc04e35b9c5453123f4 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5524,7 +5524,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) vobj->updateControlAvatar(); -#if ENABLE_DEBUG +#ifdef SHOW_DEBUG std::string vobj_name = llformat("Vol%p", vobj); F32 est_tris = vobj->getEstTrianglesMax();