master
Ansariel 2022-01-15 02:39:07 +01:00
commit 0a0e2fe93e
89 changed files with 1314 additions and 945 deletions

View File

@ -198,7 +198,7 @@ void LLCharacter::requestStopMotion( LLMotion* motion)
//-----------------------------------------------------------------------------
void LLCharacter::updateMotions(e_update_t update_type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (update_type == HIDDEN_UPDATE)
{
mMotionController.updateMotionsMinimal();

View File

@ -175,7 +175,7 @@ BOOL LLHeadRotMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
LLQuaternion targetHeadRotWorld;
LLQuaternion currentRootRotWorld = mRootJoint->getWorldRotation();
LLQuaternion currentInvRootRotWorld = ~currentRootRotWorld;
@ -462,7 +462,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s
//-----------------------------------------------------------------------------
BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
//calculate jitter
if (mEyeJitterTimer.getElapsedTimeF32() > mEyeJitterTime)
{

View File

@ -1,6 +1,6 @@
/**
* @file lljointsolverrp3.cpp
* @brief Implementation of LLJointSolverRP3 class.
* @brief Implementation of Joint Solver in 3D Real Projective space (RP3). See: https://en.wikipedia.org/wiki/Real_projective_space
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
@ -35,6 +35,11 @@
#define F_EPSILON 0.00001f
#if LL_RELEASE
#define DEBUG_JOINT_SOLVER 0
#else
#define DEBUG_JOINT_SOLVER 1
#endif
//-----------------------------------------------------------------------------
// Constructor
@ -150,6 +155,7 @@ void LLJointSolverRP3::solve()
LLVector3 cPos = mJointC->getWorldPosition();
LLVector3 gPos = mJointGoal->getWorldPosition();
#if DEBUG_JOINT_SOLVER
LL_DEBUGS("JointSolver") << "LLJointSolverRP3::solve()" << LL_NEWLINE
<< "bPosLocal = " << mJointB->getPosition() << LL_NEWLINE
<< "cPosLocal = " << mJointC->getPosition() << LL_NEWLINE
@ -159,6 +165,7 @@ void LLJointSolverRP3::solve()
<< "bPos : " << bPos << LL_NEWLINE
<< "cPos : " << cPos << LL_NEWLINE
<< "gPos : " << gPos << LL_ENDL;
#endif
//-------------------------------------------------------------------------
// get the poleVector in world space
@ -194,6 +201,7 @@ void LLJointSolverRP3::solve()
//-------------------------------------------------------------------------
LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec));
#if DEBUG_JOINT_SOLVER
LL_DEBUGS("JointSolver") << "abVec : " << abVec << LL_NEWLINE
<< "bcVec : " << bcVec << LL_NEWLINE
<< "acVec : " << acVec << LL_NEWLINE
@ -202,6 +210,7 @@ void LLJointSolverRP3::solve()
<< "bcLen : " << bcLen << LL_NEWLINE
<< "agLen : " << agLen << LL_NEWLINE
<< "abacCompOrthoVec : " << abacCompOrthoVec << LL_ENDL;
#endif
//-------------------------------------------------------------------------
// compute the normal of the original ABC plane (and store for later)
@ -269,6 +278,7 @@ void LLJointSolverRP3::solve()
LLQuaternion bRot(theta - abbcAng, abbcOrthoVec);
#if DEBUG_JOINT_SOLVER
LL_DEBUGS("JointSolver") << "abbcAng : " << abbcAng << LL_NEWLINE
<< "abbcOrthoVec : " << abbcOrthoVec << LL_NEWLINE
<< "agLenSq : " << agLenSq << LL_NEWLINE
@ -280,6 +290,7 @@ void LLJointSolverRP3::solve()
<< abbcAng*180.0f/F_PI << " "
<< (theta - abbcAng)*180.0f/F_PI
<< LL_ENDL;
#endif
//-------------------------------------------------------------------------
// compute rotation that rotates new A->C to A->G
@ -293,9 +304,11 @@ void LLJointSolverRP3::solve()
LLQuaternion cgRot;
cgRot.shortestArc( acVec, agVec );
#if DEBUG_JOINT_SOLVER
LL_DEBUGS("JointSolver") << "bcVec : " << bcVec << LL_NEWLINE
<< "acVec : " << acVec << LL_NEWLINE
<< "cgRot : " << cgRot << LL_ENDL;
#endif
// update A->B and B->C with rotation from C to G
abVec = abVec * cgRot;
@ -358,11 +371,13 @@ void LLJointSolverRP3::solve()
//-------------------------------------------------------------------------
LLQuaternion twistRot( mTwist, agVec );
#if DEBUG_JOINT_SOLVER
LL_DEBUGS("JointSolver") << "abcNorm = " << abcNorm << LL_NEWLINE
<< "apgNorm = " << apgNorm << LL_NEWLINE
<< "pRot = " << pRot << LL_NEWLINE
<< "twist : " << mTwist*180.0/F_PI << LL_NEWLINE
<< "twistRot : " << twistRot << LL_ENDL;
#endif
//-------------------------------------------------------------------------
// compute rotation of A

View File

@ -121,7 +121,7 @@ BOOL LLKeyframeFallMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
BOOL result = LLKeyframeMotion::onUpdate(activeTime, joint_mask);
F32 slerp_amt = clamp_rescale(activeTime / getDuration(), 0.5f, 0.75f, 0.f, 1.f);

View File

@ -680,7 +680,7 @@ BOOL LLKeyframeMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// llassert(time >= 0.f); // This will fire
time = llmax(0.f, time);

View File

@ -513,7 +513,7 @@ void LLMotionController::resetJointSignatures()
//-----------------------------------------------------------------------------
void LLMotionController::updateIdleMotion(LLMotion* motionp)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
{
deactivateMotionInstance(motionp);
@ -552,7 +552,7 @@ void LLMotionController::updateIdleMotion(LLMotion* motionp)
//-----------------------------------------------------------------------------
void LLMotionController::updateIdleActiveMotions()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
for (motion_list_t::iterator iter = mActiveMotions.begin();
iter != mActiveMotions.end(); )
{
@ -567,7 +567,7 @@ void LLMotionController::updateIdleActiveMotions()
//-----------------------------------------------------------------------------
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
BOOL update_result = TRUE;
U8 last_joint_signature[LL_CHARACTER_MAX_ANIMATED_JOINTS];
@ -778,7 +778,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
//-----------------------------------------------------------------------------
void LLMotionController::updateLoadingMotions()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// query pending motions for completion
for (motion_set_t::iterator iter = mLoadingMotions.begin();
iter != mLoadingMotions.end(); )
@ -826,7 +826,7 @@ void LLMotionController::updateLoadingMotions()
//-----------------------------------------------------------------------------
void LLMotionController::updateMotions(bool force_update)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// SL-763: "Distant animated objects run at super fast speed"
// The use_quantum optimization or possibly the associated code in setTimeStamp()
// does not work as implemented.
@ -922,7 +922,7 @@ void LLMotionController::updateMotions(bool force_update)
//-----------------------------------------------------------------------------
void LLMotionController::updateMotionsMinimal()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// Always update mPrevTimerElapsed
mPrevTimerElapsed = mTimer.getElapsedTimeF32();
@ -940,7 +940,7 @@ void LLMotionController::updateMotionsMinimal()
//-----------------------------------------------------------------------------
BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// It's not clear why the getWeight() line seems to be crashing this, but
// hopefully this fixes it.
if (motion == NULL || motion->getPose() == NULL)

View File

@ -202,6 +202,7 @@ set(llcommon_HEADER_FILES
llnametable.h
llpointer.h
llprofiler.h
llprofilercategories.h
llpounceable.h
llpredicate.h
llpreprocessor.h

View File

@ -43,7 +43,7 @@ void *operator new(size_t size)
void* ptr;
if (gProfilerEnabled)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
ptr = (malloc)(size);
}
else
@ -63,7 +63,7 @@ void operator delete(void *ptr) noexcept
TracyFree(ptr);
if (gProfilerEnabled)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
(free)(ptr);
}
else

View File

@ -109,7 +109,7 @@ namespace {
virtual void recordMessage(LLError::ELevel level,
const std::string& message) override
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
int syslogPriority = LOG_CRIT;
switch (level) {
case LLError::LEVEL_DEBUG: syslogPriority = LOG_DEBUG; break;
@ -169,7 +169,7 @@ namespace {
virtual void recordMessage(LLError::ELevel level,
const std::string& message) override
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
if (LLError::getAlwaysFlush())
{
mFile << message << std::endl;
@ -236,7 +236,7 @@ namespace {
virtual void recordMessage(LLError::ELevel level,
const std::string& message) override
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
// The default colors for error, warn and debug are now a bit more pastel
// and easier to read on the default (black) terminal background but you
// now have the option to set the color of each via an environment variables:
@ -279,7 +279,7 @@ namespace {
LL_FORCE_INLINE void writeANSI(const std::string& ansi_code, const std::string& message)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
static std::string s_ansi_bold = createBoldANSI(); // bold text
static std::string s_ansi_reset = createResetANSI(); // reset
// ANSI color code escape sequence, message, and reset in one fprintf call
@ -316,7 +316,7 @@ namespace {
virtual void recordMessage(LLError::ELevel level,
const std::string& message) override
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
mBuffer->addLine(message);
}
@ -343,7 +343,7 @@ namespace {
virtual void recordMessage(LLError::ELevel level,
const std::string& message) override
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
debugger_print(message);
}
};
@ -1228,7 +1228,7 @@ namespace
void writeToRecorders(const LLError::CallSite& site, const std::string& message)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
LLError::ELevel level = site.mLevel;
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
@ -1370,7 +1370,7 @@ namespace LLError
bool Log::shouldLog(CallSite& site)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
LLMutexTrylock lock(getMutex<LOG_MUTEX>(), 5);
if (!lock.isLocked())
{
@ -1415,7 +1415,7 @@ namespace LLError
void Log::flush(const std::ostringstream& out, const CallSite& site)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
LLMutexTrylock lock(getMutex<LOG_MUTEX>(),5);
if (!lock.isLocked())
{

View File

@ -227,7 +227,7 @@ void BlockTimer::bootstrapTimerTree()
// this preserves partial order derived from current frame's observations
void BlockTimer::incrementalUpdateTimerTree()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
for(block_timer_tree_df_post_iterator_t it = begin_block_timer_tree_df_post(BlockTimer::getRootTimeBlock());
it != end_block_timer_tree_df_post();
++it)
@ -268,7 +268,7 @@ void BlockTimer::incrementalUpdateTimerTree()
void BlockTimer::updateTimes()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
// walk up stack of active timers and accumulate current time while leaving timing structures active
BlockTimerStackRecord* stack_record = LLThreadLocalSingletonPointer<BlockTimerStackRecord>::getInstance();
if (!stack_record) return;

View File

@ -136,7 +136,7 @@ public: \
#else
inline void* ll_aligned_malloc_fallback( size_t size, int align )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
#if defined(LL_WINDOWS)
void* ret = (_aligned_malloc)(size, align);
#else
@ -157,7 +157,7 @@ public: \
inline void ll_aligned_free_fallback( void* ptr )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
LL_PROFILE_FREE(ptr);
#if defined(LL_WINDOWS)
(_aligned_free)(ptr);
@ -174,7 +174,7 @@ public: \
inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
#if defined(LL_WINDOWS)
void* ret = _aligned_malloc(size, 16);
#elif defined(LL_DARWIN)
@ -190,7 +190,7 @@ inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed wi
inline void ll_aligned_free_16(void *p)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
LL_PROFILE_FREE(p);
#if defined(LL_WINDOWS)
_aligned_free(p);
@ -203,7 +203,7 @@ inline void ll_aligned_free_16(void *p)
inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // returned hunk MUST be freed with ll_aligned_free_16().
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
LL_PROFILE_FREE(ptr);
#if defined(LL_WINDOWS)
void* ret = _aligned_realloc(ptr, size, 16);
@ -228,7 +228,7 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // r
inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed with ll_aligned_free_32().
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
#if defined(LL_WINDOWS)
void* ret = _aligned_malloc(size, 32);
#elif defined(LL_DARWIN)
@ -244,7 +244,7 @@ inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed wi
inline void ll_aligned_free_32(void *p)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
LL_PROFILE_FREE(p);
#if defined(LL_WINDOWS)
_aligned_free(p);
@ -259,7 +259,7 @@ inline void ll_aligned_free_32(void *p)
template<size_t ALIGNMENT>
LL_FORCE_INLINE void* ll_aligned_malloc(size_t size)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
void* ret;
if (LL_DEFAULT_HEAP_ALIGN % ALIGNMENT == 0)
{
@ -284,7 +284,7 @@ LL_FORCE_INLINE void* ll_aligned_malloc(size_t size)
template<size_t ALIGNMENT>
LL_FORCE_INLINE void ll_aligned_free(void* ptr)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN)
{
LL_PROFILE_FREE(ptr);
@ -309,7 +309,7 @@ LL_FORCE_INLINE void ll_aligned_free(void* ptr)
//
inline void ll_memcpy_nonaliased_aligned_16(char* __restrict dst, const char* __restrict src, size_t bytes)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
assert(src != NULL);
assert(dst != NULL);
assert(bytes > 0);

View File

@ -44,7 +44,7 @@ LLMutex::~LLMutex()
void LLMutex::lock()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if(isSelfLocked())
{ //redundant lock
mCount++;
@ -66,7 +66,7 @@ void LLMutex::lock()
void LLMutex::unlock()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if (mCount > 0)
{ //not the root unlock
mCount--;
@ -87,7 +87,7 @@ void LLMutex::unlock()
bool LLMutex::isLocked()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if (!mMutex.try_lock())
{
return true;
@ -111,7 +111,7 @@ LLThread::id_t LLMutex::lockingThread() const
bool LLMutex::trylock()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if(isSelfLocked())
{ //redundant lock
mCount++;
@ -150,20 +150,20 @@ LLCondition::~LLCondition()
void LLCondition::wait()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
std::unique_lock< std::mutex > lock(mMutex);
mCond.wait(lock);
}
void LLCondition::signal()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mCond.notify_one();
}
void LLCondition::broadcast()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mCond.notify_all();
}
@ -173,7 +173,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex)
: mMutex(mutex),
mLocked(false)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if (mMutex)
mLocked = mMutex->trylock();
}
@ -182,7 +182,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex, U32 aTries, U32 delay_ms)
: mMutex(mutex),
mLocked(false)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if (!mMutex)
return;
@ -197,7 +197,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex, U32 aTries, U32 delay_ms)
LLMutexTrylock::~LLMutexTrylock()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if (mMutex && mLocked)
mMutex->unlock();
}
@ -209,7 +209,7 @@ LLMutexTrylock::~LLMutexTrylock()
//
LLScopedLock::LLScopedLock(std::mutex* mutex) : mMutex(mutex)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if(mutex)
{
mutex->lock();
@ -228,7 +228,7 @@ LLScopedLock::~LLScopedLock()
void LLScopedLock::unlock()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if(mLocked)
{
mMutex->unlock();

View File

@ -27,6 +27,44 @@
#ifndef LL_PROFILER_H
#define LL_PROFILER_H
// If you use the default macros LL_PROFILE_ZONE_SCOPED and LL_PROFILE_ZONE_NAMED to profile code ...
//
// void foo()
// {
// LL_PROFILE_ZONE_SCOPED;
// :
//
// {
// LL_PROFILE_ZONE_NAMED("widget bar");
// :
// }
// {
// LL_PROFILE_ZONE_NAMED("widget qux");
// :
// }
// }
//
// ... please be aware that ALL these will show up in a Tracy capture which can quickly exhaust memory.
// Instead, use LL_PROFILE_ZONE_SCOPED_CATEGORY_* and LL_PROFILE_ZONE_NAMED_CATEGORY_* to profile code ...
//
// void foo()
// {
// LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
// :
//
// {
// LL_PROFILE_ZONE_NAMED_CATEGORY_UI("widget bar");
// :
// }
// {
// LL_PROFILE_ZONE_NAMED_CATEGORY_UI("widget qux");
// :
// }
// }
//
// ... as these can be selectively turned on/off. This will minimize memory usage and visual clutter in a Tracy capture.
// See llprofiler_categories.h for more details on profiling categories.
#define LL_PROFILER_CONFIG_NONE 0 // No profiling
#define LL_PROFILER_CONFIG_FAST_TIMER 1 // Profiling on: Only Fast Timers
#define LL_PROFILER_CONFIG_TRACY 2 // Profiling on: Only Tracy
@ -175,4 +213,6 @@ extern thread_local bool gProfilerEnabled;
// </FS:Ansariel>
#endif // LL_PROFILER
#include "llprofilercategories.h"
#endif // LL_PROFILER_H

View File

@ -0,0 +1,280 @@
/**
* @file llprofiler_ategories.h
* @brief Profiling categories to minimize Tracy memory usage when viewing captures.
*
* $LicenseInfo:firstyear=2022&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2022, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_PROFILER_CATEGORIES_H
#define LL_PROFILER_CATEGORIES_H
// A Tracy capture can quickly consume memory. Use these defines to selectively turn on/off Tracy profiling for these categories.
// The biggest memory usage ones are:
//
// LL_PROFILER_CATEGORY_ENABLE_DRAWPOOL
// LL_PROFILER_CATEGORY_ENABLE_LLSD
// LL_PROFILER_CATEGORY_ENABLE_MEMORY
// LL_PROFILER_CATEGORY_ENABLE_SHADERS
//
// NOTE: You can still manually use:
// LL_PROFILE_ZONE_SCOPED();
// LL_PROFILE_ZONE_NAMED("name");
// but just be aware that those will ALWAYS show up in a Tracy capture
// a) using more memory, and
// b) adding visual clutter.
#define LL_PROFILER_CATEGORY_ENABLE_APP 1
#define LL_PROFILER_CATEGORY_ENABLE_AVATAR 1
#define LL_PROFILER_CATEGORY_ENABLE_DISPLAY 1
#define LL_PROFILER_CATEGORY_ENABLE_DRAWABLE 1
#define LL_PROFILER_CATEGORY_ENABLE_DRAWPOOL 1
#define LL_PROFILER_CATEGORY_ENABLE_ENVIRONMENT 1
#define LL_PROFILER_CATEGORY_ENABLE_FACE 1
#define LL_PROFILER_CATEGORY_ENABLE_LLSD 1
#define LL_PROFILER_CATEGORY_ENABLE_LOGGING 1
#define LL_PROFILER_CATEGORY_ENABLE_MATERIAL 1
#define LL_PROFILER_CATEGORY_ENABLE_MEDIA 1
#define LL_PROFILER_CATEGORY_ENABLE_MEMORY 1
#define LL_PROFILER_CATEGORY_ENABLE_NETWORK 1
#define LL_PROFILER_CATEGORY_ENABLE_OCTREE 1
#define LL_PROFILER_CATEGORY_ENABLE_PIPELINE 1
#define LL_PROFILER_CATEGORY_ENABLE_SHADER 1
#define LL_PROFILER_CATEGORY_ENABLE_SPATIAL 1
#define LL_PROFILER_CATEGORY_ENABLE_STATS 1
#define LL_PROFILER_CATEGORY_ENABLE_STRING 1
#define LL_PROFILER_CATEGORY_ENABLE_TEXTURE 1
#define LL_PROFILER_CATEGORY_ENABLE_THREAD 1
#define LL_PROFILER_CATEGORY_ENABLE_UI 1
#define LL_PROFILER_CATEGORY_ENABLE_VIEWER 1
#define LL_PROFILER_CATEGORY_ENABLE_VERTEX 1
#define LL_PROFILER_CATEGORY_ENABLE_VOLUME 1
#define LL_PROFILER_CATEGORY_ENABLE_WIN32 1
#if LL_PROFILER_CATEGORY_ENABLE_APP
#define LL_PROFILE_ZONE_NAMED_CATEGORY_APP LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_APP LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_APP(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_APP
#endif
#if LL_PROFILER_CATEGORY_ENABLE_AVATAR
#define LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
#endif
#if LL_PROFILER_CATEGORY_ENABLE_DISPLAY
#define LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY
#endif
#if LL_PROFILER_CATEGORY_ENABLE_DRAWABLE
#define LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWABLE LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWABLE(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
#endif
#if LL_PROFILER_CATEGORY_ENABLE_DRAWPOOL
#define LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL
#endif
#if LL_PROFILER_CATEGORY_ENABLE_ENVIRONMENT
#define LL_PROFILE_ZONE_NAMED_CATEGORY_ENVIRONMENT LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_ENVIRONMENT(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT
#endif
#if LL_PROFILER_CATEGORY_ENABLE_FACE
#define LL_PROFILE_ZONE_NAMED_CATEGORY_FACE LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_FACE(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
#endif
#if LL_PROFILER_CATEGORY_ENABLE_LLSD
#define LL_PROFILE_ZONE_NAMED_CATEGORY_LLSD LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_LLSD(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
#endif
#if LL_PROFILER_CATEGORY_ENABLE_LOGGING
#define LL_PROFILE_ZONE_NAMED_CATEGORY_LOGGING LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_LOGGING(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
#endif
#if LL_PROFILER_CATEGORY_ENABLE_MATERIAL
#define LL_PROFILE_ZONE_NAMED_CATEGORY_MATERIAL LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_MATERIAL LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_MATERIAL(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_MATERIAL
#endif
#if LL_PROFILER_CATEGORY_ENABLE_MEDIA
#define LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA
#endif
#if LL_PROFILER_CATEGORY_ENABLE_MEMORY
#define LL_PROFILE_ZONE_NAMED_CATEGORY_MEMORY LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_MEMORY(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY
#endif
#if LL_PROFILER_CATEGORY_ENABLE_NETWORK
#define LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK
#endif
#if LL_PROFILER_CATEGORY_ENABLE_OCTREE
#define LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE
#endif
#if LL_PROFILER_CATEGORY_ENABLE_PIPELINE
#define LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE
#endif
#if LL_PROFILER_CATEGORY_ENABLE_SHADER
#define LL_PROFILE_ZONE_NAMED_CATEGORY_SHADER LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_SHADER(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER
#endif
#if LL_PROFILER_CATEGORY_ENABLE_SPATIAL
#define LL_PROFILE_ZONE_NAMED_CATEGORY_SPATIAL LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_SPATIAL(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
#endif
#if LL_PROFILER_CATEGORY_ENABLE_STATS
#define LL_PROFILE_ZONE_NAMED_CATEGORY_STATS LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_STATS(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS
#endif
#if LL_PROFILER_CATEGORY_ENABLE_STRING
#define LL_PROFILE_ZONE_NAMED_CATEGORY_STRING LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_STRING LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_STRING(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_STRING
#endif
#if LL_PROFILER_CATEGORY_ENABLE_TEXTURE
#define LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE
#endif
#if LL_PROFILER_CATEGORY_ENABLE_THREAD
#define LL_PROFILE_ZONE_NAMED_CATEGORY_THREAD LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_THREAD(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
#endif
#if LL_PROFILER_CATEGORY_ENABLE_UI
#define LL_PROFILE_ZONE_NAMED_CATEGORY_UI LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_UI LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_UI(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
#endif
#if LL_PROFILER_CATEGORY_ENABLE_VERTEX
#define LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
#endif
#if LL_PROFILER_CATEGORY_ENABLE_VIEWER
#define LL_PROFILE_ZONE_NAMED_CATEGORY_VIEWER LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_VIEWER(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER
#endif
#if LL_PROFILER_CATEGORY_ENABLE_VOLUME
#define LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
#endif
#if LL_PROFILER_CATEGORY_ENABLE_WIN32
#define LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32 LL_PROFILE_ZONE_NAMED
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32 LL_PROFILE_ZONE_SCOPED
#else
#define LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32(name)
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32
#endif
#endif // LL_PROFILER_CATEGORIES_H

View File

@ -400,7 +400,7 @@ namespace
ImplMap& ImplMap::makeMap(LLSD::Impl*& var)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
if (shared())
{
ImplMap* i = new ImplMap(mData);
@ -415,21 +415,21 @@ namespace
bool ImplMap::has(const LLSD::String& k) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
DataMap::const_iterator i = mData.find(k);
return i != mData.end();
}
LLSD ImplMap::get(const LLSD::String& k) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
DataMap::const_iterator i = mData.find(k);
return (i != mData.end()) ? i->second : LLSD();
}
LLSD ImplMap::getKeys() const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
LLSD keys = LLSD::emptyArray();
DataMap::const_iterator iter = mData.begin();
while (iter != mData.end())
@ -442,13 +442,13 @@ namespace
void ImplMap::insert(const LLSD::String& k, const LLSD& v)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
mData.insert(DataMap::value_type(k, v));
}
void ImplMap::erase(const LLSD::String& k)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
mData.erase(k);
}
@ -690,7 +690,7 @@ const LLSD::Impl& LLSD::Impl::safe(const Impl* impl)
ImplMap& LLSD::Impl::makeMap(Impl*& var)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
ImplMap* im = new ImplMap;
reset(var, im);
return *im;
@ -896,12 +896,12 @@ void LLSD::erase(const String& k) { makeMap(impl).erase(k); }
LLSD& LLSD::operator[](const String& k)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
return makeMap(impl).ref(k);
}
const LLSD& LLSD::operator[](const String& k) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
return safe(impl).ref(k);
}
@ -928,12 +928,12 @@ void LLSD::erase(Integer i) { makeArray(impl).erase(i); }
LLSD& LLSD::operator[](Integer i)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
return makeArray(impl).ref(i);
}
const LLSD& LLSD::operator[](Integer i) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
return safe(impl).ref(i);
}

View File

@ -290,16 +290,16 @@ public:
LLSD& with(const String&, const LLSD&);
LLSD& operator[](const String&);
LLSD& operator[](const char* c)
{
LL_PROFILE_ZONE_SCOPED;
return (*this)[String(c)];
LLSD& operator[](const char* c)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
return (*this)[String(c)];
}
const LLSD& operator[](const String&) const;
const LLSD& operator[](const char* c) const
{
LL_PROFILE_ZONE_SCOPED;
return (*this)[String(c)];
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
return (*this)[String(c)];
}
//@}

View File

@ -496,7 +496,7 @@ public:
static DERIVED_TYPE* getInstance()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// We know the viewer has LLSingleton dependency circularities. If you
// feel strongly motivated to eliminate them, cheers and good luck.
// (At that point we could consider a much simpler locking mechanism.)

View File

@ -1444,7 +1444,7 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
template<>
S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STRING;
S32 res = 0;
std::string output;
@ -1517,7 +1517,7 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions)
template<>
S32 LLStringUtil::format(std::string& s, const LLSD& substitutions)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STRING;
S32 res = 0;
if (!substitutions.isMap())

View File

@ -374,14 +374,14 @@ void LLThread::setQuitting()
// <FS:Beq> give this a better chance to inline
// LLThread::id_t LLThread::currentID()
// {
// LL_PROFILE_ZONE_SCOPED
// LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
// return std::this_thread::get_id();
// }
// static
void LLThread::yield()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
std::this_thread::yield();
}
@ -401,7 +401,7 @@ void LLThread::wake()
void LLThread::wakeLocked()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if(!shouldSleep())
{
mRunCondition->signal();
@ -410,13 +410,13 @@ void LLThread::wakeLocked()
void LLThread::lockData()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mDataLock->lock();
}
void LLThread::unlockData()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mDataLock->unlock();
}

View File

@ -275,7 +275,7 @@ template <typename ElementT, typename QueueT>
template <typename CALLABLE>
bool LLThreadSafeQueue<ElementT, QueueT>::tryLock(CALLABLE&& callable)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock1(mLock, std::defer_lock);
if (!lock1.try_lock())
return false;
@ -292,7 +292,7 @@ bool LLThreadSafeQueue<ElementT, QueueT>::tryLockUntil(
const std::chrono::time_point<Clock, Duration>& until,
CALLABLE&& callable)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock1(mLock, std::defer_lock);
if (!lock1.try_lock_until(until))
return false;
@ -306,7 +306,7 @@ template <typename ElementT, typename QueueT>
template <typename T>
bool LLThreadSafeQueue<ElementT, QueueT>::push_(lock_t& lock, T&& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
if (mStorage.size() >= mCapacity)
return false;
@ -322,7 +322,7 @@ template <typename ElementT, typename QueueT>
template <typename T>
bool LLThreadSafeQueue<ElementT, QueueT>::pushIfOpen(T&& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock1(mLock);
while (true)
{
@ -345,7 +345,7 @@ template <typename ElementT, typename QueueT>
template<typename T>
void LLThreadSafeQueue<ElementT, QueueT>::push(T&& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
if (! pushIfOpen(std::forward<T>(element)))
{
LLTHROW(LLThreadSafeQueueInterrupt());
@ -357,7 +357,7 @@ template<typename ElementT, typename QueueT>
template<typename T>
bool LLThreadSafeQueue<ElementT, QueueT>::tryPush(T&& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryLock(
[this, element=std::move(element)](lock_t& lock)
{
@ -374,7 +374,7 @@ bool LLThreadSafeQueue<ElementT, QueueT>::tryPushFor(
const std::chrono::duration<Rep, Period>& timeout,
T&& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// Convert duration to time_point: passing the same timeout duration to
// each of multiple calls is wrong.
return tryPushUntil(std::chrono::steady_clock::now() + timeout,
@ -388,7 +388,7 @@ bool LLThreadSafeQueue<ElementT, QueueT>::tryPushUntil(
const std::chrono::time_point<Clock, Duration>& until,
T&& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryLockUntil(
until,
[this, until, element=std::move(element)](lock_t& lock)
@ -421,7 +421,7 @@ template <typename ElementT, typename QueueT>
typename LLThreadSafeQueue<ElementT, QueueT>::pop_result
LLThreadSafeQueue<ElementT, QueueT>::pop_(lock_t& lock, ElementT& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// If mStorage is empty, there's no head element.
if (mStorage.empty())
return mClosed? DONE : EMPTY;
@ -443,7 +443,7 @@ LLThreadSafeQueue<ElementT, QueueT>::pop_(lock_t& lock, ElementT& element)
template<typename ElementT, typename QueueT>
ElementT LLThreadSafeQueue<ElementT, QueueT>::pop(void)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock1(mLock);
ElementT value;
while (true)
@ -472,7 +472,7 @@ ElementT LLThreadSafeQueue<ElementT, QueueT>::pop(void)
template<typename ElementT, typename QueueT>
bool LLThreadSafeQueue<ElementT, QueueT>::tryPop(ElementT & element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryLock(
[this, &element](lock_t& lock)
{
@ -490,7 +490,7 @@ bool LLThreadSafeQueue<ElementT, QueueT>::tryPopFor(
const std::chrono::duration<Rep, Period>& timeout,
ElementT& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// Convert duration to time_point: passing the same timeout duration to
// each of multiple calls is wrong.
return tryPopUntil(std::chrono::steady_clock::now() + timeout, element);
@ -503,7 +503,7 @@ bool LLThreadSafeQueue<ElementT, QueueT>::tryPopUntil(
const std::chrono::time_point<Clock, Duration>& until,
ElementT& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryLockUntil(
until,
[this, until, &element](lock_t& lock)
@ -523,7 +523,7 @@ LLThreadSafeQueue<ElementT, QueueT>::tryPopUntil_(
const std::chrono::time_point<Clock, Duration>& until,
ElementT& element)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
while (true)
{
pop_result popped = pop_(lock, element);
@ -550,7 +550,7 @@ LLThreadSafeQueue<ElementT, QueueT>::tryPopUntil_(
template<typename ElementT, typename QueueT>
size_t LLThreadSafeQueue<ElementT, QueueT>::size(void)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock(mLock);
return mStorage.size();
}
@ -559,7 +559,7 @@ size_t LLThreadSafeQueue<ElementT, QueueT>::size(void)
template<typename ElementT, typename QueueT>
void LLThreadSafeQueue<ElementT, QueueT>::close()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock(mLock);
mClosed = true;
lock.unlock();
@ -573,7 +573,7 @@ void LLThreadSafeQueue<ElementT, QueueT>::close()
template<typename ElementT, typename QueueT>
bool LLThreadSafeQueue<ElementT, QueueT>::isClosed()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock(mLock);
return mClosed;
}
@ -582,7 +582,7 @@ bool LLThreadSafeQueue<ElementT, QueueT>::isClosed()
template<typename ElementT, typename QueueT>
bool LLThreadSafeQueue<ElementT, QueueT>::done()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock(mLock);
return mClosed && mStorage.empty();
}

View File

@ -245,7 +245,7 @@ public:
void setName(const char* name)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mName = name;
setKey(name);
}
@ -254,13 +254,13 @@ public:
StatType<MemAccumulator::AllocationFacet>& allocations()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return static_cast<StatType<MemAccumulator::AllocationFacet>&>(*(StatType<MemAccumulator>*)this);
}
StatType<MemAccumulator::DeallocationFacet>& deallocations()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return static_cast<StatType<MemAccumulator::DeallocationFacet>&>(*(StatType<MemAccumulator>*)this);
}
};
@ -282,7 +282,7 @@ struct MeasureMem<T, typename T::mem_trackable_tag_t, IS_BYTES>
{
static size_t measureFootprint(const T& value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return sizeof(T) + value.getMemFootprint();
}
};
@ -292,7 +292,7 @@ struct MeasureMem<T, IS_MEM_TRACKABLE, typename T::is_unit_t>
{
static size_t measureFootprint(const T& value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return U32Bytes(value).value();
}
};
@ -302,7 +302,7 @@ struct MeasureMem<T*, IS_MEM_TRACKABLE, IS_BYTES>
{
static size_t measureFootprint(const T* value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
if (!value)
{
return 0;
@ -347,7 +347,7 @@ struct MeasureMem<std::basic_string<T>, IS_MEM_TRACKABLE, IS_BYTES>
{
static size_t measureFootprint(const std::basic_string<T>& value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return value.capacity() * sizeof(T);
}
};
@ -356,7 +356,7 @@ struct MeasureMem<std::basic_string<T>, IS_MEM_TRACKABLE, IS_BYTES>
template<typename T>
inline void claim_alloc(MemStatHandle& measurement, const T& value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
#if LL_TRACE_ENABLED
S32 size = MeasureMem<T>::measureFootprint(value);
if(size == 0) return;
@ -369,7 +369,7 @@ inline void claim_alloc(MemStatHandle& measurement, const T& value)
template<typename T>
inline void disclaim_alloc(MemStatHandle& measurement, const T& value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
#if LL_TRACE_ENABLED
S32 size = MeasureMem<T>::measureFootprint(value);
if(size == 0) return;

View File

@ -41,7 +41,7 @@ extern MemStatHandle gTraceMemStat;
AccumulatorBufferGroup::AccumulatorBufferGroup()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
claim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
claim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
claim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
@ -56,7 +56,7 @@ AccumulatorBufferGroup::AccumulatorBufferGroup(const AccumulatorBufferGroup& oth
mStackTimers(other.mStackTimers),
mMemStats(other.mMemStats)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
claim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
claim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
claim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
@ -66,7 +66,7 @@ AccumulatorBufferGroup::AccumulatorBufferGroup(const AccumulatorBufferGroup& oth
AccumulatorBufferGroup::~AccumulatorBufferGroup()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
disclaim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
disclaim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
disclaim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
@ -76,7 +76,7 @@ AccumulatorBufferGroup::~AccumulatorBufferGroup()
void AccumulatorBufferGroup::handOffTo(AccumulatorBufferGroup& other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
other.mCounts.reset(&mCounts);
other.mSamples.reset(&mSamples);
other.mEvents.reset(&mEvents);
@ -86,7 +86,7 @@ void AccumulatorBufferGroup::handOffTo(AccumulatorBufferGroup& other)
void AccumulatorBufferGroup::makeCurrent()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mCounts.makeCurrent();
mSamples.makeCurrent();
mEvents.makeCurrent();
@ -109,7 +109,7 @@ void AccumulatorBufferGroup::makeCurrent()
//static
void AccumulatorBufferGroup::clearCurrent()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
AccumulatorBuffer<CountAccumulator>::clearCurrent();
AccumulatorBuffer<SampleAccumulator>::clearCurrent();
AccumulatorBuffer<EventAccumulator>::clearCurrent();
@ -124,7 +124,7 @@ bool AccumulatorBufferGroup::isCurrent() const
void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mCounts.addSamples(other.mCounts, SEQUENTIAL);
mSamples.addSamples(other.mSamples, SEQUENTIAL);
mEvents.addSamples(other.mEvents, SEQUENTIAL);
@ -134,7 +134,7 @@ void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mCounts.addSamples(other.mCounts, NON_SEQUENTIAL);
mSamples.addSamples(other.mSamples, NON_SEQUENTIAL);
mEvents.addSamples(other.mEvents, NON_SEQUENTIAL);
@ -145,7 +145,7 @@ void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mCounts.reset(other ? &other->mCounts : NULL);
mSamples.reset(other ? &other->mSamples : NULL);
mEvents.reset(other ? &other->mEvents : NULL);
@ -155,7 +155,7 @@ void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other)
void AccumulatorBufferGroup::sync()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
if (isCurrent())
{
F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds();

View File

@ -66,7 +66,7 @@ namespace LLTrace
: mStorageSize(0),
mStorage(NULL)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
const AccumulatorBuffer& other = *getDefaultBuffer();
resize(sNextStorageSlot);
for (S32 i = 0; i < sNextStorageSlot; i++)
@ -77,7 +77,7 @@ namespace LLTrace
~AccumulatorBuffer()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
if (isCurrent())
{
LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
@ -100,7 +100,7 @@ namespace LLTrace
: mStorageSize(0),
mStorage(NULL)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
resize(sNextStorageSlot);
for (S32 i = 0; i < sNextStorageSlot; i++)
{
@ -110,7 +110,7 @@ namespace LLTrace
void addSamples(const AccumulatorBuffer<ACCUMULATOR>& other, EBufferAppendType append_type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize >= sNextStorageSlot);
for (size_t i = 0; i < sNextStorageSlot; i++)
{
@ -120,7 +120,7 @@ namespace LLTrace
void copyFrom(const AccumulatorBuffer<ACCUMULATOR>& other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize >= sNextStorageSlot);
for (size_t i = 0; i < sNextStorageSlot; i++)
{
@ -130,7 +130,7 @@ namespace LLTrace
void reset(const AccumulatorBuffer<ACCUMULATOR>* other = NULL)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
llassert(mStorageSize >= sNextStorageSlot);
for (size_t i = 0; i < sNextStorageSlot; i++)
{
@ -140,7 +140,7 @@ namespace LLTrace
void sync(F64SecondsImplicit time_stamp)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
llassert(mStorageSize >= sNextStorageSlot);
for (size_t i = 0; i < sNextStorageSlot; i++)
{
@ -166,7 +166,7 @@ namespace LLTrace
// NOTE: this is not thread-safe. We assume that slots are reserved in the main thread before any child threads are spawned
size_t reserveSlot()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
size_t next_slot = sNextStorageSlot++;
if (next_slot >= mStorageSize)
{
@ -180,7 +180,7 @@ namespace LLTrace
void resize(size_t new_size)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
if (new_size <= mStorageSize) return;
ACCUMULATOR* old_storage = mStorage;
@ -221,7 +221,7 @@ namespace LLTrace
static self_t* getDefaultBuffer()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
static bool sInitialized = false;
if (!sInitialized)
{
@ -336,7 +336,7 @@ namespace LLTrace
void sample(F64 value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds();
// store effect of last value
@ -550,7 +550,7 @@ namespace LLTrace
void addSamples(const MemAccumulator& other, EBufferAppendType append_type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mAllocations.addSamples(other.mAllocations, append_type);
mDeallocations.addSamples(other.mDeallocations, append_type);
@ -569,7 +569,7 @@ namespace LLTrace
void reset(const MemAccumulator* other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mSize.reset(other ? &other->mSize : NULL);
mAllocations.reset(other ? &other->mAllocations : NULL);
mDeallocations.reset(other ? &other->mDeallocations : NULL);

View File

@ -50,7 +50,7 @@ Recording::Recording(EPlayState state)
: mElapsedSeconds(0),
mActiveBuffers(NULL)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
claim_alloc(gTraceMemStat, this);
mBuffers = new AccumulatorBufferGroup();
claim_alloc(gTraceMemStat, mBuffers);
@ -60,14 +60,14 @@ Recording::Recording(EPlayState state)
Recording::Recording( const Recording& other )
: mActiveBuffers(NULL)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
claim_alloc(gTraceMemStat, this);
*this = other;
}
Recording& Recording::operator = (const Recording& other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
// this will allow us to seamlessly start without affecting any data we've acquired from other
setPlayState(PAUSED);
@ -88,7 +88,7 @@ Recording& Recording::operator = (const Recording& other)
Recording::~Recording()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
disclaim_alloc(gTraceMemStat, this);
disclaim_alloc(gTraceMemStat, mBuffers);
@ -107,7 +107,7 @@ void Recording::update()
#if LL_TRACE_ENABLED
if (isStarted())
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
// must have
@ -128,7 +128,7 @@ void Recording::update()
void Recording::handleReset()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
#if LL_TRACE_ENABLED
mBuffers.write()->reset();
@ -139,7 +139,7 @@ void Recording::handleReset()
void Recording::handleStart()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
#if LL_TRACE_ENABLED
mSamplingTimer.reset();
mBuffers.setStayUnique(true);
@ -151,7 +151,7 @@ void Recording::handleStart()
void Recording::handleStop()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
#if LL_TRACE_ENABLED
mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
// must have thread recorder running on this thread
@ -583,20 +583,20 @@ PeriodicRecording::PeriodicRecording( S32 num_periods, EPlayState state)
mNumRecordedPeriods(0),
mRecordingPeriods(num_periods ? num_periods : 1)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
setPlayState(state);
claim_alloc(gTraceMemStat, this);
}
PeriodicRecording::~PeriodicRecording()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
disclaim_alloc(gTraceMemStat, this);
}
void PeriodicRecording::nextPeriod()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
if (mAutoResize)
{
mRecordingPeriods.push_back(Recording());
@ -611,7 +611,7 @@ void PeriodicRecording::nextPeriod()
void PeriodicRecording::appendRecording(Recording& recording)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
getCurRecording().appendRecording(recording);
nextPeriod();
}
@ -619,7 +619,7 @@ void PeriodicRecording::appendRecording(Recording& recording)
void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
if (other.mRecordingPeriods.empty()) return;
getCurRecording().update();
@ -693,7 +693,7 @@ void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other )
F64Seconds PeriodicRecording::getDuration() const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
F64Seconds duration;
S32 num_periods = mRecordingPeriods.size();
for (S32 i = 1; i <= num_periods; i++)
@ -707,7 +707,7 @@ F64Seconds PeriodicRecording::getDuration() const
LLTrace::Recording PeriodicRecording::snapshotCurRecording() const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
Recording recording_copy(getCurRecording());
recording_copy.stop();
return recording_copy;
@ -750,19 +750,19 @@ const Recording& PeriodicRecording::getPrevRecording( S32 offset ) const
void PeriodicRecording::handleStart()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
getCurRecording().start();
}
void PeriodicRecording::handleStop()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
getCurRecording().pause();
}
void PeriodicRecording::handleReset()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
getCurRecording().stop();
if (mAutoResize)
@ -786,13 +786,13 @@ void PeriodicRecording::handleReset()
void PeriodicRecording::handleSplitTo(PeriodicRecording& other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
getCurRecording().splitTo(other.getCurRecording());
}
F64 PeriodicRecording::getPeriodMin( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
bool has_value = false;
@ -814,7 +814,7 @@ F64 PeriodicRecording::getPeriodMin( const StatType<EventAccumulator>& stat, S32
F64 PeriodicRecording::getPeriodMax( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
bool has_value = false;
@ -837,7 +837,7 @@ F64 PeriodicRecording::getPeriodMax( const StatType<EventAccumulator>& stat, S32
// calculates means using aggregates per period
F64 PeriodicRecording::getPeriodMean( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64 mean = 0;
@ -860,7 +860,7 @@ F64 PeriodicRecording::getPeriodMean( const StatType<EventAccumulator>& stat, S3
F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64 period_mean = getPeriodMean(stat, num_periods);
@ -885,7 +885,7 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<EventAccumulat
F64 PeriodicRecording::getPeriodMin( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
bool has_value = false;
@ -907,7 +907,7 @@ F64 PeriodicRecording::getPeriodMin( const StatType<SampleAccumulator>& stat, S3
F64 PeriodicRecording::getPeriodMax(const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
bool has_value = false;
@ -930,7 +930,7 @@ F64 PeriodicRecording::getPeriodMax(const StatType<SampleAccumulator>& stat, S32
F64 PeriodicRecording::getPeriodMean( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
S32 valid_period_count = 0;
@ -953,7 +953,7 @@ F64 PeriodicRecording::getPeriodMean( const StatType<SampleAccumulator>& stat, S
F64 PeriodicRecording::getPeriodMedian( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
std::vector<F64> buf;
@ -979,7 +979,7 @@ F64 PeriodicRecording::getPeriodMedian( const StatType<SampleAccumulator>& stat,
F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64 period_mean = getPeriodMean(stat, num_periods);
@ -1005,7 +1005,7 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<SampleAccumula
F64Kilobytes PeriodicRecording::getPeriodMin( const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64Kilobytes min_val(std::numeric_limits<F64>::max());
@ -1025,7 +1025,7 @@ F64Kilobytes PeriodicRecording::getPeriodMin(const MemStatHandle& stat, S32 num_
F64Kilobytes PeriodicRecording::getPeriodMax(const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64Kilobytes max_val(0.0);
@ -1045,7 +1045,7 @@ F64Kilobytes PeriodicRecording::getPeriodMax(const MemStatHandle& stat, S32 num_
F64Kilobytes PeriodicRecording::getPeriodMean( const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64Kilobytes mean(0);
@ -1066,7 +1066,7 @@ F64Kilobytes PeriodicRecording::getPeriodMean(const MemStatHandle& stat, S32 num
F64Kilobytes PeriodicRecording::getPeriodStandardDeviation( const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64Kilobytes period_mean = getPeriodMean(stat, num_periods);
@ -1100,7 +1100,7 @@ F64Kilobytes PeriodicRecording::getPeriodStandardDeviation(const MemStatHandle&
void ExtendableRecording::extend()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
// push the data back to accepted recording
mAcceptedRecording.appendRecording(mPotentialRecording);
// flush data, so we can start from scratch
@ -1109,26 +1109,26 @@ void ExtendableRecording::extend()
void ExtendableRecording::handleStart()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mPotentialRecording.start();
}
void ExtendableRecording::handleStop()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mPotentialRecording.pause();
}
void ExtendableRecording::handleReset()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mAcceptedRecording.reset();
mPotentialRecording.reset();
}
void ExtendableRecording::handleSplitTo(ExtendableRecording& other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mPotentialRecording.splitTo(other.mPotentialRecording);
}
@ -1145,7 +1145,7 @@ ExtendablePeriodicRecording::ExtendablePeriodicRecording()
void ExtendablePeriodicRecording::extend()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
// push the data back to accepted recording
mAcceptedRecording.appendPeriodicRecording(mPotentialRecording);
// flush data, so we can start from scratch
@ -1155,26 +1155,26 @@ void ExtendablePeriodicRecording::extend()
void ExtendablePeriodicRecording::handleStart()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mPotentialRecording.start();
}
void ExtendablePeriodicRecording::handleStop()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mPotentialRecording.pause();
}
void ExtendablePeriodicRecording::handleReset()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mAcceptedRecording.reset();
mPotentialRecording.reset();
}
void ExtendablePeriodicRecording::handleSplitTo(ExtendablePeriodicRecording& other)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
mPotentialRecording.splitTo(other.mPotentialRecording);
}
@ -1189,7 +1189,7 @@ PeriodicRecording& get_frame_recording()
void LLStopWatchControlsMixinCommon::start()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
switch (mPlayState)
{
case STOPPED:
@ -1211,7 +1211,7 @@ void LLStopWatchControlsMixinCommon::start()
void LLStopWatchControlsMixinCommon::stop()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
switch (mPlayState)
{
case STOPPED:
@ -1231,7 +1231,7 @@ void LLStopWatchControlsMixinCommon::stop()
void LLStopWatchControlsMixinCommon::pause()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
switch (mPlayState)
{
case STOPPED:
@ -1251,7 +1251,7 @@ void LLStopWatchControlsMixinCommon::pause()
void LLStopWatchControlsMixinCommon::unpause()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
switch (mPlayState)
{
case STOPPED:
@ -1271,7 +1271,7 @@ void LLStopWatchControlsMixinCommon::unpause()
void LLStopWatchControlsMixinCommon::resume()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
switch (mPlayState)
{
case STOPPED:
@ -1292,7 +1292,7 @@ void LLStopWatchControlsMixinCommon::resume()
void LLStopWatchControlsMixinCommon::restart()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
switch (mPlayState)
{
case STOPPED:
@ -1316,13 +1316,13 @@ void LLStopWatchControlsMixinCommon::restart()
void LLStopWatchControlsMixinCommon::reset()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
handleReset();
}
void LLStopWatchControlsMixinCommon::setPlayState( EPlayState state )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
switch(state)
{
case STOPPED:

View File

@ -355,7 +355,7 @@ namespace LLTrace
template <typename T>
S32 getSampleCount(const StatType<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
S32 num_samples = 0;
@ -375,7 +375,7 @@ namespace LLTrace
template <typename T>
typename T::value_t getPeriodMin(const StatType<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
bool has_value = false;
@ -398,7 +398,7 @@ namespace LLTrace
template<typename T>
T getPeriodMin(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return T(getPeriodMin(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
}
@ -406,7 +406,7 @@ namespace LLTrace
template<typename T>
T getPeriodMin(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return T(getPeriodMin(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
}
@ -414,7 +414,7 @@ namespace LLTrace
template<typename T>
T getPeriodMin(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return T(getPeriodMin(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
}
@ -424,7 +424,7 @@ namespace LLTrace
template <typename T>
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMinPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
typename RelatedTypes<typename T::value_t>::fractional_t min_val(std::numeric_limits<F64>::max());
@ -439,7 +439,7 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodMinPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodMinPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
}
@ -451,7 +451,7 @@ namespace LLTrace
template <typename T>
typename T::value_t getPeriodMax(const StatType<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
bool has_value = false;
@ -474,7 +474,7 @@ namespace LLTrace
template<typename T>
T getPeriodMax(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return T(getPeriodMax(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
}
@ -482,7 +482,7 @@ namespace LLTrace
template<typename T>
T getPeriodMax(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return T(getPeriodMax(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
}
@ -490,7 +490,7 @@ namespace LLTrace
template<typename T>
T getPeriodMax(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return T(getPeriodMax(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
}
@ -500,7 +500,7 @@ namespace LLTrace
template <typename T>
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMaxPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
F64 max_val = std::numeric_limits<F64>::min();
@ -515,7 +515,7 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodMaxPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodMaxPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
}
@ -527,7 +527,7 @@ namespace LLTrace
template <typename T>
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMean(const StatType<T >& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
typename RelatedTypes<typename T::value_t>::fractional_t mean(0);
@ -548,14 +548,14 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodMean(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
}
F64 getPeriodMean(const StatType<SampleAccumulator>& stat, S32 num_periods = S32_MAX);
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodMean(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
}
@ -563,7 +563,7 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodMean(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
}
@ -573,7 +573,7 @@ namespace LLTrace
template <typename T>
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMeanPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
typename RelatedTypes<typename T::value_t>::fractional_t mean = 0;
@ -595,7 +595,7 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodMeanPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodMeanPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
}
@ -604,7 +604,7 @@ namespace LLTrace
template <typename T>
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMedianPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
num_periods = llmin(num_periods, getNumRecordedPeriods());
std::vector <typename RelatedTypes<typename T::value_t>::fractional_t> buf;
@ -624,7 +624,7 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodMedianPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodMedianPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
}
@ -637,7 +637,7 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
}
@ -645,7 +645,7 @@ namespace LLTrace
template<typename T>
typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
}

View File

@ -277,7 +277,7 @@ void ThreadRecorder::pushToParent()
void ThreadRecorder::pullFromChildren()
{
#if LL_TRACE_ENABLED
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
if (mActiveRecordings.empty()) return;
{ LLMutexLock lock(&mChildListMutex);

View File

@ -98,14 +98,14 @@ namespace LL
// we could minimize redundancy by breaking out a common base class...
void push(const DataTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
push(tuple_cons(Clock::now(), tuple));
}
/// individually pass each component of the TimeTuple
void push(const TimePoint& time, Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
push(TimeTuple(time, std::forward<Args>(args)...));
}
@ -116,7 +116,7 @@ namespace LL
// and call that overload.
void push(Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
push(Clock::now(), std::forward<Args>(args)...);
}
@ -127,21 +127,21 @@ namespace LL
/// DataTuple with implicit now
bool tryPush(const DataTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPush(tuple_cons(Clock::now(), tuple));
}
/// individually pass components
bool tryPush(const TimePoint& time, Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPush(TimeTuple(time, std::forward<Args>(args)...));
}
/// individually pass components with implicit now
bool tryPush(Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPush(Clock::now(), std::forward<Args>(args)...);
}
@ -154,7 +154,7 @@ namespace LL
bool tryPushFor(const std::chrono::duration<Rep, Period>& timeout,
const DataTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPushFor(timeout, tuple_cons(Clock::now(), tuple));
}
@ -163,7 +163,7 @@ namespace LL
bool tryPushFor(const std::chrono::duration<Rep, Period>& timeout,
const TimePoint& time, Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPushFor(TimeTuple(time, std::forward<Args>(args)...));
}
@ -172,7 +172,7 @@ namespace LL
bool tryPushFor(const std::chrono::duration<Rep, Period>& timeout,
Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPushFor(Clock::now(), std::forward<Args>(args)...);
}
@ -185,7 +185,7 @@ namespace LL
bool tryPushUntil(const std::chrono::time_point<Clock, Duration>& until,
const DataTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPushUntil(until, tuple_cons(Clock::now(), tuple));
}
@ -194,7 +194,7 @@ namespace LL
bool tryPushUntil(const std::chrono::time_point<Clock, Duration>& until,
const TimePoint& time, Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPushUntil(until, TimeTuple(time, std::forward<Args>(args)...));
}
@ -203,7 +203,7 @@ namespace LL
bool tryPushUntil(const std::chrono::time_point<Clock, Duration>& until,
Args&&... args)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tryPushUntil(until, Clock::now(), std::forward<Args>(args)...);
}
@ -221,14 +221,14 @@ namespace LL
// haven't yet jumped through those hoops.
DataTuple pop()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
return tuple_cdr(popWithTime());
}
/// pop TimeTuple by value
TimeTuple popWithTime()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
lock_t lock(super::mLock);
// We can't just sit around waiting forever, given that there may
// be items in the queue that are not yet ready but will *become*
@ -268,7 +268,7 @@ namespace LL
/// tryPop(DataTuple&)
bool tryPop(DataTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
TimeTuple tt;
if (! super::tryPop(tt))
return false;
@ -279,7 +279,7 @@ namespace LL
/// for when Args has exactly one type
bool tryPop(typename std::tuple_element<1, TimeTuple>::type& value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
TimeTuple tt;
if (! super::tryPop(tt))
return false;
@ -291,7 +291,7 @@ namespace LL
template <typename Rep, typename Period, typename Tuple>
bool tryPopFor(const std::chrono::duration<Rep, Period>& timeout, Tuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// It's important to use OUR tryPopUntil() implementation, rather
// than delegating immediately to our base class.
return tryPopUntil(Clock::now() + timeout, tuple);
@ -302,7 +302,7 @@ namespace LL
bool tryPopUntil(const std::chrono::time_point<Clock, Duration>& until,
TimeTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// super::tryPopUntil() wakes up when an item becomes available or
// we hit 'until', whichever comes first. Thing is, the current
// head of the queue could become ready sooner than either of
@ -322,7 +322,7 @@ namespace LL
pop_result tryPopUntil_(lock_t& lock, const TimePoint& until, TimeTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
TimePoint adjusted = until;
if (! super::mStorage.empty())
{
@ -350,7 +350,7 @@ namespace LL
bool tryPopUntil(const std::chrono::time_point<Clock, Duration>& until,
DataTuple& tuple)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
TimeTuple tt;
if (! tryPopUntil(until, tt))
return false;
@ -363,7 +363,7 @@ namespace LL
bool tryPopUntil(const std::chrono::time_point<Clock, Duration>& until,
typename std::tuple_element<1, TimeTuple>::type& value)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
TimeTuple tt;
if (! tryPopUntil(until, tt))
return false;
@ -387,7 +387,7 @@ namespace LL
// considering whether to deliver the current head element
bool canPop(const TimeTuple& head) const override
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// an item with a future timestamp isn't yet ready to pop
// (should we add some slop for overhead?)
return std::get<0>(head) <= Clock::now();

View File

@ -60,7 +60,7 @@ void LL::WorkQueue::runUntilClose()
{
for (;;)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
callWork(mQueue.pop());
}
}
@ -71,7 +71,7 @@ void LL::WorkQueue::runUntilClose()
bool LL::WorkQueue::runPending()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
for (Work work; mQueue.tryPop(work); )
{
callWork(work);
@ -91,7 +91,7 @@ bool LL::WorkQueue::runOne()
bool LL::WorkQueue::runUntil(const TimePoint& until)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
// Should we subtract some slop to allow for typical Work execution time?
// How much slop?
// runUntil() is simply a time-bounded runPending().
@ -129,7 +129,7 @@ void LL::WorkQueue::callWork(const Queue::DataTuple& work)
void LL::WorkQueue::callWork(const Work& work)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
try
{
work();

View File

@ -134,7 +134,7 @@ LLImageDecodeThread::~LLImageDecodeThread()
// virtual
S32 LLImageDecodeThread::update(F32 max_time_ms)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLMutexLock lock(mCreationMutex);
// <FS:Beq> instrument image decodes
{
@ -173,7 +173,7 @@ S32 LLImageDecodeThread::update(F32 max_time_ms)
LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted* image,
U32 priority, S32 discard, BOOL needs_aux, Responder* responder)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// <FS:Beq> De-couple texture threading from mainloop
// LLMutexLock lock(mCreationMutex);
// handle_t handle = generateHandle();
@ -269,7 +269,7 @@ bool LLImageDecodeThread::ImageRequest::processRequestIntern()
{
// <FS:Beq> allow longer timeout for async and add instrumentation
// const F32 decode_time_slice = .1f;
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
F32 decode_time_slice = .1f;
if(mFlags & FLAG_ASYNC)
{
@ -349,7 +349,7 @@ bool LLImageDecodeThread::ImageRequest::processRequestIntern()
void LLImageDecodeThread::ImageRequest::finishRequest(bool completed)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (mResponder.notNull())
{
bool success = completed && mDecodedRaw && (!mNeedsAux || mDecodedAux);

View File

@ -683,7 +683,7 @@ bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, U32, S32 length)
//=========================================================================
void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
F64 res = setBlendFactor(blendf);
llassert(res >= 0.0 && res <= 1.0);
(void)res;
@ -714,7 +714,7 @@ F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_
void LLSettingsBlender::triggerComplete()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
if (mTarget)
mTarget->replaceSettings(mFinal->getSettings());
LLSettingsBlender::ptr_t hold = shared_from_this(); // prevents this from deleting too soon
@ -727,13 +727,13 @@ const LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::MIN_BLEND_DELTA(FL
LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::calculateBlend(const LLSettingsBase::TrackPosition& spanpos, const LLSettingsBase::TrackPosition& spanlen) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
return LLSettingsBase::BlendFactor(fmod((F64)spanpos, (F64)spanlen) / (F64)spanlen);
}
bool LLSettingsBlenderTimeDelta::applyTimeDelta(const LLSettingsBase::Seconds& timedelta)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
mTimeSpent += timedelta;
if (mTimeSpent > mBlendSpan)

View File

@ -443,7 +443,7 @@ void LLSettingsSky::replaceWithSky(LLSettingsSky::ptr_t pother)
void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
llassert(getSettingsType() == end->getSettingsType());
LLSettingsSky::ptr_t other = PTR_NAMESPACE::dynamic_pointer_cast<LLSettingsSky>(end);
@ -939,7 +939,7 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
void LLSettingsSky::updateSettings()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
// base class clears dirty flag so as to not trigger recursive update
LLSettingsBase::updateSettings();
@ -1022,7 +1022,7 @@ LLColor3 LLSettingsSky::getLightDiffuse() const
LLColor3 LLSettingsSky::getColor(const std::string& key, const LLColor3& default_value) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(key))
{
return LLColor3(mSettings[SETTING_LEGACY_HAZE][key]);
@ -1036,7 +1036,7 @@ LLColor3 LLSettingsSky::getColor(const std::string& key, const LLColor3& default
F32 LLSettingsSky::getFloat(const std::string& key, F32 default_value) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(key))
{
return mSettings[SETTING_LEGACY_HAZE][key].asReal();

View File

@ -287,7 +287,7 @@ void transfer_bytes(kdu_byte *dest, kdu_line_buf &src, int gap, int precision);
// as well, when that still existed, with keep_codestream true and MODE_FAST.
void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, bool keep_codestream, ECodeStreamMode mode)
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq> instrument image decodes
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // <FS:Beq> instrument image decodes
S32 data_size = base.getDataSize();
S32 max_bytes = (base.getMaxBytes() ? base.getMaxBytes() : data_size);
@ -442,7 +442,7 @@ bool LLImageJ2CKDU::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int bloc
// decodeImpl() usage matters for production.
bool LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count, int discard_level, int* region)
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq> instrument image decodes
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // <FS:Beq> instrument image decodes
base.resetLastError();
// *FIX: kdu calls our callback function if there's an error, and then bombs.
@ -526,7 +526,7 @@ bool LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco
// Returns true to mean done, whether successful or not.
bool LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count)
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq> instrument image decodes
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // <FS:Beq> instrument image decodes
ECodeStreamMode mode = MODE_FAST;
LLTimer decode_timer;

View File

@ -36,6 +36,9 @@
#define OCT_ERRS LL_WARNS("OctreeErrors")
#define OCTREE_DEBUG_COLOR_REMOVE 0x0000FF // r
#define OCTREE_DEBUG_COLOR_INSERT 0x00FF00 // g
#define OCTREE_DEBUG_COLOR_BALANCE 0xFF0000 // b
extern U32 gOctreeMaxCapacity;
extern float gOctreeMinSize;
@ -94,10 +97,15 @@ public:
typedef LLOctreeNode<T> oct_node;
typedef LLOctreeListener<T> oct_listener;
enum
{
NO_CHILD_NODES = 255 // Note: This is an U8 to match the max value in mChildMap[]
};
LLOctreeNode( const LLVector4a& center,
const LLVector4a& size,
BaseType* parent,
U8 octant = 255)
U8 octant = NO_CHILD_NODES)
: mParent((oct_node*)parent),
mOctant(octant)
{
@ -110,7 +118,7 @@ public:
mSize = size;
updateMinMax();
if ((mOctant == 255) && mParent)
if ((mOctant == NO_CHILD_NODES) && mParent)
{
mOctant = ((oct_node*) mParent)->getOctant(mCenter);
ND_OCTREE_LOG << "set octant to " << (U32)mOctant << " mCenter " << mCenter << " mParent->mCenter " << mParent->mCenter << ND_OCTREE_LOG_END;
@ -121,9 +129,9 @@ public:
clearChildren();
}
virtual ~LLOctreeNode()
virtual ~LLOctreeNode()
{
BaseType::destroyListeners();
BaseType::destroyListeners();
for (U32 i = 0; i < mElementCount; ++i)
{
@ -162,7 +170,7 @@ public:
return rad <= mSize[0]*2.f && isInside(pos);
}
inline bool isInside(T* data) const
inline bool isInside(T* data) const
{
return isInside(data->getPositionGroup(), data->getBinRadius());
}
@ -256,7 +264,7 @@ public:
for (U32 i = 0; i < 8; i++)
{
U8 idx = mChildMap[i];
if (idx != 255)
if (idx != NO_CHILD_NODES)
{
LLOctreeNode<T>* child = mChild[idx];
@ -279,7 +287,7 @@ public:
LLOctreeNode<T>* node = this;
if (node->isInside(pos, rad))
{
{
//do a quick search by octant
U8 octant = node->getOctant(pos);
@ -289,7 +297,7 @@ public:
// the data
U8 next_node = node->mChildMap[octant];
while (next_node != 255 && node->getSize()[0] >= rad)
while (next_node != NO_CHILD_NODES && node->getSize()[0] >= rad)
{
node = node->getChild(next_node);
octant = node->getOctant(pos);
@ -306,6 +314,8 @@ public:
virtual bool insert(T* data)
{
//LL_PROFILE_ZONE_NAMED_COLOR("Octree::insert()",OCTREE_DEBUG_COLOR_INSERT);
if (data == NULL || data->getBinIndex() != -1)
{
OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << LL_ENDL;
@ -482,6 +492,8 @@ public:
bool remove(T* data)
{
//LL_PROFILE_ZONE_NAMED_COLOR("Octree::remove()", OCTREE_DEBUG_COLOR_REMOVE);
S32 i = data->getBinIndex();
if (i >= 0 && i < mElementCount)
@ -547,9 +559,7 @@ public:
void clearChildren()
{
mChildCount = 0;
U32* foo = (U32*) mChildMap;
foo[0] = foo[1] = 0xFFFFFFFF;
memset(mChildMap, NO_CHILD_NODES, sizeof(mChildMap));
}
void validate()
@ -644,11 +654,9 @@ public:
--mChildCount;
mChild[index] = mChild[mChildCount];
//rebuild child map
U32* foo = (U32*) mChildMap;
foo[0] = foo[1] = 0xFFFFFFFF;
memset(mChildMap, NO_CHILD_NODES, sizeof(mChildMap));
for (U32 i = 0; i < mChildCount; ++i)
{
@ -684,7 +692,7 @@ public:
OCT_ERRS << "Octree failed to delete requested child." << LL_ENDL;
}
protected:
protected:
typedef enum
{
CENTER = 0,
@ -708,7 +716,6 @@ protected:
element_list mData;
element_iter mDataEnd;
U32 mElementCount;
};
//just like a regular node, except it might expand on insert and compress on balance
@ -717,7 +724,7 @@ class LLOctreeRoot : public LLOctreeNode<T>
{
public:
typedef LLOctreeNode<T> BaseType;
typedef LLOctreeNode<T> oct_node;
typedef LLOctreeNode<T> oct_node;
LLOctreeRoot(const LLVector4a& center,
const LLVector4a& size,
@ -728,9 +735,11 @@ public:
bool balance()
{
//LL_PROFILE_ZONE_NAMED_COLOR("Octree::balance()",OCTREE_DEBUG_COLOR_BALANCE);
if (this->getChildCount() == 1 &&
!(this->mChild[0]->isLeaf()) &&
this->mChild[0]->getElementCount() == 0)
this->mChild[0]->getElementCount() == 0)
{ //if we have only one child and that child is an empty branch, make that child the root
oct_node* child = this->mChild[0];

View File

@ -400,7 +400,7 @@ public:
virtual void visit(const LLOctreeNode<LLVolumeTriangle>* branch)
{ //this is a depth first traversal, so it's safe to assum all children have complete
//bounding data
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
LLVolumeOctreeListener* node = (LLVolumeOctreeListener*) branch->getListener(0);
@ -844,7 +844,7 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de
BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if ((!mDirty) && (!is_sculpted))
{
@ -1326,7 +1326,7 @@ S32 LLPath::getNumNGonPoints(const LLPathParams& params, S32 sides, F32 startOff
void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 end_scale, F32 twist_scale)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
// Generates a circular path, starting at (1, 0, 0), counterclockwise along the xz plane.
static const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f };
@ -1562,7 +1562,7 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if ((!mDirty) && (!is_sculpted))
{
@ -2143,7 +2143,7 @@ LLVolume::~LLVolume()
BOOL LLVolume::generate()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
LL_CHECK_MEMORY
llassert_always(mProfilep);
@ -2403,7 +2403,7 @@ bool LLVolumeFace::VertexData::compareNormal(const LLVolumeFace::VertexData& rhs
bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
//input stream is now pointing at a zlib compressed block of LLSD
//decompress block
@ -2810,7 +2810,7 @@ S32 LLVolume::getNumFaces() const
void LLVolume::createVolumeFaces()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if (mGenerateSingleFace)
{
@ -3806,7 +3806,7 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
const LLMatrix3& norm_mat_in,
S32 face_mask)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
LLMatrix4a mat;
mat.loadu(mat_in);
@ -4934,7 +4934,7 @@ void LLVolumeFace::freeData()
BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
//tree for this face is no longer valid
delete mOctree;
@ -5614,7 +5614,7 @@ bool LLVolumeFace::cacheOptimize()
void LLVolumeFace::createOctree(F32 scaler, const LLVector4a& center, const LLVector4a& size)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if (mOctree)
{
@ -6399,7 +6399,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
void LLVolumeFace::createTangents()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if (!mTangents)
{
@ -6596,7 +6596,7 @@ void LLVolumeFace::fillFromLegacyData(std::vector<LLVolumeFace::VertexData>& v,
BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
LL_CHECK_MEMORY
BOOL flat = mTypeMask & FLAT_MASK;
@ -7090,7 +7090,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVector4a *normal,
const LLVector2 *texcoord, U32 triangleCount, const U16* index_array, LLVector4a *tangent)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
//LLVector4a *tan1 = new LLVector4a[vertexCount * 2];
LLVector4a* tan1 = (LLVector4a*) ll_aligned_malloc_16(vertexCount*2*sizeof(LLVector4a));

View File

@ -428,7 +428,7 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t
//timeout is in microseconds
void LLPumpIO::pump(const S32& poll_timeout)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
//LL_INFOS() << "LLPumpIO::pump()" << LL_ENDL;
// Run any pending runners.
@ -506,7 +506,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
S32 count = 0;
S32 client_id = 0;
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd);
}
PUMP_DEBUG;
@ -736,7 +736,7 @@ bool LLPumpIO::respond(
void LLPumpIO::callback()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
//LL_INFOS() << "LLPumpIO::callback()" << LL_ENDL;
if(true)
{

View File

@ -145,7 +145,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if(!sDisplayFont) //do not display texts
{
@ -573,7 +573,7 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars
void LLFontGL::generateASCIIglyphs()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
for (U32 i = 32; (i < 127); i++)
{
mFontFreetype->getGlyphInfo(i);
@ -583,7 +583,7 @@ void LLFontGL::generateASCIIglyphs()
// Returns the max number of complete characters from text (up to max_chars) that can be drawn in max_pixels
S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_chars, EWordWrapStyle end_on_word_boundary) const
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
if (!wchars || !wchars[0] || max_chars == 0)
{
return 0;
@ -904,7 +904,7 @@ void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::st
// static
bool LLFontGL::loadDefaultFonts()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
bool succ = true;
succ &= (NULL != getFontSansSerifSmall());
succ &= (NULL != getFontSansSerif());
@ -921,7 +921,7 @@ bool LLFontGL::loadDefaultFonts()
void LLFontGL::loadCommonFonts()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
getFont(LLFontDescriptor("SansSerif", "Small", BOLD));
getFont(LLFontDescriptor("SansSerif", "Large", BOLD));
getFont(LLFontDescriptor("SansSerif", "Huge", BOLD));

View File

@ -1873,7 +1873,7 @@ void LLGLState::checkTextureChannels(const std::string& msg)
LLGLState::LLGLState(LLGLenum state, S32 enabled) :
mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
switch (state)
{
case GL_ALPHA_TEST:
@ -1930,7 +1930,7 @@ void LLGLState::setEnabled(S32 enabled)
LLGLState::~LLGLState()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
stop_glerror();
if (mState)
{
@ -2189,7 +2189,7 @@ void LLGLNamePool::cleanup()
GLuint LLGLNamePool::allocate()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
#if LL_GL_NAME_POOLING
for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter)
{

View File

@ -207,7 +207,7 @@ void LLGLSLShader::dumpStats()
//static
void LLGLSLShader::startProfile()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (sProfileEnabled && sCurBoundShaderPtr)
{
sCurBoundShaderPtr->placeProfileQuery();
@ -218,7 +218,7 @@ void LLGLSLShader::startProfile()
//static
void LLGLSLShader::stopProfile(U32 count, U32 mode)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (sProfileEnabled && sCurBoundShaderPtr)
{
sCurBoundShaderPtr->readProfileQuery(count, mode);
@ -393,7 +393,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
U32 varying_count,
const char** varyings)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
unloadInternal();
@ -599,7 +599,7 @@ void LLGLSLShader::attachObjects(GLhandleARB* objects, S32 count)
BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attributes)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
//before linking, make sure reserved attributes always have consistent locations
for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++)
@ -662,7 +662,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri
void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * uniforms)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (index == -1)
{
@ -785,7 +785,7 @@ void LLGLSLShader::removePermutation(std::string name)
GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if ((type >= GL_SAMPLER_1D_ARB && type <= GL_SAMPLER_2D_RECT_SHADOW_ARB) ||
type == GL_SAMPLER_2D_MULTISAMPLE)
@ -799,7 +799,7 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type)
BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
BOOL res = TRUE;
@ -944,7 +944,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
BOOL LLGLSLShader::link(BOOL suppress_errors)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
BOOL success = LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
@ -958,7 +958,7 @@ BOOL LLGLSLShader::link(BOOL suppress_errors)
void LLGLSLShader::bind()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
gGL.flush();
@ -992,7 +992,7 @@ void LLGLSLShader::bind(bool rigged)
void LLGLSLShader::unbind()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
gGL.flush();
stop_glerror();
@ -1005,7 +1005,7 @@ void LLGLSLShader::unbind()
void LLGLSLShader::bindNoShader(void)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
LLVertexBuffer::unbind();
glUseProgramObjectARB(0);
@ -1015,7 +1015,7 @@ void LLGLSLShader::bindNoShader(void)
S32 LLGLSLShader::bindTexture(const std::string &uniform, LLTexture *texture, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace colorspace)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
S32 channel = 0;
channel = getUniformLocation(uniform);
@ -1025,7 +1025,7 @@ S32 LLGLSLShader::bindTexture(const std::string &uniform, LLTexture *texture, LL
S32 LLGLSLShader::bindTexture(S32 uniform, LLTexture *texture, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace colorspace)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (uniform < 0 || uniform >= (S32)mTexture.size())
{
@ -1046,7 +1046,7 @@ S32 LLGLSLShader::bindTexture(S32 uniform, LLTexture *texture, LLTexUnit::eTextu
S32 LLGLSLShader::unbindTexture(const std::string &uniform, LLTexUnit::eTextureType mode)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
S32 channel = 0;
channel = getUniformLocation(uniform);
@ -1056,7 +1056,7 @@ S32 LLGLSLShader::unbindTexture(const std::string &uniform, LLTexUnit::eTextureT
S32 LLGLSLShader::unbindTexture(S32 uniform, LLTexUnit::eTextureType mode)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (uniform < 0 || uniform >= (S32)mTexture.size())
{
@ -1076,7 +1076,7 @@ S32 LLGLSLShader::unbindTexture(S32 uniform, LLTexUnit::eTextureType mode)
S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace space)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (uniform < 0 || uniform >= (S32)mTexture.size())
{
@ -1095,7 +1095,7 @@ S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTex
S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace space)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (uniform < 0 || uniform >= (S32)mTexture.size())
{
@ -1124,7 +1124,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTe
void LLGLSLShader::uniform1i(U32 index, GLint x)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER
if (mProgramObject)
{
if (mUniform.size() <= index)
@ -1147,7 +1147,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x)
void LLGLSLShader::uniform1f(U32 index, GLfloat x)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER
if (mProgramObject)
{
if (mUniform.size() <= index)
@ -1345,7 +1345,7 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
LLVector4 vec(v[0],v[1],v[2],v[3]);
if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
glUniform4fvARB(mUniform[index], count, v);
mValue[mUniform[index]] = vec;
}
@ -1389,7 +1389,7 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c
void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (mProgramObject)
{
@ -1425,7 +1425,7 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c
GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
GLint ret = -1;
if (mProgramObject)
@ -1451,7 +1451,7 @@ GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
GLint LLGLSLShader::getUniformLocation(U32 index)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
GLint ret = -1;
if (mProgramObject)
@ -1469,7 +1469,7 @@ GLint LLGLSLShader::getUniformLocation(U32 index)
GLint LLGLSLShader::getAttribLocation(U32 attrib)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
if (attrib < mAttribute.size())
{
@ -1621,7 +1621,7 @@ void LLGLSLShader::uniform4fv(const LLStaticHashedString& uniform, U32 count, co
const auto& iter = mValue.find(location);
if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
glUniform4fvARB(location, count, v);
mValue[location] = vec;
}
@ -1665,7 +1665,7 @@ void LLGLSLShader::setMinimumAlpha(F32 minimum)
void LLShaderUniforms::apply(LLGLSLShader* shader)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
for (auto& uniform : mIntegers)
{
shader->uniform1i(uniform.mUniform, uniform.mValue);

View File

@ -262,7 +262,7 @@ LLTexUnit::eTextureType LLGLTexture::getTarget(void) const
BOOL LLGLTexture::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
llassert(mGLTexturep.notNull()) ;
return mGLTexturep->setSubImage(imageraw, x_pos, y_pos, width, height) ;
@ -270,7 +270,7 @@ BOOL LLGLTexture::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos,
BOOL LLGLTexture::setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
llassert(mGLTexturep.notNull()) ;
return mGLTexturep->setSubImage(datap, data_width, data_height, x_pos, y_pos, width, height) ;

View File

@ -186,7 +186,7 @@ BOOL is_little_endian()
//static
void LLImageGL::initClass(LLWindow* window, S32 num_catagories, BOOL skip_analyze_alpha /* = false */, bool multi_threaded /* = false */)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
sSkipAnalyzeAlpha = skip_analyze_alpha;
if (multi_threaded)
@ -198,7 +198,7 @@ void LLImageGL::initClass(LLWindow* window, S32 num_catagories, BOOL skip_analyz
//static
void LLImageGL::cleanupClass()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLImageGLThread::deleteSingleton();
}
@ -282,7 +282,7 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
// static
void LLImageGL::updateStats(F32 current_time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
sLastFrameTime = current_time;
sBoundTextureMemory = sCurBoundTextureMemory;
sCurBoundTextureMemory = S32Bytes(0);
@ -674,7 +674,7 @@ void LLImageGL::setExplicitFormat( LLGLint internal_format, LLGLenum primary_for
void LLImageGL::setImage(const LLImageRaw* imageraw)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
llassert((imageraw->getWidth() == getWidth(mCurrentDiscardLevel)) &&
(imageraw->getHeight() == getHeight(mCurrentDiscardLevel)) &&
(imageraw->getComponents() == getComponents()));
@ -684,7 +684,7 @@ void LLImageGL::setImage(const LLImageRaw* imageraw)
BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips, S32 usename)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
bool is_compressed = false;
switch (mFormatPrimary)
@ -1079,7 +1079,7 @@ void LLImageGL::postAddToAtlas()
BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (!width || !height)
{
return TRUE;
@ -1176,7 +1176,7 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
BOOL LLImageGL::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
return setSubImage(imageraw->getData(), imageraw->getWidth(), imageraw->getHeight(), x_pos, y_pos, width, height, force_fast_update);
}
@ -1199,7 +1199,7 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_
// static
void LLImageGL::generateTextures(S32 numTextures, U32 *textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
glGenTextures(numTextures, textures);
}
@ -1215,7 +1215,7 @@ void LLImageGL::deleteTextures(S32 numTextures, const U32 *textures)
// static
void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void* pixels, bool allow_compression)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
bool use_scratch = false;
U32* scratch = NULL;
if (LLRender::sGLCoreProfile)
@ -1317,7 +1317,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
stop_glerror();
{
LL_PROFILE_ZONE_NAMED("glTexImage2D");
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("glTexImage2D");
glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, use_scratch ? scratch : pixels);
}
stop_glerror();
@ -1332,7 +1332,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
//the texture is assiciate with some image by calling glTexImage outside LLImageGL
BOOL LLImageGL::createGLTexture()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
checkActiveThread();
if (gGLManager.mIsDisabled)
@ -1366,7 +1366,7 @@ BOOL LLImageGL::createGLTexture()
BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
checkActiveThread();
if (gGLManager.mIsDisabled)
@ -1481,7 +1481,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
checkActiveThread();
llassert(data_in);
@ -1545,7 +1545,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
if (! on_main_thread())
{
{
LL_PROFILE_ZONE_NAMED("cglt - sync");
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("cglt - sync");
if (gGLManager.mHasSync)
{
auto sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
@ -1563,7 +1563,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
mMainQueue,
[=]()
{
LL_PROFILE_ZONE_NAMED("cglt - delete callback");
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("cglt - delete callback");
if (old_texname != 0)
{
LLImageGL::deleteTextures(1, &old_texname);
@ -2275,7 +2275,7 @@ LLImageGLThread::LLImageGLThread(LLWindow* window)
: ThreadPool("LLImageGL", 1, 1024*1024)
, mWindow(window)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
sEnabled = true;
mFinished = false;
@ -2285,7 +2285,7 @@ LLImageGLThread::LLImageGLThread(LLWindow* window)
void LLImageGLThread::run()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// We must perform setup on this thread before actually servicing our
// WorkQueue, likewise cleanup afterwards.
mWindow->makeContextCurrent(mContext);

View File

@ -184,7 +184,7 @@ void LLTexUnit::bindFast(LLTexture* texture)
mCurrTexture = gl_tex->getTexName();
if (!mCurrTexture)
{
LL_PROFILE_ZONE_NAMED("MISSING TEXTURE");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("MISSING TEXTURE");
//if deleted, will re-generate it immediately
texture->forceImmediateUpdate();
gl_tex->forceUpdateBindStats();
@ -196,7 +196,7 @@ void LLTexUnit::bindFast(LLTexture* texture)
bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
stop_glerror();
if (mIndex >= 0)
{
@ -1528,7 +1528,7 @@ LLLightState* LLRender::getLight(U32 index)
void LLRender::setAmbientLightColor(const LLColor4& color)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE
if (color != mAmbientLightColor)
{
++mLightHash;
@ -1628,7 +1628,7 @@ void LLRender::flush()
{
if (mCount > 0)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (!mUIOffset.empty())
{
sUICalls++;

View File

@ -1213,7 +1213,7 @@ void gl_segmented_rect_2d_tex(const S32 left,
const S32 border_size,
const U32 edges)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
S32 width = llabs(right - left);
S32 height = llabs(top - bottom);
@ -1447,7 +1447,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
const F32 end_fragment,
const U32 edges)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
const S32 left = rect.mLeft;
const S32 right = rect.mRight;
const S32 top = rect.mTop;
@ -1709,7 +1709,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect,
const LLVector3& width_vec, const LLVector3& height_vec)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
// <FS:Ansariel> Remove QUADS rendering mode
//gGL.begin(LLRender::QUADS);

View File

@ -122,7 +122,7 @@ bool LLVertexBuffer::sPreferStreamDraw = false;
U32 LLVBOPool::genBuffer()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
if (sNameIdx == 0)
{
@ -135,7 +135,7 @@ U32 LLVBOPool::genBuffer()
void LLVBOPool::deleteBuffer(U32 name)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
if (gGLManager.mInited)
{
LLVertexBuffer::unbind();
@ -158,7 +158,7 @@ LLVBOPool::LLVBOPool(U32 vboUsage, U32 vboType)
U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
llassert(vbo_block_size(size) == size);
U8* ret = NULL;
@ -274,12 +274,12 @@ void LLVBOPool::release(U32 name, U8* buffer, U32 size)
void LLVBOPool::seedPool()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
U32 dummy_name = 0;
if (mFreeList.size() < LL_VBO_POOL_SEED_COUNT)
{
LL_PROFILE_ZONE_NAMED("VBOPool Resize");
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("VBOPool Resize");
mFreeList.resize(LL_VBO_POOL_SEED_COUNT);
}
@ -420,7 +420,7 @@ void LLVertexBuffer::releaseVAOName(U32 name)
//static
void LLVertexBuffer::seedPools()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX
sStreamVBOPool.seedPool();
sDynamicVBOPool.seedPool();
sDynamicCopyVBOPool.seedPool();
@ -469,7 +469,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
//static
void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
gGL.begin(mode);
for (auto& v : pos)
{
@ -482,7 +482,7 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos)
//static
void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
llassert(LLGLSLShader::sCurBoundShaderPtr != NULL);
// <FS:Beq> FIRE-29679 trap empty calls that cause crashes when rezzing in OpenSim.
@ -714,7 +714,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
llassert(LLGLSLShader::sCurBoundShaderPtr != NULL);
mMappable = false;
gGL.syncMatrices();
@ -1272,7 +1272,7 @@ void LLVertexBuffer::setupVertexArray()
return;
}
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
#if GL_ARB_vertex_array_object
glBindVertexArray(mGLArray);
#endif
@ -1449,7 +1449,7 @@ bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count)
// Map for data access
U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
bindGLBuffer(true);
if (mFinal)
{
@ -1626,7 +1626,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
bindGLIndices(true);
if (mFinal)
{
@ -1793,10 +1793,10 @@ void LLVertexBuffer::unmapBuffer()
}
bool updated_all = false;
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
if (mMappedData && mVertexLocked)
{
LL_PROFILE_ZONE_NAMED("unmapBuffer - vertex");
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - vertex");
bindGLBuffer(true);
updated_all = mIndexLocked; //both vertex and index buffers done updating
@ -1843,7 +1843,7 @@ void LLVertexBuffer::unmapBuffer()
{
if (!mMappedVertexRegions.empty())
{
LL_PROFILE_ZONE_NAMED("unmapBuffer - flush vertex");
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - flush vertex");
for (U32 i = 0; i < mMappedVertexRegions.size(); ++i)
{
const MappedRegion& region = mMappedVertexRegions[i];
@ -1879,7 +1879,7 @@ void LLVertexBuffer::unmapBuffer()
if (mMappedIndexData && mIndexLocked)
{
LL_PROFILE_ZONE_NAMED("unmapBuffer - index");
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - index");
bindGLIndices();
if(!mMappable)
{
@ -1925,7 +1925,7 @@ void LLVertexBuffer::unmapBuffer()
{
for (U32 i = 0; i < mMappedIndexRegions.size(); ++i)
{
LL_PROFILE_ZONE_NAMED("unmapBuffer - flush index");
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("unmapBuffer - flush index");
const MappedRegion& region = mMappedIndexRegions[i];
S32 offset = region.mIndex >= 0 ? sizeof(U16)*region.mIndex : 0;
S32 length = sizeof(U16)*region.mCount;
@ -2089,7 +2089,7 @@ bool LLVertexBuffer::bindGLArray()
if (mGLArray && sGLRenderArray != mGLArray)
{
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
#if GL_ARB_vertex_array_object
glBindVertexArray(mGLArray);
#endif
@ -2114,7 +2114,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive))))
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer);
sGLRenderBuffer = mGLBuffer;
sBindCount++;
@ -2145,7 +2145,7 @@ bool LLVertexBuffer::bindGLBufferFast()
bool LLVertexBuffer::bindGLIndices(bool force_bind)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
bindGLArray();
bool ret = false;

View File

@ -342,7 +342,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height )
void LLFolderView::filter( LLFolderViewFilter& filter )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
static LLCachedControl<S32> time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
static LLCachedControl<S32> time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1);
filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? time_visible() : time_invisible()), 1, 100));
@ -506,7 +506,7 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected)
void LLFolderView::sanitizeSelection()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
// store off current item in case it is automatically deselected
// and we want to preserve context
LLFolderViewItem* original_selected_item = getCurSelectedItem();
@ -1720,7 +1720,7 @@ void LLFolderView::update()
{
// If this is associated with the user's inventory, don't do anything
// until that inventory is loaded up.
LL_RECORD_BLOCK_TIME(FTM_INVENTORY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(FTM_INVENTORY);
// If there's no model, the view is in suspended state (being deleted) and shouldn't be updated
if (getFolderViewModel() == NULL)

View File

@ -434,7 +434,7 @@ private:
void LLLayoutStack::updateLayout()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if (!mNeedsLayout) return;

View File

@ -3516,7 +3516,7 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name)
LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLScrollListItem::Params item_params;
LLParamSDParser parser;
parser.readSD(element, item_params);
@ -3526,14 +3526,14 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition
LLScrollListItem* LLScrollListCtrl::addRow(const LLScrollListItem::Params& item_p, EAddPosition pos)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLScrollListItem *new_item = new LLScrollListItem(item_p);
return addRow(new_item, item_p, pos);
}
LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLScrollListItem::Params& item_p, EAddPosition pos)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if (!item_p.validateBlock() || !new_item) return NULL;
new_item->setNumColumns(mColumns.size());

View File

@ -1591,7 +1591,7 @@ S32 LLTextBase::getLeftOffset(S32 width)
void LLTextBase::reflow()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
updateSegments();
@ -1938,7 +1938,7 @@ void LLTextBase::removeDocumentChild(LLView* view)
void LLTextBase::updateSegments()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
createDefaultSegment();
}
@ -2271,7 +2271,7 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLStyle::Params style_params(input_params);
style_params.fillFrom(getStyleParams());
@ -2406,7 +2406,7 @@ void LLTextBase::setLastSegmentToolTip(const std::string &tooltip)
void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if (new_text.empty())
return;

View File

@ -147,7 +147,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::
{
// Don't care about time as much as call count. Make sure we're not
// calling LLTrans::getString() in an inner loop. JC
LL_RECORD_BLOCK_TIME(FTM_GET_TRANS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if (def_string)
{
@ -196,7 +196,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args
{
// Don't care about time as much as call count. Make sure we're not
// calling LLTrans::getString() in an inner loop. JC
LL_RECORD_BLOCK_TIME(FTM_GET_TRANS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if (def_string)
{
@ -237,7 +237,7 @@ std::string LLTrans::getDefString(const std::string &xml_desc, const LLSD& msg_a
//static
bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
{
LL_RECORD_BLOCK_TIME(FTM_GET_TRANS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
if (iter != sStringTemplates.end())
@ -259,7 +259,7 @@ bool LLTrans::findString(std::string &result, const std::string &xml_desc, const
//static
bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLSD& msg_args)
{
LL_RECORD_BLOCK_TIME(FTM_GET_TRANS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
if (iter != sStringTemplates.end())

View File

@ -483,7 +483,7 @@ LLViewModel* LLUICtrl::getViewModel() const
//virtual
BOOL LLUICtrl::postBuild()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
//
// Find all of the children that want to be in front and move them to the front
//
@ -813,7 +813,7 @@ BOOL LLUICtrl::getIsChrome() const
BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
// try to select default tab group child
LLViewQuery query = getTabOrderQuery();
child_list_t result = query(this);

View File

@ -116,7 +116,7 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa
//static
void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t& registry, LLXMLNodePtr output_node)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if (node.isNull()) return;
for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling())
@ -169,7 +169,7 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid
bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root,
LLDir::ESkinConstraint constraint)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
std::vector<std::string> paths =
gDirUtilp->findSkinnedFilenames(LLDir::XUI, xui_filename, constraint);
@ -196,7 +196,7 @@ S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename)
LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t& registry, LLXMLNodePtr output_node)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
std::string ctrl_type = node->getName()->mString;
LLStringUtil::toLower(ctrl_type);

View File

@ -209,7 +209,7 @@ private:
template<typename T>
static T* createWidgetImpl(const typename T::Params& params, LLView* parent = NULL)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
T* widget = NULL;
if (!params.validateBlock())
@ -233,7 +233,7 @@ private:
template<typename T>
static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
typename T::Params params(getDefaultParams<T>());

View File

@ -1654,7 +1654,7 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const
LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
// Look for direct children *first*
BOOST_FOREACH(LLView* childp, mChildList)

View File

@ -1968,7 +1968,7 @@ void LLWindowWin32::hideCursor()
void LLWindowWin32::showCursor()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
ASSERT_MAIN_THREAD();
@ -2099,7 +2099,7 @@ void LLWindowWin32::initCursors(BOOL useLegacyCursors) // <FS:LO> Legacy cursor
void LLWindowWin32::updateCursor()
{
ASSERT_MAIN_THREAD();
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32
if (mNextCursor == UI_CURSOR_ARROW
&& mBusyCount > 0)
{
@ -2129,7 +2129,7 @@ void LLWindowWin32::captureMouse()
void LLWindowWin32::releaseMouse()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
ReleaseCapture();
}
@ -2143,7 +2143,7 @@ void LLWindowWin32::delayInputProcessing()
void LLWindowWin32::gatherInput()
{
ASSERT_MAIN_THREAD();
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32
MSG msg;
{
@ -2157,13 +2157,13 @@ void LLWindowWin32::gatherInput()
if (mWindowThread->getQueue().size())
{
LL_PROFILE_ZONE_NAMED("gi - PostMessage");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("gi - PostMessage");
kickWindowThread();
}
while (mWindowThread->mMessageQueue.tryPopBack(msg))
{
LL_PROFILE_ZONE_NAMED("gi - message queue");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("gi - message queue");
if (mInputProcessingPaused)
{
continue;
@ -2172,13 +2172,13 @@ void LLWindowWin32::gatherInput()
// For async host by name support. Really hacky.
if (gAsyncMsgCallback && (LL_WM_HOST_RESOLVED == msg.message))
{
LL_PROFILE_ZONE_NAMED("gi - callback");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("gi - callback");
gAsyncMsgCallback(msg);
}
}
{
LL_PROFILE_ZONE_NAMED("gi - PeekMessage");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("gi - PeekMessage");
S32 msg_count = 0;
while ((msg_count < MAX_MESSAGE_PER_UPDATE) && PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_REMOVE))
{
@ -2189,7 +2189,7 @@ void LLWindowWin32::gatherInput()
}
{
LL_PROFILE_ZONE_NAMED("gi - function queue");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("gi - function queue");
//process any pending functions
std::function<void()> curFunc;
while (mFunctionQueue.tryPopBack(curFunc))
@ -2201,14 +2201,14 @@ void LLWindowWin32::gatherInput()
// send one and only one mouse move event per frame BEFORE handling mouse button presses
if (mLastCursorPosition != mCursorPosition)
{
LL_PROFILE_ZONE_NAMED("gi - mouse move");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("gi - mouse move");
mCallbacks->handleMouseMove(this, mCursorPosition.convert(), mMouseMask);
}
mLastCursorPosition = mCursorPosition;
{
LL_PROFILE_ZONE_NAMED("gi - mouse queue");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("gi - mouse queue");
// handle mouse button presses AFTER updating mouse cursor position
std::function<void()> curFunc;
while (mMouseQueue.tryPopBack(curFunc))
@ -2230,7 +2230,7 @@ static LLTrace::BlockTimerStatHandle FTM_MOUSEHANDLER("Handle Mouse");
LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_param, LPARAM l_param)
{
ASSERT_WINDOW_THREAD();
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
LL_DEBUGS("Window") << "mainWindowProc(" << std::hex << h_wnd
<< ", " << u_msg
@ -2282,14 +2282,14 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_TIMER:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_TIMER");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_TIMER");
WINDOW_IMP_POST(window_imp->mCallbacks->handleTimerEvent(window_imp));
break;
}
case WM_DEVICECHANGE:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_DEVICECHANGE");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_DEVICECHANGE");
if (debug_window_proc)
{
LL_INFOS("Window") << " WM_DEVICECHANGE: wParam=" << w_param
@ -2306,7 +2306,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_PAINT:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_PAINT");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_PAINT");
GetUpdateRect(window_imp->mWindowHandle, &update_rect, FALSE);
update_width = update_rect.right - update_rect.left + 1;
update_height = update_rect.bottom - update_rect.top + 1;
@ -2322,7 +2322,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_SETCURSOR:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_SETCURSOR");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_SETCURSOR");
// This message is sent whenever the cursor is moved in a window.
// You need to set the appropriate cursor appearance.
@ -2337,21 +2337,21 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_ENTERMENULOOP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_ENTERMENULOOP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_ENTERMENULOOP");
WINDOW_IMP_POST(window_imp->mCallbacks->handleWindowBlock(window_imp));
break;
}
case WM_EXITMENULOOP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_EXITMENULOOP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_EXITMENULOOP");
WINDOW_IMP_POST(window_imp->mCallbacks->handleWindowUnblock(window_imp));
break;
}
case WM_ACTIVATEAPP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_ACTIVATEAPP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_ACTIVATEAPP");
window_imp->post([=]()
{
// This message should be sent whenever the app gains or loses focus.
@ -2394,7 +2394,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_ACTIVATE:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_ACTIVATE");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_ACTIVATE");
window_imp->post([=]()
{
// Can be one of WA_ACTIVE, WA_CLICKACTIVE, or WA_INACTIVE
@ -2428,7 +2428,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_SYSCOMMAND:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_SYSCOMMAND");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_SYSCOMMAND");
switch (w_param)
{
case SC_KEYMENU:
@ -2444,7 +2444,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_CLOSE:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_CLOSE");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_CLOSE");
window_imp->post([=]()
{
// Will the app allow the window to close?
@ -2459,7 +2459,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_DESTROY:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_DESTROY");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_DESTROY");
if (window_imp->shouldPostQuit())
{
PostQuitMessage(0); // Posts WM_QUIT with an exit code of 0
@ -2468,7 +2468,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_COMMAND:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_COMMAND");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_COMMAND");
if (!HIWORD(w_param)) // this message is from a menu
{
WINDOW_IMP_POST(window_imp->mCallbacks->handleMenuSelect(window_imp, LOWORD(w_param)));
@ -2477,13 +2477,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_SYSKEYDOWN:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_SYSKEYDOWN");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_SYSKEYDOWN");
// allow system keys, such as ALT-F4 to be processed by Windows
eat_keystroke = FALSE;
}
case WM_KEYDOWN:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_KEYDOWN");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_KEYDOWN");
window_imp->post([=]()
{
window_imp->mKeyCharCode = 0; // don't know until wm_char comes in next
@ -2510,7 +2510,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
eat_keystroke = FALSE;
case WM_KEYUP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_KEYUP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_KEYUP");
window_imp->post([=]()
{
window_imp->mKeyScanCode = (l_param >> 16) & 0xff;
@ -2535,7 +2535,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_IME_SETCONTEXT:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_IME_SETCONTEXT");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_SETCONTEXT");
if (debug_window_proc)
{
LL_INFOS("Window") << "WM_IME_SETCONTEXT" << LL_ENDL;
@ -2549,7 +2549,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_IME_STARTCOMPOSITION:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_IME_STARTCOMPOSITION");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_STARTCOMPOSITION");
if (debug_window_proc)
{
LL_INFOS() << "WM_IME_STARTCOMPOSITION" << LL_ENDL;
@ -2563,7 +2563,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_IME_ENDCOMPOSITION:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_IME_ENDCOMPOSITION");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_ENDCOMPOSITION");
if (debug_window_proc)
{
LL_INFOS() << "WM_IME_ENDCOMPOSITION" << LL_ENDL;
@ -2576,7 +2576,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_IME_COMPOSITION:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_IME_COMPOSITION");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_COMPOSITION");
if (debug_window_proc)
{
LL_INFOS() << "WM_IME_COMPOSITION" << LL_ENDL;
@ -2590,7 +2590,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_IME_REQUEST:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_IME_REQUEST");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_REQUEST");
if (debug_window_proc)
{
LL_INFOS() << "WM_IME_REQUEST" << LL_ENDL;
@ -2605,7 +2605,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_CHAR:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_CHAR");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_CHAR");
window_imp->post([=]()
{
window_imp->mKeyCharCode = w_param;
@ -2637,7 +2637,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_NCLBUTTONDOWN:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_NCLBUTTONDOWN");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_NCLBUTTONDOWN");
{
// A click in a non-client area, e.g. title bar or window border.
window_imp->post([=]()
@ -2650,7 +2650,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_LBUTTONDOWN:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_LBUTTONDOWN");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_LBUTTONDOWN");
{
LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
window_imp->postMouseButtonEvent([=]()
@ -2675,7 +2675,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_LBUTTONDBLCLK:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_LBUTTONDBLCLK");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_LBUTTONDBLCLK");
window_imp->postMouseButtonEvent([=]()
{
//RN: ignore right button double clicks for now
@ -2696,7 +2696,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_LBUTTONUP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_LBUTTONUP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_LBUTTONUP");
{
window_imp->postMouseButtonEvent([=]()
{
@ -2720,7 +2720,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_RBUTTONDBLCLK:
case WM_RBUTTONDOWN:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_RBUTTONDOWN");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_RBUTTONDOWN");
{
LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
window_imp->post([=]()
@ -2743,7 +2743,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_RBUTTONUP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_RBUTTONUP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_RBUTTONUP");
{
LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
window_imp->postMouseButtonEvent([=]()
@ -2758,7 +2758,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_MBUTTONDOWN:
// case WM_MBUTTONDBLCLK:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_MBUTTONDOWN");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_MBUTTONDOWN");
{
LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
window_imp->postMouseButtonEvent([=]()
@ -2777,7 +2777,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_MBUTTONUP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_MBUTTONUP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_MBUTTONUP");
{
LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
window_imp->postMouseButtonEvent([=]()
@ -2790,7 +2790,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
break;
case WM_XBUTTONDOWN:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_XBUTTONDOWN");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_XBUTTONDOWN");
window_imp->postMouseButtonEvent([=]()
{
LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER);
@ -2810,7 +2810,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_XBUTTONUP:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_XBUTTONUP");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_XBUTTONUP");
window_imp->postMouseButtonEvent([=]()
{
@ -2826,7 +2826,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_MOUSEWHEEL:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_MOUSEWHEEL");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_MOUSEWHEEL");
static short z_delta = 0;
RECT client_rect;
@ -2883,7 +2883,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
*/
case WM_MOUSEHWHEEL:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_MOUSEHWHEEL");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_MOUSEHWHEEL");
static short h_delta = 0;
RECT client_rect;
@ -2920,12 +2920,12 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// Handle mouse movement within the window
case WM_MOUSEMOVE:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_MOUSEMOVE");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_MOUSEMOVE");
// DO NOT use mouse event queue for move events to ensure cursor position is updated
// when button events are handled
WINDOW_IMP_POST(
{
LL_PROFILE_ZONE_NAMED("mwp - WM_MOUSEMOVE lambda");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_MOUSEMOVE lambda");
MASK mask = gKeyboard->currentMask(TRUE);
window_imp->mMouseMask = mask;
@ -2936,7 +2936,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_GETMINMAXINFO:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_GETMINMAXINFO");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_GETMINMAXINFO");
LPMINMAXINFO min_max = (LPMINMAXINFO)l_param;
min_max->ptMinTrackSize.x = window_imp->mMinWindowWidth;
min_max->ptMinTrackSize.y = window_imp->mMinWindowHeight;
@ -2950,7 +2950,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_SIZE:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_SIZE");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_SIZE");
window_imp->updateWindowRect();
S32 width = S32(LOWORD(l_param));
S32 height = S32(HIWORD(l_param));
@ -3012,7 +3012,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_DPICHANGED:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_DPICHANGED");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_DPICHANGED");
LPRECT lprc_new_scale;
F32 new_scale = F32(LOWORD(w_param)) / F32(USER_DEFAULT_SCREEN_DPI);
lprc_new_scale = (LPRECT)l_param;
@ -3033,7 +3033,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_SETFOCUS:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_SETFOCUS");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_SETFOCUS");
if (debug_window_proc)
{
LL_INFOS("Window") << "WINDOWPROC SetFocus" << LL_ENDL;
@ -3058,7 +3058,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_KILLFOCUS:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_KILLFOCUS");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_KILLFOCUS");
if (debug_window_proc)
{
LL_INFOS("Window") << "WINDOWPROC KillFocus" << LL_ENDL;
@ -3069,7 +3069,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_COPYDATA:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_COPYDATA");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_COPYDATA");
{
// received a URL
PCOPYDATASTRUCT myCDS = (PCOPYDATASTRUCT)l_param;
@ -3089,7 +3089,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
case WM_SETTINGCHANGE:
{
LL_PROFILE_ZONE_NAMED("mwp - WM_SETTINGCHANGE");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_SETTINGCHANGE");
if (w_param == SPI_SETMOUSEVANISH)
{
if (!SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &window_imp->mMouseVanish, 0))
@ -3102,7 +3102,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_INPUT:
{
LL_PROFILE_ZONE_NAMED("MWP - WM_INPUT");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("MWP - WM_INPUT");
UINT dwSize = 0;
GetRawInputData((HRAWINPUT)l_param, RID_INPUT, NULL, &dwSize, sizeof(RAWINPUTHEADER));
@ -3134,7 +3134,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
default:
{
LL_PROFILE_ZONE_NAMED("mwp - default");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - default");
if (debug_window_proc)
{
LL_INFOS("Window") << "Unhandled windows message code: 0x" << std::hex << U32(u_msg) << LL_ENDL;
@ -3152,7 +3152,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// pass unhandled messages down to Windows
LRESULT ret;
{
LL_PROFILE_ZONE_NAMED("mwp - DefWindowProc");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - DefWindowProc");
ret = DefWindowProc(h_wnd, u_msg, w_param, l_param);
}
return ret;
@ -3334,7 +3334,7 @@ BOOL LLWindowWin32::copyTextToClipboard(const LLWString& wstr)
// Constrains the mouse to the window.
void LLWindowWin32::setMouseClipping( BOOL b )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
ASSERT_MAIN_THREAD();
if( b != mIsMouseClipping )
{
@ -3639,7 +3639,7 @@ BOOL LLWindowWin32::resetDisplayResolution()
void LLWindowWin32::swapBuffers()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
ASSERT_MAIN_THREAD();
SwapBuffers(mhDC);
@ -4670,7 +4670,7 @@ void LLWindowWin32::LLWindowWin32Thread::run()
while (! getQueue().done())
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
if (mWindowHandle != 0)
{
@ -4678,13 +4678,13 @@ void LLWindowWin32::LLWindowWin32Thread::run()
BOOL status;
if (mhDC == 0)
{
LL_PROFILE_ZONE_NAMED("w32t - PeekMessage");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("w32t - PeekMessage");
logger.onChange("PeekMessage(", std::hex, mWindowHandle, ")");
status = PeekMessage(&msg, mWindowHandle, 0, 0, PM_REMOVE);
}
else
{
LL_PROFILE_ZONE_NAMED("w32t - GetMessage");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("w32t - GetMessage");
logger.always("GetMessage(", std::hex, mWindowHandle, ")");
status = GetMessage(&msg, NULL, 0, 0);
}
@ -4700,7 +4700,7 @@ void LLWindowWin32::LLWindowWin32Thread::run()
}
{
LL_PROFILE_ZONE_NAMED("w32t - Function Queue");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("w32t - Function Queue");
logger.onChange("runPending()");
//process any pending functions
getQueue().runPending();
@ -4708,7 +4708,7 @@ void LLWindowWin32::LLWindowWin32Thread::run()
#if 0
{
LL_PROFILE_ZONE_NAMED("w32t - Sleep");
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("w32t - Sleep");
logger.always("sleep(1)");
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
@ -4745,7 +4745,7 @@ void LLWindowWin32::kickWindowThread(HWND windowHandle)
void LLWindowWin32::updateWindowRect()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
//called from window thread
RECT rect;
RECT client_rect;

View File

@ -291,7 +291,7 @@ public:
// generic getter
template<typename T> T get(const std::string& name)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
LLControlVariable* control = getControl(name);
LLSD value;
eControlType type = TYPE_COUNT;

View File

@ -78,7 +78,7 @@ namespace FSPerfStats
// static
void StatsRecorder::toggleBuffer()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
using ST = StatType_t;
bool unreliable{false};
@ -160,7 +160,7 @@ namespace FSPerfStats
auto& statsTypeMatrix = statsDoubleBuffer[writeBuffer];
for(auto& statsMap : statsTypeMatrix)
{
LL_PROFILE_ZONE_NAMED("Clear stats maps");
LL_PROFILE_ZONE_NAMED_CATEGORY_STATS("Clear stats maps");
for(auto& stat_entry : statsMap)
{
std::fill_n(stat_entry.second.begin() ,static_cast<size_t>(ST::STATS_COUNT),0);
@ -169,7 +169,7 @@ namespace FSPerfStats
}
for(int i=0; i< static_cast<size_t>(ObjType_t::OT_COUNT); i++)
{
LL_PROFILE_ZONE_NAMED("clear max/sum");
LL_PROFILE_ZONE_NAMED_CATEGORY_STATS("clear max/sum");
max[writeBuffer][i].fill(0);
sum[writeBuffer][i].fill(0);
}
@ -185,13 +185,13 @@ namespace FSPerfStats
// static
void StatsRecorder::clearStatsBuffers()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
using ST = StatType_t;
auto& statsTypeMatrix = statsDoubleBuffer[writeBuffer];
for(auto& statsMap : statsTypeMatrix)
{
LL_PROFILE_ZONE_NAMED("Clear stats maps");
LL_PROFILE_ZONE_NAMED_CATEGORY_STATS("Clear stats maps");
for(auto& stat_entry : statsMap)
{
std::fill_n(stat_entry.second.begin() ,static_cast<size_t>(ST::STATS_COUNT),0);
@ -200,7 +200,7 @@ namespace FSPerfStats
}
for(int i=0; i< static_cast<size_t>(ObjType_t::OT_COUNT); i++)
{
LL_PROFILE_ZONE_NAMED("clear max/sum");
LL_PROFILE_ZONE_NAMED_CATEGORY_STATS("clear max/sum");
max[writeBuffer][i].fill(0);
sum[writeBuffer][i].fill(0);
}
@ -213,7 +213,7 @@ namespace FSPerfStats
// repeat before we start processing new stuff
for(auto& statsMap : statsTypeMatrix)
{
LL_PROFILE_ZONE_NAMED("Clear stats maps");
LL_PROFILE_ZONE_NAMED_CATEGORY_STATS("Clear stats maps");
for(auto& stat_entry : statsMap)
{
std::fill_n(stat_entry.second.begin() ,static_cast<size_t>(ST::STATS_COUNT),0);
@ -222,7 +222,7 @@ namespace FSPerfStats
}
for(int i=0; i< static_cast<size_t>(ObjType_t::OT_COUNT); i++)
{
LL_PROFILE_ZONE_NAMED("clear max/sum");
LL_PROFILE_ZONE_NAMED_CATEGORY_STATS("clear max/sum");
max[writeBuffer][i].fill(0);
sum[writeBuffer][i].fill(0);
}

View File

@ -179,7 +179,7 @@ namespace FSPerfStats
void processUpdate(const StatsRecord& upd)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
// LL_INFOS("perfstats") << "processing update:" << LL_ENDL;
using ST = StatType_t;
// Note: nullptr is used as the key for global stats
@ -253,7 +253,7 @@ namespace FSPerfStats
static inline void doUpd(const LLUUID& key, ObjType_t ot, StatType_t type, uint64_t val)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
using ST = StatType_t;
StatsMap& stm {statsDoubleBuffer[writeBuffer][static_cast<size_t>(ot)]};
auto& thisAsset = stm[key];
@ -352,7 +352,7 @@ namespace FSPerfStats
std::enable_if_t<OD == ObjType_t::OT_GENERAL> * = nullptr>
RecordTime( StatType_t type ):RecordTime<ObjTypeDiscriminator>(LLUUID::null, LLUUID::null, type )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
#ifdef USAGE_TRACKING
LL_PROFILE_PLOT_SQ("InUseScene", (int64_t)FSPerfStats::inUseScene, (int64_t)FSPerfStats::inUseScene+1);
FSPerfStats::inUseScene++;
@ -454,7 +454,7 @@ static inline void trackAttachments(const T * vobj, bool isRigged, RATptr* ratPt
const T* rootAtt{vobj};
if (rootAtt->isAttachment())
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
while( !rootAtt->isRootEdit() )
{

View File

@ -1654,7 +1654,7 @@ bool LLAppViewer::doFrame()
nd::etw::logFrame(); // <FS:ND> Write the start of each frame. Even if our Provider (Firestorm) would be enabled, this has only light impact. Does nothing on OSX and Linux.
{FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE); // <FS:Beq/> perf stats
{
LL_PROFILE_ZONE_NAMED("df LLTrace");
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df LLTrace");
if (LLFloaterReg::instanceVisible("block_timers"))
{
LLTrace::BlockTimer::processTimes();
@ -1696,6 +1696,7 @@ bool LLAppViewer::doFrame()
}
// </FS:Ansariel> MaxFPS Viewer-Chui merge error
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df processMiscNativeEvents" )
pingMainloopTimeout("Main:MiscNativeWindowEvents");
if (gViewerWindow)
@ -1705,7 +1706,7 @@ bool LLAppViewer::doFrame()
}
{
LL_PROFILE_ZONE_NAMED( "df gatherInput" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df gatherInput" )
pingMainloopTimeout("Main:GatherInput");
}
@ -1732,12 +1733,12 @@ bool LLAppViewer::doFrame()
}
{
LL_PROFILE_ZONE_NAMED( "df mainloop" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df mainloop" )
// canonical per-frame event
mainloop.post(newFrame);
}
{
LL_PROFILE_ZONE_NAMED( "df suspend" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df suspend" )
// give listeners a chance to run
llcoro::suspend();
}
@ -1759,7 +1760,7 @@ bool LLAppViewer::doFrame()
&& !gFocusMgr.focusLocked())
{
FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE);
LL_PROFILE_ZONE_NAMED( "df JoystickKeyboard" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df JoystickKeyboard" )
joystick->scanJoystick();
gKeyboard->scanKeyboard();
gViewerInput.scanMouse();
@ -1776,23 +1777,23 @@ bool LLAppViewer::doFrame()
// Update state based on messages, user input, object idle.
{
FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE);
LL_PROFILE_ZONE_NAMED( "df pauseMainloopTimeout" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df pauseMainloopTimeout" )
pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds!
}
{
LL_RECORD_BLOCK_TIME(FTM_IDLE);
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df idle"); //LL_RECORD_BLOCK_TIME(FTM_IDLE);
idle();
}
{
LL_PROFILE_ZONE_NAMED( "df resumeMainloopTimeout" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df resumeMainloopTimeout" )
resumeMainloopTimeout();
}
if (gDoDisconnect && (LLStartUp::getStartupState() == STATE_STARTED))
{
LL_PROFILE_ZONE_NAMED("Shutdown:SaveSnapshot");
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("Shutdown:SaveSnapshot");
pauseMainloopTimeout();
saveFinalSnapshot();
@ -1809,7 +1810,7 @@ bool LLAppViewer::doFrame()
// *TODO: Should we run display() even during gHeadlessClient? DK 2011-02-18
if (!LLApp::isExiting() && !gHeadlessClient && gViewerWindow)
{
LL_PROFILE_ZONE_NAMED("df Display")
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df Display" )
pingMainloopTimeout("Main:Display");
gGLActive = TRUE;
@ -1817,7 +1818,7 @@ bool LLAppViewer::doFrame()
{
FSPerfStats::RecordSceneTime T(FSPerfStats::StatType_t::RENDER_IDLE);
LL_PROFILE_ZONE_NAMED("df Snapshot")
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df Snapshot")
pingMainloopTimeout("Main:Snapshot");
LLFloaterSnapshot::update(); // take snapshots
LLFloaterOutfitSnapshot::update();
@ -1827,7 +1828,7 @@ bool LLAppViewer::doFrame()
}
{
LL_PROFILE_ZONE_NAMED( "df pauseMainloopTimeout2" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df pauseMainloopTimeout2" )
pingMainloopTimeout("Main:Sleep");
pauseMainloopTimeout();
@ -1896,7 +1897,7 @@ bool LLAppViewer::doFrame()
F32 max_time = llmin(gFrameIntervalSeconds.value() *10.f, 1.f);
// <FS:Beq> instrument image decodes
{
LL_PROFILE_ZONE_NAMED("updateTextureThreads");
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("updateTextureThreads");
// FSPlot("max_time_ms",max_time);
// <FS:Beq/>
work_pending += updateTextureThreads(max_time);
@ -1918,27 +1919,27 @@ bool LLAppViewer::doFrame()
}
{
LL_PROFILE_ZONE_NAMED( "df gMeshRepo" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df gMeshRepo" )
gMeshRepo.update() ;
}
if(!total_work_pending) //pause texture fetching threads if nothing to process.
{
LL_PROFILE_ZONE_NAMED( "df getTextureCache" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df getTextureCache" )
LLAppViewer::getTextureCache()->pause();
LLAppViewer::getImageDecodeThread()->pause();
LLAppViewer::getTextureFetch()->pause();
}
if(!total_io_pending) //pause file threads if nothing to process.
{
LL_PROFILE_ZONE_NAMED( "df LLVFSThread" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df LLVFSThread" )
LLLFSThread::sLocal->pause();
}
//texture fetching debugger
if(LLTextureFetchDebugger::isEnabled())
{
LL_PROFILE_ZONE_NAMED( "df tex_fetch_debugger_instance" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df tex_fetch_debugger_instance" )
LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance =
LLFloaterReg::findTypedInstance<LLFloaterTextureFetchDebugger>("tex_fetch_debugger");
if(tex_fetch_debugger_instance)
@ -1965,7 +1966,7 @@ bool LLAppViewer::doFrame()
frameTimer.reset();
// </FS:Ansariel>
{
LL_PROFILE_ZONE_NAMED( "df resumeMainloopTimeout" )
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df resumeMainloopTimeout" )
resumeMainloopTimeout();
}
pingMainloopTimeout("Main:End");
@ -5612,6 +5613,7 @@ static LLTrace::BlockTimerStatHandle FTM_HUD_EFFECTS("HUD Effects");
///////////////////////////////////////////////////////
void LLAppViewer::idle()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
pingMainloopTimeout("Main:Idle");
// Update frame timers
@ -5705,7 +5707,7 @@ void LLAppViewer::idle()
if (!gDisconnected)
{
LL_RECORD_BLOCK_TIME(FTM_NETWORK);
LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("network"); //LL_RECORD_BLOCK_TIME(FTM_NETWORK);
// Update spaceserver timeinfo
LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + LLUnits::Seconds::fromValue(dt_raw));
@ -5738,7 +5740,7 @@ void LLAppViewer::idle()
|| (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
{
LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; //LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
// Send avatar and camera info
mLastAgentControlFlags = gAgent.getControlFlags();
mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
@ -5987,8 +5989,10 @@ void LLAppViewer::idle()
// Here, particles are updated and drawables are moved.
//
LL_RECORD_BLOCK_TIME(FTM_WORLD_UPDATE);
gPipeline.updateMove();
{
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("world update"); //LL_RECORD_BLOCK_TIME(FTM_WORLD_UPDATE);
gPipeline.updateMove();
}
LLWorld::getInstance()->updateParticles();
@ -6027,7 +6031,7 @@ void LLAppViewer::idle()
LLAvatarRenderInfoAccountant::getInstance()->idle();
{
LL_RECORD_BLOCK_TIME(FTM_AUDIO_UPDATE);
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("audio update"); //LL_RECORD_BLOCK_TIME(FTM_AUDIO_UPDATE);
if (gAudiop)
{
@ -6269,6 +6273,7 @@ static LLTrace::BlockTimerStatHandle FTM_CHECK_REGION_CIRCUIT("Check Region Circ
void LLAppViewer::idleNetwork()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
pingMainloopTimeout("idleNetwork");
gObjectList.mNumNewObjects = 0;
@ -6277,7 +6282,7 @@ void LLAppViewer::idleNetwork()
static LLCachedControl<bool> speedTest(gSavedSettings, "SpeedTest");
if (!speedTest)
{
LL_RECORD_BLOCK_TIME(FTM_IDLE_NETWORK); // decode
LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("idle network"); //LL_RECORD_BLOCK_TIME(FTM_IDLE_NETWORK); // decode
LLTimer check_message_timer;
// Read all available packets from network

View File

@ -98,7 +98,7 @@ LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry)
void LLDrawable::init(bool new_entry)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
// mXform
mParent = NULL;
@ -247,7 +247,7 @@ BOOL LLDrawable::isLight() const
void LLDrawable::cleanupReferences()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
@ -308,7 +308,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
LLFace *face;
{
@ -336,7 +336,7 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
LLFace *face;
@ -359,7 +359,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
LLFace *face;
face = new LLFace(this, mVObjp);
@ -382,7 +382,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp, LLViewerTexture *specularp)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
LLFace *face;
face = new LLFace(this, mVObjp);
@ -406,7 +406,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (newFaces == (S32)mFaces.size())
{
@ -431,7 +431,7 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerText
void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (newFaces <= (S32)mFaces.size() && newFaces >= (S32)mFaces.size()/2)
{
@ -456,7 +456,7 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer
void LLDrawable::mergeFaces(LLDrawable* src)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
U32 face_count = mFaces.size() + src->mFaces.size();
@ -491,7 +491,7 @@ void LLDrawable::updateMaterial()
void LLDrawable::makeActive()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
#if !LL_RELEASE_FOR_DOWNLOAD
if (mVObjp.notNull())
@ -556,7 +556,7 @@ void LLDrawable::makeActive()
void LLDrawable::makeStatic(BOOL warning_enabled)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (isState(ACTIVE) &&
!isState(ACTIVE_CHILD) &&
@ -604,7 +604,7 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
// Returns "distance" between target destination and resulting xfrom
F32 LLDrawable::updateXform(BOOL undamped)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
BOOL damped = !undamped;
@ -757,7 +757,7 @@ void LLDrawable::moveUpdatePipeline(BOOL moved)
void LLDrawable::movePartition()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
LLSpatialPartition* part = getSpatialPartition();
if (part)
@ -803,7 +803,7 @@ BOOL LLDrawable::updateMoveUndamped()
void LLDrawable::updatePartition()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (!getVOVolume())
{
@ -822,7 +822,7 @@ void LLDrawable::updatePartition()
BOOL LLDrawable::updateMoveDamped()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
F32 dist_squared = updateXform(FALSE);
@ -847,7 +847,7 @@ BOOL LLDrawable::updateMoveDamped()
void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
@ -959,7 +959,7 @@ void LLDrawable::updateTexture()
BOOL LLDrawable::updateGeometry(BOOL priority)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
llassert(mVObjp.notNull());
BOOL res = mVObjp->updateGeometry(this);
@ -1038,7 +1038,7 @@ const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const
void LLDrawable::updateSpatialExtents()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (mVObjp)
{
@ -1174,7 +1174,7 @@ void LLDrawable::setGroup(LLViewerOctreeGroup *groupp)
*/
LLSpatialPartition* LLDrawable::getSpatialPartition()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
LLSpatialPartition* retval = NULL;
@ -1263,7 +1263,7 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat
LLDrawable(root->getVObj(), true),
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB, regionp)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
mBridge = this;
mDrawable = root;
@ -1310,7 +1310,7 @@ void LLSpatialBridge::destroyTree()
void LLSpatialBridge::updateSpatialExtents()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0);
@ -1483,7 +1483,7 @@ public:
void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results, BOOL for_select)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (!gPipeline.hasRenderType(mDrawableType))
{
@ -1582,7 +1582,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
if (mDrawable == NULL)
{

View File

@ -390,7 +390,7 @@ LLRenderPass::~LLRenderPass()
void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{}; // <FS:Beq/> Perf stats
@ -416,7 +416,7 @@ void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL t
void LLRenderPass::renderRiggedGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
LLVOAvatar* lastAvatar = nullptr;
U64 lastMeshId = 0;
@ -441,7 +441,7 @@ void LLRenderPass::renderRiggedGroup(LLSpatialGroup* group, U32 type, U32 mask,
void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{};
for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
{
@ -465,7 +465,7 @@ void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_text
void LLRenderPass::pushRiggedBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLVOAvatar* lastAvatar = nullptr;
U64 lastMeshId = 0;
mask |= LLVertexBuffer::MAP_WEIGHT4;
@ -488,7 +488,7 @@ void LLRenderPass::pushRiggedBatches(U32 type, U32 mask, BOOL texture, BOOL batc
void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{};
for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
{
@ -513,7 +513,7 @@ void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_
void LLRenderPass::pushRiggedMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLVOAvatar* lastAvatar = nullptr;
U64 lastMeshId = 0;
for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
@ -559,7 +559,7 @@ void LLRenderPass::applyModelMatrix(const LLDrawInfo& params)
void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
if (!params.mCount)
{
return;

View File

@ -127,7 +127,7 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d
void LLDrawPoolAlpha::renderPostDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
deferred_render = TRUE;
// first pass, regular forward alpha rendering
@ -191,7 +191,7 @@ static void prepare_forward_shader(LLGLSLShader* shader, F32 minimum_alpha)
void LLDrawPoolAlpha::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
simple_shader = (LLPipeline::sImpostorRender) ? &gObjectSimpleImpostorProgram :
(LLPipeline::sUnderWaterRender) ? &gObjectSimpleWaterProgram : &gObjectSimpleProgram;
@ -488,7 +488,7 @@ void LLDrawPoolAlpha::renderRiggedEmissives(U32 mask, std::vector<LLDrawInfo*>&
for (LLDrawInfo* draw : emissives)
{
// <FS:Beq> Capture render times
LL_PROFILE_ZONE_NAMED("Emissives");
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("Emissives");
auto vobj = draw->mFace?draw->mFace->getViewerObject():nullptr;
if(vobj && vobj->isAttachment())
{
@ -513,7 +513,7 @@ void LLDrawPoolAlpha::renderRiggedEmissives(U32 mask, std::vector<LLDrawInfo*>&
void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
BOOL initialized_lighting = FALSE;
BOOL light_enabled = TRUE;
@ -523,7 +523,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only)
for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
{
LL_PROFILE_ZONE_NAMED("renderAlpha - group");
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("renderAlpha - group");
LLSpatialGroup* group = *i;
llassert(group);
llassert(group->getSpatialPartition());
@ -558,7 +558,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only)
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{}; // <FS:Beq/> Render time Stats collection
for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LL_PROFILE_ZONE_NAMED("ra - push batch")
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("ra - push batch")
LLDrawInfo& params = **k;
U32 have_mask = params.mVertexBuffer->getTypeMask() & mask;
if (have_mask != mask)

View File

@ -128,7 +128,7 @@ LLDrawPoolAvatar::~LLDrawPoolAvatar()
// virtual
BOOL LLDrawPoolAvatar::isDead()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
if (!LLFacePool::isDead())
{
@ -140,14 +140,14 @@ BOOL LLDrawPoolAvatar::isDead()
S32 LLDrawPoolAvatar::getShaderLevel() const
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
return (S32) LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_AVATAR);
}
void LLDrawPoolAvatar::prerender()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_AVATAR);
@ -165,7 +165,7 @@ void LLDrawPoolAvatar::prerender()
LLMatrix4& LLDrawPoolAvatar::getModelView()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
static LLMatrix4 ret;
@ -185,7 +185,7 @@ LLMatrix4& LLDrawPoolAvatar::getModelView()
void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
sSkipTransparent = TRUE;
is_deferred_render = true;
@ -211,7 +211,7 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
void LLDrawPoolAvatar::endDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
sSkipTransparent = FALSE;
is_deferred_render = false;
@ -237,7 +237,7 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass)
void LLDrawPoolAvatar::renderDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
render(pass);
}
@ -249,7 +249,7 @@ S32 LLDrawPoolAvatar::getNumPostDeferredPasses()
void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
sSkipOpaque = TRUE;
sShaderLevel = mShaderLevel;
@ -265,7 +265,7 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)
void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
sRenderingSkinned = FALSE;
sSkipOpaque = FALSE;
@ -277,7 +277,7 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)
void LLDrawPoolAvatar::renderPostDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
is_post_deferred_render = true;
if (LLPipeline::sImpostorRender)
@ -300,7 +300,7 @@ S32 LLDrawPoolAvatar::getNumShadowPasses()
void LLDrawPoolAvatar::beginShadowPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (pass == SHADOW_PASS_AVATAR_OPAQUE)
{
@ -358,7 +358,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
void LLDrawPoolAvatar::endShadowPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (sShaderLevel > 0)
{
@ -371,7 +371,7 @@ void LLDrawPoolAvatar::endShadowPass(S32 pass)
void LLDrawPoolAvatar::renderShadow(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (mDrawFace.empty())
{
@ -438,7 +438,7 @@ S32 LLDrawPoolAvatar::getNumDeferredPasses()
void LLDrawPoolAvatar::render(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (LLPipeline::sImpostorRender)
{
renderAvatars(NULL, pass+2);
@ -450,7 +450,7 @@ void LLDrawPoolAvatar::render(S32 pass)
void LLDrawPoolAvatar::beginRenderPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
//reset vertex buffer mappings
LLVertexBuffer::unbind();
@ -480,7 +480,7 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)
void LLDrawPoolAvatar::endRenderPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (LLPipeline::sImpostorRender)
{
@ -503,7 +503,7 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass)
void LLDrawPoolAvatar::beginImpostor()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
if (!LLPipeline::sReflectionRender)
{
@ -520,7 +520,7 @@ void LLDrawPoolAvatar::beginImpostor()
void LLDrawPoolAvatar::endImpostor()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
gImpostorProgram.unbind();
gPipeline.enableLightsDynamic();
@ -528,7 +528,7 @@ void LLDrawPoolAvatar::endImpostor()
void LLDrawPoolAvatar::beginRigid()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
if (gPipeline.shadersLoaded())
{
@ -563,7 +563,7 @@ void LLDrawPoolAvatar::beginRigid()
void LLDrawPoolAvatar::endRigid()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
sShaderLevel = mShaderLevel;
if (sVertexProgram != NULL)
@ -574,7 +574,7 @@ void LLDrawPoolAvatar::endRigid()
void LLDrawPoolAvatar::beginDeferredImpostor()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
if (!LLPipeline::sReflectionRender)
{
@ -592,7 +592,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
void LLDrawPoolAvatar::endDeferredImpostor()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
sShaderLevel = mShaderLevel;
sVertexProgram->disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);
@ -605,7 +605,7 @@ void LLDrawPoolAvatar::endDeferredImpostor()
void LLDrawPoolAvatar::beginDeferredRigid()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
sVertexProgram = &gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@ -623,7 +623,7 @@ void LLDrawPoolAvatar::beginDeferredRigid()
void LLDrawPoolAvatar::endDeferredRigid()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
sShaderLevel = mShaderLevel;
sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@ -634,7 +634,7 @@ void LLDrawPoolAvatar::endDeferredRigid()
void LLDrawPoolAvatar::beginSkinned()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
if (sShaderLevel > 0)
{
@ -699,7 +699,7 @@ void LLDrawPoolAvatar::beginSkinned()
void LLDrawPoolAvatar::endSkinned()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
if (sShaderLevel > 0)
@ -725,7 +725,7 @@ void LLDrawPoolAvatar::endSkinned()
void LLDrawPoolAvatar::beginDeferredSkinned()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
sShaderLevel = mShaderLevel;
sVertexProgram = &gDeferredAvatarProgram;
@ -748,7 +748,7 @@ void LLDrawPoolAvatar::beginDeferredSkinned()
void LLDrawPoolAvatar::endDeferredSkinned()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
sRenderingSkinned = FALSE;
@ -763,9 +763,11 @@ void LLDrawPoolAvatar::endDeferredSkinned()
void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; //LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
if (pass == -1)
{
LL_PROFILE_ZONE_NAMED("pass -1");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("pass -1"); // <FS:Beq/> Tracy markup
for (S32 i = 1; i < getNumPasses(); i++)
{ //skip foot shadows
prerender();
@ -790,7 +792,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
}
else
{
LL_PROFILE_ZONE_NAMED("Find avatarp"); // <FS:Beq/> Tracy markup
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("Find avatarp"); // <FS:Beq/> Tracy markup
const LLFace *facep = mDrawFace[0];
if (!facep->getDrawable())
{
@ -805,13 +807,11 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
}
FSPerfStats::RecordAvatarTime T(avatarp->getID(), FSPerfStats::StatType_t::RENDER_GEOMETRY);
LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
// <FS:Zi> Add avatar hitbox debug
static LLCachedControl<bool> render_hitbox(gSavedSettings, "DebugRenderHitboxes", false);
if (render_hitbox && pass == 2)
{
LL_PROFILE_ZONE_NAMED("render_hitbox");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("render_hitbox");
// load the debug output shader
LLGLSLShader* current_shader_program = LLGLSLShader::sCurBoundShaderPtr;
@ -887,11 +887,11 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
// <FS:Beq> rendertime Tracy annotations
{
LL_PROFILE_ZONE_NAMED("check fully_loaded");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("check fully_loaded");
// </FS:Beq>
if (!single_avatar && !avatarp->isFullyLoaded() )
{
LL_PROFILE_ZONE_NAMED("avatar not loaded");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("avatar not loaded"); // <FS:Beq/> Tracy markup
if (pass==0 && (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) || LLViewerPartSim::getMaxPartCount() <= 0))
{
// debug code to draw a sphere in place of avatar
@ -920,7 +920,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
// <FS:Beq> rendertime Tracy annotations
{
LL_PROFILE_ZONE_NAMED("check appearance");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("check appearance");
// </FS:Beq>
if (( /*avatarp->isInMuteList() // <FS:Ansariel> Partially undo MAINT-5700: Draw imposter for muted avatars
||*/ impostor
@ -945,7 +945,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (pass == 0)
{
LL_PROFILE_ZONE_NAMED("pass 0");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("pass 0"); // <FS:Beq/> Tracy markup
if (!LLPipeline::sReflectionRender)
{
LLVOAvatar::sNumVisibleAvatars++;
@ -954,7 +954,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
// if (impostor || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()))
if (impostor || (LLVOAvatar::AOA_NORMAL != avatarp->getOverallAppearance() && !avatarp->needsImpostorUpdate()))
{
LL_PROFILE_ZONE_NAMED("render impostor");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("render impostor"); // <FS:Beq/> Tracy markup
if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete())
{
// <FS:Ansariel> FIRE-9179: Crash fix
@ -980,7 +980,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (pass == 1)
{
LL_PROFILE_ZONE_NAMED("render rigid meshes (eyeballs)");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("render rigid meshes (eyeballs)"); // <FS:Beq/> Tracy markup
// render rigid meshes (eyeballs) first
avatarp->renderRigid();
return;
@ -988,7 +988,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if ((sShaderLevel >= SHADER_LEVEL_CLOTH))
{
LL_PROFILE_ZONE_NAMED("shader level > CLOTH");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("shader level > CLOTH"); // <FS:Beq/> Tracy markup
LLMatrix4 rot_mat;
LLViewerCamera::getInstance()->getMatrixToLocal(rot_mat);
LLMatrix4 cfr(OGL_TO_CFR_ROTATION);
@ -1014,7 +1014,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if( !single_avatar || (avatarp == single_avatar) )
{
LL_PROFILE_ZONE_NAMED("renderSkinned");
LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("renderSkinned"); // <FS:Beq/> Tracy markup
avatarp->renderSkinned();
}
}
@ -1026,7 +1026,7 @@ static LLTrace::BlockTimerStatHandle FTM_RIGGED_VBO("Rigged VBO");
//-----------------------------------------------------------------------------
LLViewerTexture *LLDrawPoolAvatar::getDebugTexture()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
if (mReferences.empty())
{
@ -1054,7 +1054,7 @@ LLVertexBufferAvatar::LLVertexBufferAvatar()
: LLVertexBuffer(sDataMask,
GL_STREAM_DRAW_ARB) //avatars are always stream draw due to morph targets
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
}

View File

@ -214,7 +214,7 @@ S32 LLDrawPoolBump::getNumPasses()
void LLDrawPoolBump::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
if (!gPipeline.hasRenderType(LLDrawPool::POOL_SIMPLE))
{
@ -249,7 +249,7 @@ void LLDrawPoolBump::render(S32 pass)
//static
void LLDrawPoolBump::beginShiny()
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
mShiny = TRUE;
sVertexMask = VERTEX_MASK_SHINY;
@ -338,7 +338,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
void LLDrawPoolBump::renderShiny()
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if( gSky.mVOSkyp->getCubeMap() )
{
@ -394,7 +394,7 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
void LLDrawPoolBump::endShiny()
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
unbindCubeMap(shader, mShaderLevel, diffuse_channel, cube_channel);
if (shader)
@ -409,7 +409,7 @@ void LLDrawPoolBump::endShiny()
void LLDrawPoolBump::beginFullbrightShiny()
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
sVertexMask = VERTEX_MASK_SHINY | LLVertexBuffer::MAP_TEXCOORD0;
@ -480,7 +480,7 @@ void LLDrawPoolBump::beginFullbrightShiny()
void LLDrawPoolBump::renderFullbrightShiny()
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if( gSky.mVOSkyp->getCubeMap() )
{
@ -513,7 +513,7 @@ void LLDrawPoolBump::renderFullbrightShiny()
void LLDrawPoolBump::endFullbrightShiny()
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
if( cube_map )
@ -581,7 +581,7 @@ BOOL LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel)
//static
BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, F32 vsize, S32 channel)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
//Note: texture atlas does not support bump texture now.
LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(texture) ;
if(!tex)
@ -631,9 +631,9 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, F32 vsi
//static
void LLDrawPoolBump::beginBump()
{
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
sVertexMask = VERTEX_MASK_BUMP;
LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
// Optional second pass: emboss bump map
stop_glerror();
@ -654,7 +654,7 @@ void LLDrawPoolBump::beginBump()
//static
void LLDrawPoolBump::renderBump(U32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
LLGLDisable fog(GL_FOG);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
LLGLEnable blend(GL_BLEND);
@ -691,7 +691,7 @@ S32 LLDrawPoolBump::getNumDeferredPasses()
void LLDrawPoolBump::renderDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
mShiny = TRUE;
for (int i = 0; i < 2; ++i)
@ -909,7 +909,7 @@ void LLBumpImageList::updateImages()
// Note: the caller SHOULD NOT keep the pointer that this function returns. It may be updated as more data arrives.
LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedTexture* src_image, U8 bump_code )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
llassert( (bump_code == BE_BRIGHTNESS) || (bump_code == BE_DARKNESS) );
LLViewerTexture* bump = NULL;
@ -965,7 +965,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
// static
void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLUUID* source_asset_id = (LLUUID*)userdata;
LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_BRIGHTNESS );
if( final )
@ -989,7 +989,7 @@ void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTextu
{
if (success && LLPipeline::sRenderDeferred)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLPointer<LLImageRaw> nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4);
{
generateNormalMapFromAlpha(src, nrm_image);
@ -1065,7 +1065,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
{
if( success )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
@ -1364,7 +1364,7 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
applyModelMatrix(params);
bool tex_setup = false;
@ -1440,7 +1440,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
void LLDrawPoolInvisible::render(S32 pass)
{ //render invisiprims
LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE);
if (gPipeline.shadersLoaded())
{

View File

@ -55,6 +55,8 @@ S32 LLDrawPoolMaterials::getNumDeferredPasses()
void LLDrawPoolMaterials::beginDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_MATERIAL;
bool rigged = false;
if (pass >= 12)
{
@ -109,13 +111,11 @@ void LLDrawPoolMaterials::beginDeferredPass(S32 pass)
}
diffuse_channel = mShader->enableTexture(LLShaderMgr::DIFFUSE_MAP);
LL_RECORD_BLOCK_TIME(FTM_RENDER_MATERIALS);
}
void LLDrawPoolMaterials::endDeferredPass(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_MATERIALS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_MATERIAL;
mShader->unbind();
@ -124,7 +124,7 @@ void LLDrawPoolMaterials::endDeferredPass(S32 pass)
void LLDrawPoolMaterials::renderDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MATERIAL;
static const U32 type_list[] =
{
LLRenderPass::PASS_MATERIAL,
@ -201,7 +201,7 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
mShader->uniform1f(LLShaderMgr::EMISSIVE_BRIGHTNESS, params.mFullbright ? 1.f : 0.f);
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MATERIAL;
pushMaterialsBatch(params, mask, rigged);
}
}
@ -219,7 +219,7 @@ void LLDrawPoolMaterials::bindNormalMap(LLViewerTexture* tex)
void LLDrawPoolMaterials::pushMaterialsBatch(LLDrawInfo& params, U32 mask, bool rigged)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_MATERIAL;
applyModelMatrix(params);
bool tex_setup = false;

View File

@ -79,13 +79,13 @@ static void setup_fullbright_shader(LLGLSLShader* shader)
void LLDrawPoolGlow::renderPostDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW);
render(&gDeferredEmissiveProgram);
}
void LLDrawPoolGlow::render(LLGLSLShader* shader)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW);
LLGLEnable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
gGL.flush();
@ -117,7 +117,7 @@ S32 LLDrawPoolGlow::getNumPasses()
void LLDrawPoolGlow::render(S32 pass)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLGLSLShader* shader = LLPipeline::sUnderWaterRender ? &gObjectEmissiveWaterProgram : &gObjectEmissiveProgram;
render(shader);
}
@ -139,7 +139,7 @@ S32 LLDrawPoolSimple::getNumPasses()
void LLDrawPoolSimple::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE);
LLGLDisable blend(GL_BLEND);
@ -213,8 +213,8 @@ void LLDrawPoolAlphaMask::prerender()
void LLDrawPoolAlphaMask::render(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLGLDisable blend(GL_BLEND);
LL_PROFILE_ZONE_SCOPED;
LLGLSLShader* shader = nullptr;
if (LLPipeline::sUnderWaterRender)
@ -255,7 +255,7 @@ void LLDrawPoolFullbrightAlphaMask::prerender()
void LLDrawPoolFullbrightAlphaMask::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
LLGLSLShader* shader = nullptr;
if (LLPipeline::sUnderWaterRender)
@ -287,7 +287,7 @@ S32 LLDrawPoolSimple::getNumDeferredPasses()
void LLDrawPoolSimple::renderDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED);
LLGLDisable blend(GL_BLEND);
LLGLDisable alpha_test(GL_ALPHA_TEST);
@ -305,7 +305,7 @@ static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK_DEFERRED("Deferred Al
void LLDrawPoolAlphaMask::renderDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_DEFERRED);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_DEFERRED);
LLGLSLShader* shader = &gDeferredDiffuseAlphaMaskProgram;
//render static
@ -332,7 +332,7 @@ void LLDrawPoolGrass::prerender()
void LLDrawPoolGrass::beginRenderPass(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
stop_glerror();
if (LLPipeline::sUnderWaterRender)
@ -366,7 +366,7 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass)
void LLDrawPoolGrass::endRenderPass(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
LLRenderPass::endRenderPass(pass);
if (mShaderLevel > 0)
@ -381,10 +381,11 @@ void LLDrawPoolGrass::endRenderPass(S32 pass)
void LLDrawPoolGrass::render(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLGLDisable blend(GL_BLEND);
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
//LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
LLGLEnable test(GL_ALPHA_TEST);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
//render grass
@ -404,8 +405,9 @@ void LLDrawPoolGrass::endDeferredPass(S32 pass)
void LLDrawPoolGrass::renderDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS_DEFERRED);
//LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS_DEFERRED);
gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
gDeferredNonIndexedDiffuseAlphaMaskProgram.setMinimumAlpha(0.5f);
@ -438,7 +440,7 @@ void LLDrawPoolFullbright::prerender()
void LLDrawPoolFullbright::renderPostDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
LLGLSLShader* shader = nullptr;
if (LLPipeline::sUnderWaterRender)
@ -464,7 +466,7 @@ void LLDrawPoolFullbright::renderPostDeferred(S32 pass)
void LLDrawPoolFullbright::render(S32 pass)
{ //render fullbright
LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
stop_glerror();
@ -505,7 +507,7 @@ S32 LLDrawPoolFullbright::getNumPasses()
void LLDrawPoolFullbrightAlphaMask::renderPostDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
LLGLSLShader* shader = nullptr;
if (LLPipeline::sRenderingHUDs)

View File

@ -123,7 +123,7 @@ void LLDrawPoolTerrain::prerender()
void LLDrawPoolTerrain::beginRenderPass( S32 pass )
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LLFacePool::beginRenderPass(pass);
sShader = LLPipeline::sUnderWaterRender ?
@ -138,7 +138,7 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass )
void LLDrawPoolTerrain::endRenderPass( S32 pass )
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
//LLFacePool::endRenderPass(pass);
if (mShaderLevel > 1 && sShader->mShaderLevel > 0) {
@ -166,7 +166,7 @@ void LLDrawPoolTerrain::boostTerrainDetailTextures()
void LLDrawPoolTerrain::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
if (mDrawFace.empty())
{
@ -229,7 +229,7 @@ void LLDrawPoolTerrain::render(S32 pass)
void LLDrawPoolTerrain::beginDeferredPass(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LLFacePool::beginRenderPass(pass);
sShader = LLPipeline::sUnderWaterRender ? &gDeferredTerrainWaterProgram : &gDeferredTerrainProgram;
@ -239,14 +239,14 @@ void LLDrawPoolTerrain::beginDeferredPass(S32 pass)
void LLDrawPoolTerrain::endDeferredPass(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LLFacePool::endRenderPass(pass);
sShader->unbind();
}
void LLDrawPoolTerrain::renderDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
if (mDrawFace.empty())
{
return;
@ -270,7 +270,7 @@ void LLDrawPoolTerrain::renderDeferred(S32 pass)
void LLDrawPoolTerrain::beginShadowPass(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
LLFacePool::beginRenderPass(pass);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gDeferredShadowProgram.bind();
@ -281,14 +281,14 @@ void LLDrawPoolTerrain::beginShadowPass(S32 pass)
void LLDrawPoolTerrain::endShadowPass(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
LLFacePool::endRenderPass(pass);
gDeferredShadowProgram.unbind();
}
void LLDrawPoolTerrain::renderShadow(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
if (mDrawFace.empty())
{
return;
@ -888,7 +888,7 @@ void LLDrawPoolTerrain::renderOwnership()
void LLDrawPoolTerrain::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(mTexturep) ;
if (tex && textures.find(tex) != textures.end())
{

View File

@ -138,7 +138,7 @@ void LLDrawPoolWater::endPostDeferredPass(S32 pass)
//===============================
void LLDrawPoolWater::renderDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
if (!LLPipeline::sRenderTransparentWater)
{
@ -156,7 +156,7 @@ void LLDrawPoolWater::renderDeferred(S32 pass)
void LLDrawPoolWater::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
if (mDrawFace.empty() || LLDrawable::getCurrentFrame() <= 1)
{
return;
@ -338,7 +338,7 @@ void LLDrawPoolWater::render(S32 pass)
// for low end hardware
void LLDrawPoolWater::renderOpaqueLegacyWater()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLVOSky *voskyp = gSky.mVOSkyp;
if (voskyp == NULL)
@ -447,7 +447,7 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
void LLDrawPoolWater::renderReflection(LLFace* face)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLVOSky *voskyp = gSky.mVOSkyp;
if (!voskyp)
@ -476,7 +476,7 @@ void LLDrawPoolWater::renderReflection(LLFace* face)
void LLDrawPoolWater::renderWater()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
if (!deferred_render)
{
gGL.setColorMask(true, true);

View File

@ -566,11 +566,11 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
void LLDrawPoolWLSky::renderDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))
{
return;
}
LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
const F32 camHeightLocal = LLEnvironment::instance().getCamHeight();
@ -590,11 +590,11 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
void LLDrawPoolWLSky::render(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))
{
return;
}
LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
const F32 camHeightLocal = LLEnvironment::instance().getCamHeight();
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();

View File

@ -231,15 +231,15 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
BOOL ret = FALSE ;
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
for (instance_list_t::iterator iter = LLViewerDynamicTexture::sInstances[order].begin();
iter != LLViewerDynamicTexture::sInstances[order].end(); ++iter)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLViewerDynamicTexture *dynamicTexture = *iter;
if (dynamicTexture->needsRender())
{
LL_PROFILE_ZONE_NAMED("needsRender");
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("needsRender");
glClear(GL_DEPTH_BUFFER_BIT);
gDepthDirty = TRUE;
@ -248,7 +248,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
dynamicTexture->preRender(); // Must be called outside of startRender()
result = FALSE;
{
LL_PROFILE_ZONE_NAMED("DynTexture->render");
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("DynTexture->render");
if (dynamicTexture->render())
{
ret = TRUE ;
@ -257,7 +257,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
}
}
{
LL_PROFILE_ZONE_NAMED("flush");
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("flush");
gGL.flush();
}
LLVertexBuffer::unbind();

View File

@ -1566,7 +1566,7 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::getSharedEnvironmentInstance()
void LLEnvironment::updateEnvironment(LLSettingsBase::Seconds transition, bool forced)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
DayInstance::ptr_t pinstance = getSelectedEnvironmentInstance();
// <FS:Beq> Auto-disable water rendering via hasEEPWaterDerender
// Allow parcel and region owners to disable water rendering for their visitors through an EEP setting
@ -1720,7 +1720,7 @@ LLVector4 LLEnvironment::getRotatedLightNorm() const
//-------------------------------------------------------------------------
void LLEnvironment::update(const LLViewerCamera * cam)
{
LL_RECORD_BLOCK_TIME(FTM_ENVIRONMENT_UPDATE);
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT; //LL_RECORD_BLOCK_TIME(FTM_ENVIRONMENT_UPDATE);
//F32Seconds now(LLDate::now().secondsSinceEpoch());
static LLFrameTimer timer;
@ -1778,7 +1778,7 @@ void LLEnvironment::updateCloudScroll()
// static
void LLEnvironment::updateGLVariablesForSettings(LLShaderUniforms* uniforms, const LLSettingsBase::ptr_t &psetting)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
for (int i = 0; i < LLGLSLShader::SG_COUNT; ++i)
{
@ -1849,7 +1849,7 @@ void LLEnvironment::updateGLVariablesForSettings(LLShaderUniforms* uniforms, con
void LLEnvironment::updateShaderUniforms(LLGLSLShader* shader)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
// apply uniforms that should be applied to all shaders
mSkyUniforms[LLGLSLShader::SG_ANY].apply(shader);
@ -2791,7 +2791,7 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::DayInstance::clone() const
bool LLEnvironment::DayInstance::applyTimeDelta(const LLSettingsBase::Seconds& delta)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
ptr_t keeper(shared_from_this()); // makes sure that this does not go away while it is being worked on.
bool changed(false);

View File

@ -133,7 +133,7 @@ void planarProjection(LLVector2 &tc, const LLVector4a& normal,
void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
mLastUpdateTime = gFrameTimeSeconds;
mLastMoveTime = 0.f;
mLastSkinTime = gFrameTimeSeconds;
@ -245,7 +245,7 @@ void LLFace::setPool(LLFacePool* pool)
void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
if (!new_pool)
{
@ -335,7 +335,7 @@ void LLFace::setSpecularMap(LLViewerTexture* tex)
void LLFace::dirtyTexture()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
LLDrawable* drawablep = getDrawable();
@ -559,7 +559,7 @@ void LLFace::updateCenterAgent()
void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
if (mDrawablep == NULL || mDrawablep->getSpatialGroup() == NULL)
{
@ -635,7 +635,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
void renderFace(LLDrawable* drawable, LLFace *face)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
LLVOVolume* vobj = drawable->getVOVolume();
if (vobj)
@ -930,7 +930,7 @@ bool less_than_max_mag(const LLVector4a& vec)
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
const LLMatrix4& mat_vert_in, BOOL global_volume)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
@ -1241,7 +1241,7 @@ bool LLFace::canRenderAsMask()
// <FS:Beq> shortcircuit fully alpha faces
if (getViewerObject()->isHUDAttachment()) { return false; }
if (te->getAlpha() == 0.0f && (te->getGlow() == 0.f)) { LL_PROFILE_ZONE_NAMED("beqshortcircuit invisible"); return true; }
if (te->getAlpha() == 0.0f && (te->getGlow() == 0.f)) { return true; }
// </FS:Beq>
LLMaterial* mat = te->getMaterialParams();
@ -1280,7 +1280,7 @@ bool LLFace::canRenderAsMask()
//static
void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 |
LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_NORMAL;
@ -1352,7 +1352,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const U16 &index_offset,
bool force_rebuild)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
llassert(verify());
if (volume.getNumVolumeFaces() <= f) {
@ -1515,7 +1515,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
// INDICES
if (full_rebuild)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - indices");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - indices");
mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount, map_range);
volatile __m128i* dst = (__m128i*) indicesp.get();
@ -1531,7 +1531,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - indices tail");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - indices tail");
U16* idx = (U16*) dst;
for (S32 i = end*8; i < num_indices; ++i)
@ -1600,7 +1600,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_normal || rebuild_tangent)
{ //override mat_normal with inverse of skin->mBindShapeMatrix
LL_PROFILE_ZONE_NAMED("getGeometryVolume - norm mat override");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - norm mat override");
if (rigged)
{
if (skin == nullptr)
@ -1631,7 +1631,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{ //use transform feedback to pack vertex buffer
//gGLDebugLoggingEnabled = TRUE;
LL_PROFILE_ZONE_NAMED("getGeometryVolume - transform feedback");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - transform feedback");
LLGLEnable discard(GL_RASTERIZER_DISCARD);
LLVertexBuffer* buff = (LLVertexBuffer*) vf.mVertexBuffer.get();
@ -1649,7 +1649,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_pos)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf position");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tf position");
gTransformPositionProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_VERTEX, mGeomIndex, mGeomCount);
@ -1674,7 +1674,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_color)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf color");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tf color");
gTransformColorProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_COLOR, mGeomIndex, mGeomCount);
@ -1690,7 +1690,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_emissive)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf emissive");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tf emissive");
gTransformColorProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_EMISSIVE, mGeomIndex, mGeomCount);
@ -1711,7 +1711,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_normal)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf normal");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tf normal");
gTransformNormalProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_NORMAL, mGeomIndex, mGeomCount);
@ -1724,7 +1724,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tangent)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf tangent");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tf tangent");
gTransformTangentProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TANGENT, mGeomIndex, mGeomCount);
@ -1737,7 +1737,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf tcoord");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tf tcoord");
gTransformTexCoordProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TEXCOORD0, mGeomIndex, mGeomCount);
@ -1776,7 +1776,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tcoord");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tcoord");
//bump setup
LLVector4a binormal_dir( -sin_ang, cos_ang, 0.f );
@ -1906,12 +1906,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (texgen != LLTextureEntry::TEX_GEN_PLANAR)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - texgen");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - texgen");
if (!do_tex_mat)
{
if (!do_xform)
{
LL_PROFILE_ZONE_NAMED("ggv - texgen 1");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("ggv - texgen 1");
// <FS:ND> Don't round up, or there's high risk to write past buffer
@ -1924,7 +1924,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
else
{
LL_PROFILE_ZONE_NAMED("ggv - texgen 2");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("ggv - texgen 2");
F32* dst = (F32*) tex_coords0.get();
LLVector4a* src = (LLVector4a*) vf.mTexCoords;
@ -1975,7 +1975,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
else
{ //no bump, tex gen planar
LL_PROFILE_ZONE_NAMED("getGeometryVolume - texgen planar");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - texgen planar");
if (do_tex_mat)
{
for (S32 i = 0; i < num_vertices; i++)
@ -2020,7 +2020,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
else
{ //bump mapped or has material, just do the whole expensive loop
LL_PROFILE_ZONE_NAMED("getGeometryVolume - texgen default");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - texgen default");
std::vector<LLVector2> bump_tc;
@ -2235,7 +2235,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_normal)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - normal");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - normal");
mVertexBuffer->getNormalStrider(norm, mGeomIndex, mGeomCount, map_range);
F32* normals = (F32*) norm.get();
@ -2258,7 +2258,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tangent)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tangent");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - tangent");
mVertexBuffer->getTangentStrider(tangent, mGeomIndex, mGeomCount, map_range);
F32* tangents = (F32*) tangent.get();
@ -2291,7 +2291,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_weights && vf.mWeights)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - weight");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - weight");
mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, map_range);
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
//F32* weights = (F32*) wght.get();
@ -2309,7 +2309,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_COLOR) )
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - color");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - color");
mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range);
LLVector4a src;
@ -2340,7 +2340,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_emissive)
{
LL_PROFILE_ZONE_NAMED("getGeometryVolume - emissive");
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - emissive");
LLStrider<LLColor4U> emissive;
mVertexBuffer->getEmissiveStrider(emissive, mGeomIndex, mGeomCount, map_range);
@ -2471,7 +2471,7 @@ F32 LLFace::getTextureVirtualSize()
BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
//VECTORIZE THIS
//get area of circle around face
@ -2752,7 +2752,7 @@ const LLMatrix4& LLFace::getRenderMatrix() const
S32 LLFace::renderElements(const U16 *index_array) const
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
S32 ret = 0;
@ -2773,7 +2773,7 @@ S32 LLFace::renderElements(const U16 *index_array) const
S32 LLFace::renderIndexed()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
if(mDrawablep == NULL || mDrawPoolp == NULL)
{
@ -2785,7 +2785,7 @@ S32 LLFace::renderIndexed()
S32 LLFace::renderIndexed(U32 mask)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
if (mVertexBuffer.isNull())
{

View File

@ -224,7 +224,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4
void LLHUDNameTag::render()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
if (sDisplayText)
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
@ -740,7 +740,7 @@ void LLHUDNameTag::updateSize()
void LLHUDNameTag::updateAll()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
// iterate over all text objects, calculate their restoration forces,
// and add them to the visible set if they are on screen and close enough
sVisibleTextObjects.clear();

View File

@ -3767,7 +3767,7 @@ S32 LLMeshRepository::update()
S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail, S32 last_lod)
{
LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; //LL_LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
// Manage time-to-load metrics for mesh download operations.
metricsProgress(1);
@ -3850,7 +3850,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
void LLMeshRepository::notifyLoadedMeshes()
{ //called from main thread
LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; //LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
// <FS:Ansariel> [UDP Assets]
//// GetMesh2 operation with keepalives, etc. With pipelining,
@ -4268,7 +4268,7 @@ S32 LLMeshRepository::getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lo
const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const LLVOVolume* requesting_obj)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (mesh_id.notNull())
{
skin_map::iterator iter = mSkinMap.find(mesh_id);
@ -4295,7 +4295,7 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const
void LLMeshRepository::fetchPhysicsShape(const LLUUID& mesh_id)
{
LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; //LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
if (mesh_id.notNull())
{
@ -4324,7 +4324,7 @@ void LLMeshRepository::fetchPhysicsShape(const LLUUID& mesh_id)
LLModel::Decomposition* LLMeshRepository::getDecomposition(const LLUUID& mesh_id)
{
LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; //LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
LLModel::Decomposition* ret = NULL;

View File

@ -453,7 +453,7 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const
BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// Skip if disabled globally.
// <FS:Ansariel> Performance improvement
//if (!gSavedSettings.getBOOL("AvatarPhysics"))

View File

@ -637,7 +637,7 @@ LLSD LLSettingsVOSky::convertToLegacy(const LLSettingsSky::ptr_t &psky, bool isA
//-------------------------------------------------------------------------
void LLSettingsVOSky::updateSettings()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
LLSettingsSky::updateSettings();
LLVector3 sun_direction = getSunDirection();
LLVector3 moon_direction = getMoonDirection();
@ -666,7 +666,7 @@ void LLSettingsVOSky::updateSettings()
void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
LLVector4 light_direction = LLEnvironment::instance().getClampedLightNorm();
LLShaderUniforms* shader = &((LLShaderUniforms*)ptarget)[LLGLSLShader::SG_DEFAULT];
@ -909,7 +909,7 @@ LLSD LLSettingsVOWater::convertToLegacy(const LLSettingsWater::ptr_t &pwater)
//-------------------------------------------------------------------------
void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
LLEnvironment& env = LLEnvironment::instance();
@ -966,7 +966,7 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
void LLSettingsVOWater::updateSettings()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
// base class clears dirty flag so as to not trigger recursive update
LLSettingsBase::updateSettings();

View File

@ -133,7 +133,7 @@ void LLSkinningUtil::initSkinningMatrixPalette(
const LLMeshSkinInfo* skin,
LLVOAvatar *avatar)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
initJointNums(const_cast<LLMeshSkinInfo*>(skin), avatar);
@ -278,7 +278,7 @@ void LLSkinningUtil::initJointNums(LLMeshSkinInfo* skin, LLVOAvatar *avatar)
{
if (!skin->mJointNumsInitialized)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
for (U32 j = 0; j < skin->mJointNames.size(); ++j)
{
#if DEBUG_SKINNING

View File

@ -302,7 +302,7 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
group->mLastUpdateViewAngle = group->mViewAngle;
}
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
group->clearDrawMap();
@ -373,7 +373,7 @@ LLSpatialGroup* LLSpatialGroup::getParent()
BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
if(!drawablep)
{
@ -462,7 +462,7 @@ public:
void LLSpatialGroup::setState(U32 state, S32 mode)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
llassert(state <= LLSpatialGroup::STATE_MASK);
@ -511,7 +511,7 @@ public:
void LLSpatialGroup::clearState(U32 state, S32 mode)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
llassert(state <= LLSpatialGroup::STATE_MASK);
@ -595,7 +595,7 @@ void LLSpatialGroup::updateDistance(LLCamera &camera)
F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
LLVector4a eye;
LLVector4a origin;
@ -654,9 +654,11 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
dist = eye.getLength3().getF32();
}
#if !LL_RELEASE
LL_DEBUGS("RiggedBox") << "calcDistance, group " << group << " camera " << origin << " obj bounds "
<< group->mObjectBounds[0] << ", " << group->mObjectBounds[1]
<< " dist " << dist << " radius " << group->mRadius << LL_ENDL;
#endif
if (dist < 16.f)
{
@ -688,7 +690,7 @@ F32 LLSpatialGroup::getUpdateUrgency() const
BOOL LLSpatialGroup::changeLOD()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
if (hasState(ALPHA_DIRTY | OBJECT_DIRTY))
{
@ -782,7 +784,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
if (child->getListenerCount() == 0)
{
@ -1372,7 +1374,7 @@ void LLSpatialPartition::resetVertexBuffers()
BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
LLVector4a visMina, visMaxa;
visMina.load3(visMin.mV);
visMaxa.load3(visMax.mV);
@ -1399,7 +1401,7 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera)
S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
#if LL_OCTREE_PARANOIA_CHECK
((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
#endif
@ -1420,7 +1422,7 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* result
S32 LLSpatialPartition::cull(LLCamera &camera, bool do_occlusion)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
#if LL_OCTREE_PARANOIA_CHECK
((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
#endif

View File

@ -634,6 +634,7 @@ class LLVolumeGeometryManager: public LLGeometryManager
virtual void rebuildGeom(LLSpatialGroup* group);
virtual void rebuildMesh(LLSpatialGroup* group);
virtual void getGeometry(LLSpatialGroup* group);
virtual void addGeometryCount(LLSpatialGroup* group, U32& vertex_count, U32& index_count);
U32 genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort = FALSE, BOOL batch_textures = FALSE, BOOL rigged = FALSE);
void registerFace(LLSpatialGroup* group, LLFace* facep, U32 type);

View File

@ -235,7 +235,7 @@ void display_stats()
// </FS:Ansariel>
if (fps_log_freq > 0.f && gRecentFPSTime.getElapsedTimeF32() >= fps_log_freq)
{
LL_PROFILE_ZONE_NAMED("DS - FPS");
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - FPS");
F32 fps = gRecentFrameCount / fps_log_freq;
LL_INFOS() << llformat("FPS: %.02f", fps) << LL_ENDL;
gRecentFrameCount = 0;
@ -248,7 +248,7 @@ void display_stats()
// </FS:Ansariel>
if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq)
{
LL_PROFILE_ZONE_NAMED("DS - Memory");
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - Memory");
gMemoryAllocated = U64Bytes(LLMemory::getCurrentRSS());
U32Megabytes memory = gMemoryAllocated;
LL_INFOS() << "MEMORY: " << memory << LL_ENDL;
@ -258,7 +258,7 @@ void display_stats()
F32 asset_storage_log_freq = gSavedSettings.getF32("AssetStorageLogFrequency");
if (asset_storage_log_freq > 0.f && gAssetStorageLogTime.getElapsedTimeF32() >= asset_storage_log_freq)
{
LL_PROFILE_ZONE_NAMED("DS - Asset Storage");
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - Asset Storage");
gAssetStorageLogTime.reset();
gAssetStorage->logAssetStorageInfo();
}
@ -752,7 +752,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (!gDisconnected)
{
LL_PROFILE_ZONE_NAMED("display - 1");
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 1");
LLAppViewer::instance()->pingMainloopTimeout("Display:Update");
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{ //don't draw hud objects in this frame
@ -828,7 +828,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:Swap");
{
LL_PROFILE_ZONE_NAMED("display - 2")
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 2")
if (gResizeScreenTexture)
{
gResizeScreenTexture = FALSE;
@ -880,7 +880,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//if (!for_snapshot)
{
LL_PROFILE_ZONE_NAMED("display - 3")
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 3")
LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery");
gPipeline.generateWaterReflection(camera); // <FS:Ansariel> Factor out calls to getInstance
gPipeline.generateHighlight(camera); // <FS:Ansariel> Factor out calls to getInstance
@ -938,7 +938,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//
LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort");
{
LL_PROFILE_ZONE_NAMED("display - 3")
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 4")
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
gPipeline.stateSort(camera, result); // <FS:Ansariel> Factor out calls to getInstance
stop_glerror();
@ -963,7 +963,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLAppViewer::instance()->pingMainloopTimeout("Display:Sky");
LL_RECORD_BLOCK_TIME(FTM_UPDATE_SKY);
LL_PROFILE_ZONE_NAMED_CATEGORY_ENVIRONMENT("update sky"); //LL_RECORD_BLOCK_TIME(FTM_UPDATE_SKY);
gSky.updateSky();
}
@ -1051,7 +1051,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot())
&& !gRestoreGL)
{
LL_PROFILE_ZONE_NAMED("display - 4")
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 5")
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
// <FS:Ansariel> gSavedSettings replacement
@ -1386,7 +1386,7 @@ bool setup_hud_matrices(const LLRect& screen_region)
void render_ui(F32 zoom_factor, int subfield)
{
FSPerfStats::RecordSceneTime T ( FSPerfStats::StatType_t::RENDER_UI ); // <FS:Beq/> render time capture - Primary UI stat can have HUD time overlap (TODO)
LL_RECORD_BLOCK_TIME(FTM_RENDER_UI);
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI);
LLGLState::checkStates();
@ -1418,7 +1418,7 @@ void render_ui(F32 zoom_factor, int subfield)
// 1. Use a new scope
// 2. Use named zones
// 3. Use transient zones
LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD);
LL_PROFILE_ZONE_NAMED_CATEGORY_UI("HUD"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD);
render_hud_elements();
// [RLVa:KB] - Checked: RLVa-2.2 (@setoverlay)
if (RlvActions::hasBehaviour(RLV_BHVR_SETOVERLAY))
@ -1440,7 +1440,7 @@ void render_ui(F32 zoom_factor, int subfield)
{
if (!gDisconnected)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_3D);
LL_PROFILE_ZONE_NAMED_CATEGORY_UI("UI 3D"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_3D);
render_ui_3d();
LLGLState::checkStates();
}
@ -1449,7 +1449,7 @@ void render_ui(F32 zoom_factor, int subfield)
render_disconnected_background();
}
LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_2D);
LL_PROFILE_ZONE_NAMED_CATEGORY_UI("UI 2D"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_2D);
render_ui_2d();
LLGLState::checkStates();
}

View File

@ -649,7 +649,7 @@ void LLViewerMedia::onIdle(void *dummy_arg)
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMedia::updateMedia(void *dummy_arg)
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE);
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; //LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE);
// Enable/disable the plugin read thread
// <FS:Ansariel> Replace frequently called gSavedSettings
@ -670,7 +670,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
impl_list::iterator end = sViewerMediaImplList.end();
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE_INTEREST);
LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("media update interest"); //LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE_INTEREST);
for(; iter != end;)
{
LLViewerMediaImpl* pimpl = *iter++;
@ -682,12 +682,12 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
// Let the spare media source actually launch
if(mSpareBrowserMediaSource)
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_SPARE_IDLE);
LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("media spare idle"); //LL_RECORD_BLOCK_TIME(FTM_MEDIA_SPARE_IDLE);
mSpareBrowserMediaSource->idle();
}
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT);
LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("media sort"); //LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT);
// Sort the static instance list using our interest criteria
sViewerMediaImplList.sort(priorityComparitor);
}
@ -731,7 +731,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
// If max_normal + max_low is less than max_instances, things will tend to get unloaded instead of being set to slideshow.
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_MISC);
LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("media misc"); //LL_RECORD_BLOCK_TIME(FTM_MEDIA_MISC);
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
@ -920,7 +920,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
}
else
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT2);
LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("media sort2"); // LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT2);
// Use a distance-based sort for proximity values.
std::stable_sort(proximity_order.begin(), proximity_order.end(), proximity_comparitor);
}
@ -2859,7 +2859,7 @@ static LLTrace::BlockTimerStatHandle FTM_MEDIA_SET_SUBIMAGE("Set Subimage");
void LLViewerMediaImpl::update()
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_DO_UPDATE);
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; //LL_RECORD_BLOCK_TIME(FTM_MEDIA_DO_UPDATE);
if(mMediaSource == NULL)
{
if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED)
@ -2957,7 +2957,7 @@ void LLViewerMediaImpl::update()
U8* data = NULL;
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_GET_DATA);
LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("media get data"); //LL_RECORD_BLOCK_TIME(FTM_MEDIA_GET_DATA);
data = mMediaSource->getBitsData();
}
@ -2968,7 +2968,7 @@ void LLViewerMediaImpl::update()
data += ( y_pos * mMediaSource->getTextureDepth() );
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("media set subimage"); //LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
placeholder_image->setSubImage(
data,
mMediaSource->getBitsWidth(),
@ -3579,7 +3579,7 @@ static LLTrace::BlockTimerStatHandle FTM_MEDIA_CALCULATE_INTEREST("Calculate Int
void LLViewerMediaImpl::calculateInterest()
{
LL_RECORD_BLOCK_TIME(FTM_MEDIA_CALCULATE_INTEREST);
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; //LL_RECORD_BLOCK_TIME(FTM_MEDIA_CALCULATE_INTEREST);
LLViewerMediaTexture* texture = LLViewerTextureManager::findMediaTexture( mTextureId );
if(texture != NULL)

View File

@ -178,7 +178,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
if(objectp && objectp->getRegion())
{
@ -339,7 +339,7 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects");
LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
LLDataPacker *cached_dpp = entry->getDP();
@ -940,7 +940,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
void LLViewerObjectList::update(LLAgent &agent)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
// <FS:Ansariel> Speed up debug settings
static LLCachedControl<bool> velocityInterpolate(gSavedSettings, "VelocityInterpolate");
static LLCachedControl<bool> pingInterpolate(gSavedSettings, "PingInterpolate");
@ -1470,7 +1470,7 @@ void LLViewerObjectList::clearDebugText()
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
// <FS:Beq> FIRE-30694 DeadObject Spam - handle new_dead_object properly and closer to source
// bool new_dead_object = true;
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
@ -1534,7 +1534,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
void LLViewerObjectList::removeDrawable(LLDrawable* drawablep)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (!drawablep)
{
@ -1769,7 +1769,7 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (objectp->isDead())
{
@ -1884,7 +1884,7 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id)
void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
// This is called when we shift our origin when we cross region boundaries...
// We need to update many object caches, I'll document this more as I dig through the code
// cleaning things out...
@ -2153,7 +2153,7 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 &center)
void LLViewerObjectList::generatePickList(LLCamera &camera)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLViewerObject *objectp;
S32 i;
@ -2432,7 +2432,7 @@ LLViewerObject *LLViewerObjectList::replaceObject(const LLUUID &id, const LLPCod
S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLViewerObject *objectp;
S32 num_refs = 0;
@ -2497,7 +2497,7 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip
void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
if (objectp->isDead())
{

View File

@ -545,7 +545,7 @@ void LLViewerOctreeGroup::unbound()
//virtual
void LLViewerOctreeGroup::rebound()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE;
if (!isDirty())
{
return;
@ -1054,7 +1054,7 @@ void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode /* = STATE
BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE;
if (camera->getOrigin().isExactlyZero())
{
return FALSE;
@ -1105,7 +1105,7 @@ void LLOcclusionCullingGroup::checkOcclusion()
{
if (LLPipeline::sUseOcclusion < 2) return; // 0 - NoOcclusion, 1 = ReadOnly, 2 = ModifyOcclusionState TODO: DJH 11-2021 ENUM this
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE;
LLOcclusionCullingGroup* parent = (LLOcclusionCullingGroup*)getParent();
if (parent && parent->isOcclusionState(LLOcclusionCullingGroup::OCCLUDED))
{ //if the parent has been marked as occluded, the child is implicitly occluded
@ -1127,7 +1127,7 @@ void LLOcclusionCullingGroup::checkOcclusion()
{
GLuint available;
{
LL_PROFILE_ZONE_NAMED("co - query available");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("co - query available");
glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
}
@ -1135,7 +1135,7 @@ void LLOcclusionCullingGroup::checkOcclusion()
{
GLuint query_result; // Will be # samples drawn, or a boolean depending on mHasOcclusionQuery2 (both are type GLuint)
{
LL_PROFILE_ZONE_NAMED("co - query result");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("co - query result");
glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_ARB, &query_result);
}
#if LL_TRACK_PENDING_OCCLUSION_QUERIES
@ -1178,7 +1178,7 @@ void LLOcclusionCullingGroup::checkOcclusion()
void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* shift)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE;
if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1)
{
//move mBounds to the agent space if necessary
@ -1199,7 +1199,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
// Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension
if (earlyFail(camera, bounds))
{
LL_PROFILE_ZONE_NAMED("doOcclusion - early fail");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("doOcclusion - early fail");
setOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY);
assert_states_valid(this);
clearOcclusionState(LLOcclusionCullingGroup::OCCLUDED, LLOcclusionCullingGroup::STATE_MODE_DIFF);
@ -1210,7 +1210,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
if (!isOcclusionState(QUERY_PENDING) || isOcclusionState(DISCARD_QUERY))
{
{ //no query pending, or previous query to be discarded
LL_PROFILE_ZONE_NAMED("doOcclusion - render");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("doOcclusion - render");
if (!mOcclusionQuery[LLViewerCamera::sCurCameraID])
{
@ -1238,7 +1238,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
add(sOcclusionQueries, 1);
{
LL_PROFILE_ZONE_NAMED("doOcclusion - push");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("doOcclusion - push");
//store which frame this query was issued on
mOcclusionIssued[LLViewerCamera::sCurCameraID] = gFrameCount;
@ -1255,7 +1255,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_VOIDWATER)
{
LL_PROFILE_ZONE_NAMED("doOcclusion - draw water");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("doOcclusion - draw water");
LLGLSquashToFarClip squash;
if (camera->getOrigin().isExactlyZero())
@ -1270,7 +1270,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
}
else
{
LL_PROFILE_ZONE_NAMED("doOcclusion - draw");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("doOcclusion - draw");
if (camera->getOrigin().isExactlyZero())
{ //origin is invalid, draw entire box
gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0);
@ -1287,7 +1287,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
}
{
LL_PROFILE_ZONE_NAMED("doOcclusion - set state");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("doOcclusion - set state");
setOcclusionState(LLOcclusionCullingGroup::QUERY_PENDING);
clearOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY);
}
@ -1351,17 +1351,17 @@ void LLViewerOctreeCull::traverse(const OctreeNode* n)
if (mRes == 2 ||
(mRes && group->hasState(LLViewerOctreeGroup::SKIP_FRUSTUM_CHECK)))
{ //fully in, just add everything
LL_PROFILE_ZONE_NAMED("AllInside");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("AllInside");
OctreeTraveler::traverse(n);
}
else
{
LL_PROFILE_ZONE_NAMED("Check inside?");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("Check inside?");
mRes = frustumCheck(group);
if (mRes)
{ //at least partially in, run on down
LL_PROFILE_ZONE_NAMED("PartiallyIn");
LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("PartiallyIn");
OctreeTraveler::traverse(n);
}

View File

@ -203,7 +203,7 @@ void LLViewerTextureManager::findFetchedTextures(const LLUUID& id, std::vector<L
void LLViewerTextureManager::findTextures(const LLUUID& id, std::vector<LLViewerTexture*> &output)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
std::vector<LLViewerFetchedTexture*> fetched_output;
gTextureList.findTexturesByID(id, fetched_output);
std::vector<LLViewerFetchedTexture*>::iterator iter = fetched_output.begin();
@ -228,7 +228,7 @@ void LLViewerTextureManager::findTextures(const LLUUID& id, std::vector<LLViewe
LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID& id, S32 tex_type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
return gTextureList.findImage(id, (ETexListType)tex_type);
}
@ -512,7 +512,7 @@ F32 texmem_middle_bound_scale = 0.925f;
//static
bool LLViewerTexture::isMemoryForTextureLow()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// <FS:ND> Disable memory checking on request
static LLCachedControl<bool> FSDisableMemCheck(gSavedSettings, "FSDisableAMDTextureMemoryCheck");
if (FSDisableMemCheck)
@ -535,7 +535,7 @@ bool LLViewerTexture::isMemoryForTextureLow()
//static
bool LLViewerTexture::isMemoryForTextureSuficientlyFree()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
const S32Megabytes DESIRED_FREE_TEXTURE_MEMORY(50);
const S32Megabytes DESIRED_FREE_MAIN_MEMORY(200);
@ -549,7 +549,7 @@ bool LLViewerTexture::isMemoryForTextureSuficientlyFree()
//static
void LLViewerTexture::getGPUMemoryForTextures(S32Megabytes &gpu, S32Megabytes &physical)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static LLFrameTimer timer;
static S32Megabytes gpu_res = S32Megabytes(S32_MAX);
static S32Megabytes physical_res = S32Megabytes(S32_MAX);
@ -596,7 +596,7 @@ void LLViewerTexture::getGPUMemoryForTextures(S32Megabytes &gpu, S32Megabytes &p
//static
void LLViewerTexture::updateClass()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
sCurrentTime = gFrameTimeSeconds;
LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
@ -768,7 +768,7 @@ void LLViewerTexture::cleanup()
void LLViewerTexture::notifyAboutCreatingTexture()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
{
for(U32 f = 0; f < mNumFaces[ch]; f++)
@ -780,7 +780,7 @@ void LLViewerTexture::notifyAboutCreatingTexture()
void LLViewerTexture::notifyAboutMissingAsset()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
{
for(U32 f = 0; f < mNumFaces[ch]; f++)
@ -793,7 +793,7 @@ void LLViewerTexture::notifyAboutMissingAsset()
// virtual
void LLViewerTexture::dump()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLGLTexture::dump();
LL_INFOS() << "LLViewerTexture"
@ -829,7 +829,7 @@ bool LLViewerTexture::isActiveFetching()
bool LLViewerTexture::bindDebugImage(const S32 stage)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (stage < 0) return false;
bool res = true;
@ -848,7 +848,7 @@ bool LLViewerTexture::bindDebugImage(const S32 stage)
bool LLViewerTexture::bindDefaultImage(S32 stage)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (stage < 0) return false;
bool res = true;
@ -891,7 +891,7 @@ void LLViewerTexture::forceImmediateUpdate()
void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(needs_gltexture)
{
mNeedsGLTexture = TRUE;
@ -934,7 +934,7 @@ void LLViewerTexture::setKnownDrawSize(S32 width, S32 height)
//virtual
void LLViewerTexture::addFace(U32 ch, LLFace* facep)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
if(mNumFaces[ch] >= mFaceList[ch].size())
@ -950,7 +950,7 @@ void LLViewerTexture::addFace(U32 ch, LLFace* facep)
//virtual
void LLViewerTexture::removeFace(U32 ch, LLFace* facep)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
if(mNumFaces[ch] > 1)
@ -991,7 +991,7 @@ S32 LLViewerTexture::getNumFaces(U32 ch) const
//virtual
void LLViewerTexture::addVolume(U32 ch, LLVOVolume* volumep)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (mNumVolumes[ch] >= mVolumeList[ch].size())
{
mVolumeList[ch].resize(2 * mNumVolumes[ch] + 1);
@ -1005,7 +1005,7 @@ void LLViewerTexture::addVolume(U32 ch, LLVOVolume* volumep)
//virtual
void LLViewerTexture::removeVolume(U32 ch, LLVOVolume* volumep)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (mNumVolumes[ch] > 1)
{
S32 index = volumep->getIndexInTex(ch);
@ -1029,7 +1029,7 @@ S32 LLViewerTexture::getNumVolumes(U32 ch) const
void LLViewerTexture::reorganizeFaceList()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static const F32 MAX_WAIT_TIME = 20.f; // seconds
static const U32 MAX_EXTRA_BUFFER_SIZE = 4;
@ -1053,7 +1053,7 @@ void LLViewerTexture::reorganizeFaceList()
void LLViewerTexture::reorganizeVolumeList()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static const F32 MAX_WAIT_TIME = 20.f; // seconds
static const U32 MAX_EXTRA_BUFFER_SIZE = 4;
@ -1270,7 +1270,7 @@ FTType LLViewerFetchedTexture::getFTType() const
void LLViewerFetchedTexture::cleanup()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
iter != mLoadedCallbackList.end(); )
{
@ -1296,7 +1296,7 @@ void LLViewerFetchedTexture::cleanup()
//access the fast cache
void LLViewerFetchedTexture::loadFromFastCache()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!mInFastCacheList)
{
return; //no need to access the fast cache.
@ -1442,7 +1442,7 @@ void LLViewerFetchedTexture::dump()
// ONLY called from LLViewerFetchedTextureList
void LLViewerFetchedTexture::destroyTexture()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// <FS:Ansariel>
//if(LLImageGL::sGlobalTextureMemory < sMaxDesiredTextureMem * 0.95f)//not ready to release unused memory.
static LLCachedControl<bool> fsDestroyGLTexturesImmediately(gSavedSettings, "FSDestroyGLTexturesImmediately");
@ -1464,7 +1464,7 @@ void LLViewerFetchedTexture::destroyTexture()
void LLViewerFetchedTexture::addToCreateTexture()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
bool force_update = false;
if (getComponents() != mRawImage->getComponents())
{
@ -1506,7 +1506,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
}
else
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
#if 1
//
//if mRequestedDiscardLevel > mDesiredDiscardLevel, we assume the required image res keep going up,
@ -1559,7 +1559,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
// ONLY called from LLViewerTextureList
BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
#if LL_IMAGEGL_THREAD_CHECK
mGLTexturep->checkActiveThread();
#endif
@ -2107,7 +2107,7 @@ void LLViewerFetchedTexture::setAdditionalDecodePriority(F32 priority)
void LLViewerFetchedTexture::updateVirtualSize()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!mMaxVirtualSizeResetCounter)
{
addTextureStats(0.f, FALSE);//reset
@ -2199,7 +2199,7 @@ bool LLViewerFetchedTexture::isActiveFetching()
bool LLViewerFetchedTexture::updateFetch()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled", false);
static LLCachedControl<F32> sCameraMotionThreshold(gSavedSettings,"TextureCameraMotionThreshold", 0.2f);
static LLCachedControl<S32> sCameraMotionBoost(gSavedSettings,"TextureCameraMotionBoost", 3);
@ -2790,7 +2790,7 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s
bool LLViewerFetchedTexture::doLoadedCallbacks()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static const F32 MAX_INACTIVE_TIME = 900.f ; //seconds
static const F32 MAX_IDLE_WAIT_TIME = 5.f ; //seconds
@ -3141,7 +3141,7 @@ void LLViewerFetchedTexture::destroyRawImage()
//virtual
void LLViewerFetchedTexture::switchToCachedImage()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(mCachedRawImage.notNull() &&
!mNeedsCreateTexture) // <--- texture creation is pending, don't step on it
{
@ -3433,7 +3433,7 @@ bool LLViewerLODTexture::isUpdateFrozen()
//virtual
void LLViewerLODTexture::processTextureStats()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
updateVirtualSize();
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
@ -3597,7 +3597,7 @@ bool LLViewerLODTexture::scaleDown()
//static
void LLViewerMediaTexture::updateClass()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static const F32 MAX_INACTIVE_TIME = 30.f;
#if 0

View File

@ -114,7 +114,7 @@ void LLViewerTextureList::init()
void LLViewerTextureList::doPreloadImages()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;
llassert_always(mInitialized) ;
@ -206,7 +206,7 @@ static std::string get_texture_list_name()
void LLViewerTextureList::doPrefetchImages()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (LLAppViewer::instance()->getPurgeCache())
{
// cache was purged, no point
@ -260,7 +260,7 @@ LLViewerTextureList::~LLViewerTextureList()
void LLViewerTextureList::shutdown()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LL_WARNS() << "Shutdown called" << LL_ENDL;
// clear out preloads
mImagePreloads.clear();
@ -342,7 +342,7 @@ void LLViewerTextureList::shutdown()
void LLViewerTextureList::dump()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LL_INFOS() << "LLViewerTextureList::dump()" << LL_ENDL;
for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
{
@ -387,7 +387,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
LLGLenum primary_format,
const LLUUID& force_id)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!mInitialized)
{
return NULL ;
@ -415,7 +415,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
LLGLenum primary_format,
const LLUUID& force_id)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!mInitialized)
{
return NULL ;
@ -498,7 +498,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
LLGLenum primary_format,
LLHost request_from_host)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!mInitialized)
{
return NULL ;
@ -561,7 +561,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
LLGLenum primary_format,
LLHost request_from_host)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static LLCachedControl<bool> fast_cache_fetching_enabled(gSavedSettings, "FastCacheFetchEnabled", true);
LLPointer<LLViewerFetchedTexture> imagep ;
@ -611,7 +611,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector<LLViewerFetchedTexture*> &output)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLTextureKey search_key(image_id, TEX_LIST_STANDARD);
uuid_map_t::iterator iter = mUUIDMap.lower_bound(search_key);
while (iter != mUUIDMap.end() && iter->first.textureId == image_id)
@ -623,7 +623,7 @@ void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector<L
LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLTextureKey &search_key)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
uuid_map_t::iterator iter = mUUIDMap.find(search_key);
if (iter == mUUIDMap.end())
return NULL;
@ -637,7 +637,7 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id, E
void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
assert_main_thread();
llassert_always(mInitialized) ;
llassert(image);
@ -657,7 +657,7 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
assert_main_thread();
llassert_always(mInitialized) ;
llassert(image);
@ -706,7 +706,7 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image, ETexListType tex_type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (!new_image)
{
return;
@ -732,7 +732,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image, ETexListTy
void LLViewerTextureList::deleteImage(LLViewerFetchedTexture *image)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if( image)
{
if (image->hasCallbacks())
@ -763,7 +763,7 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
void LLViewerTextureList::updateImages(F32 max_time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
static BOOL cleared = FALSE;
if(gTeleportDisplay)
{
@ -835,7 +835,7 @@ void LLViewerTextureList::updateImages(F32 max_time)
void LLViewerTextureList::clearFetchingRequests()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
{
return;
@ -975,7 +975,7 @@ void LLViewerTextureList::recalcImageDecodePriority(LLPointer<LLViewerFetchedTex
void LLViewerTextureList::updateImagesDecodePriorities()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// Update the decode priority for N images each frame
static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32
const size_t max_update_count = llmin((S32)(MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds.value()) + 1, MAX_PRIO_UPDATES);
@ -1100,7 +1100,7 @@ void LLViewerTextureList::updateOneImageDecodePriority(LLPointer<LLViewerFetched
void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!tex->setDebugFetching(debug_level))
{
return;
@ -1149,7 +1149,7 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu
F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (gGLManager.mIsDisabled) return 0.0f;
//
@ -1178,7 +1178,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (gGLManager.mIsDisabled) return 0.0f;
if(mFastCacheList.empty())
{
@ -1212,7 +1212,7 @@ F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time)
void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!imagep)
{
return ;
@ -1232,7 +1232,7 @@ void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep)
F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLTimer image_op_timer;
// Update fetch for N images each frame
@ -1308,7 +1308,7 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
void LLViewerTextureList::updateImagesUpdateStats()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (mForceResetTextureStats)
{
for (image_priority_list_t::iterator iter = mImageList.begin();
@ -1323,7 +1323,7 @@ void LLViewerTextureList::updateImagesUpdateStats()
void LLViewerTextureList::decodeAllImages(F32 max_time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLTimer timer;
//loading from fast cache
@ -1393,7 +1393,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
const std::string& out_filename,
const U8 codec)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// Load the image
LLPointer<LLImageFormatted> image = LLImageFormatted::createFromType(codec);
if (image.isNull())
@ -1447,7 +1447,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
// note: modifies the argument raw_image!!!!
LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> raw_image)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
raw_image->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C();
@ -1481,7 +1481,7 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
// Returns min setting for TextureMemory (in MB)
S32Megabytes LLViewerTextureList::getMinVideoRamSetting()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
U32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB();
//min texture mem sets to 64M if total physical mem is more than 1.5GB
return (system_ram > U32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ;
@ -1494,7 +1494,7 @@ S32Megabytes LLViewerTextureList::getMinVideoRamSetting()
S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_multiplier, bool clamp_upper_limit /* = true */)
// </FS:Ansariel>
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
S32Megabytes max_texmem;
if (gGLManager.mVRAM != 0)
{
@ -1564,7 +1564,7 @@ const S32Megabytes VIDEO_CARD_FRAMEBUFFER_MEM(12);
const S32Megabytes MIN_MEM_FOR_NON_TEXTURE(512);
void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// Initialize the image pipeline VRAM settings
S32Megabytes cur_mem(gSavedSettings.getS32("TextureMemory"));
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
@ -1727,7 +1727,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ;
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// Receive image header, copy into image object and decompresses
// if this is a one-packet image.
@ -1799,7 +1799,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ;
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// Receives image packet, copy into image object,
// checks if all packets received, decompresses if so.
@ -1872,7 +1872,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
// static
void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLUUID image_id;
msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id);
@ -1905,7 +1905,7 @@ void LLUIImageList::cleanUp()
LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// use id as image name
std::string image_name = image_id.asString();
@ -1924,7 +1924,7 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority)
LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// look for existing image
uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name);
if (found_it != mUIImages.end())
@ -1942,7 +1942,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std
BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (boost_priority == LLGLTexture::BOOST_NONE)
{
boost_priority = LLGLTexture::BOOST_UI;
@ -1955,7 +1955,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (boost_priority == LLGLTexture::BOOST_NONE)
{
boost_priority = LLGLTexture::BOOST_UI;
@ -1967,7 +1967,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect,
LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (!imagep) return NULL;
imagep->setAddressMode(LLTexUnit::TAM_CLAMP);
@ -2005,7 +2005,7 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// look for existing image
uuid_ui_image_map_t::iterator found_it = mUIImages.find(name);
if (found_it != mUIImages.end())
@ -2020,7 +2020,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s
//static
void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* user_data )
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!success || !user_data)
{
return;
@ -2122,7 +2122,7 @@ struct UIImageDeclarations : public LLInitParam::Block<UIImageDeclarations>
bool LLUIImageList::initFromFile()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// Look for textures.xml in all the right places. Pass
// constraint=LLDir::ALL_SKINS because we want to overlay textures.xml
// from all the skins directories.

View File

@ -3811,13 +3811,13 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
}
}
static LLTrace::BlockTimerStatHandle FTM_UPDATE_UI("Update UI"); // <FS:Beq/> rename to sensible symbol
static LLTrace::BlockTimerStatHandle ftm("Update UI");
// Update UI based on stored mouse position from mouse-move
// event processing.
void LLViewerWindow::updateUI()
{
LL_RECORD_BLOCK_TIME(FTM_UPDATE_UI); // <FS:Beq/> rename to sensible symbol
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(ftm);
static std::string last_handle_msg;
@ -6589,7 +6589,7 @@ void LLViewerWindow::setup3DRender()
void LLViewerWindow::setup3DViewport(S32 x_offset, S32 y_offset)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
gGLViewport[0] = mWorldViewRectRaw.mLeft + x_offset;
gGLViewport[1] = mWorldViewRectRaw.mBottom + y_offset;
gGLViewport[2] = mWorldViewRectRaw.getWidth();

View File

@ -353,7 +353,7 @@ public:
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
F32 nx[2];
nx[0]=time*TORSO_NOISE_SPEED;
nx[1]=0.0f;
@ -474,7 +474,7 @@ public:
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
mBreatheRate = 1.f;
F32 breathe_amt = (sinf(mBreatheRate * time) * BREATHE_ROT_MOTION_STRENGTH);
@ -576,7 +576,7 @@ public:
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
mPelvisState->setPosition(LLVector3::zero);
return TRUE;
@ -1452,7 +1452,7 @@ void LLVOAvatar::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
//<FS:Beq> not called as often as it used to be but still no harm in optimising
// S32 box_detail = gSavedSettings.getS32("AvatarBoundingBoxComplexity");
@ -2691,7 +2691,7 @@ void LLVOAvatar::dumpAnimationState()
//------------------------------------------------------------------------
void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (isDead())
{
@ -2987,7 +2987,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
static void override_bbox(LLDrawable* drawable, LLVector4a* extents)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
drawable->setSpatialExtents(extents[0], extents[1]);
drawable->setPositionGroup(LLVector4a(0, 0, 0));
drawable->movePartition();
@ -2995,7 +2995,7 @@ static void override_bbox(LLDrawable* drawable, LLVector4a* extents)
void LLVOAvatar::idleUpdateMisc(bool detailed_update)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (LLVOAvatar::sJointDebug)
{
LL_INFOS() << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL;
@ -3397,7 +3397,7 @@ void LLVOAvatar::idleUpdateWindEffect()
void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// update chat bubble
//--------------------------------------------------------------------
@ -4234,7 +4234,7 @@ void LLVOAvatar::slamPosition()
bool LLVOAvatar::isVisuallyMuted()
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq/> Tracy accounting for imposter testing.
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // <FS:Beq/> Tracy accounting for imposter testing.
bool muted = false;
// <FS:Ansariel> FIRE-11783: Always visually mute avatars that are muted
@ -4288,7 +4288,7 @@ bool LLVOAvatar::isVisuallyMuted()
bool LLVOAvatar::isInMuteList() const
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq/> Tracy accounting for imposter testing.
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // <FS:Beq/> Tracy accounting for imposter testing.
bool muted = false;
F64 now = LLFrameTimer::getTotalSeconds();
if (now < mCachedMuteListUpdateTime)
@ -5601,7 +5601,7 @@ bool LLVOAvatar::shouldAlphaMask()
//-----------------------------------------------------------------------------
U32 LLVOAvatar::renderSkinned()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
U32 num_indices = 0;
@ -5829,7 +5829,7 @@ U32 LLVOAvatar::renderSkinned()
U32 LLVOAvatar::renderTransparent(BOOL first_pass)
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq/> Tracy accounting for render tracking
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // <FS:Beq/> Tracy accounting for render tracking
U32 num_indices = 0;
if( isWearingWearableType( LLWearableType::WT_SKIRT ) && (isUIAvatar() || isTextureVisible(TEX_SKIRT_BAKED)) )
{
@ -5882,7 +5882,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
//-----------------------------------------------------------------------------
U32 LLVOAvatar::renderRigid()
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq/> Tracy accounting for render tracking
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // <FS:Beq/> Tracy accounting for render tracking
U32 num_indices = 0;
if (!mIsBuilt)
@ -5922,7 +5922,7 @@ U32 LLVOAvatar::renderRigid()
U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel)
{
LL_PROFILE_ZONE_SCOPED; // <FS:Beq/> Tracy accounting for render tracking
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // <FS:Beq/> Tracy accounting for render tracking
if (!mImpostor.isComplete())
{
return 0;
@ -6938,7 +6938,7 @@ const LLUUID& LLVOAvatar::getID() const
LLJoint *LLVOAvatar::getJoint( const JointKey &name )
// </FS:ND>
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
//<FS:ND> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
//joint_map_t::iterator iter = mJointMap.find( name );
@ -7958,7 +7958,7 @@ void LLVOAvatar::updateGL()
{
if (mMeshTexturesDirty)
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
updateMeshTextures();
mMeshTexturesDirty = FALSE;
}
@ -7969,7 +7969,7 @@ void LLVOAvatar::updateGL()
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (!(gPipeline.hasRenderType(mIsControlAvatar ? LLPipeline::RENDER_TYPE_CONTROL_AV : LLPipeline::RENDER_TYPE_AVATAR)))
{
return TRUE;
@ -8811,7 +8811,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL
// Do rigged mesh attachments display with this av?
bool LLVOAvatar::shouldRenderRigged() const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (getOverallAppearance() == AOA_NORMAL)
{
@ -9168,7 +9168,7 @@ void LLVOAvatar::markARTStale()
// Udpate Avatar state based on render time
void LLVOAvatar::updateTooSlow()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
static LLCachedControl<bool> alwaysRenderFriends(gSavedSettings, "AlwaysRenderFriends");
static LLCachedControl<bool> allowSelfImpostor(gSavedSettings, "FSAllowSelfImpostor");
const auto id = getID();
@ -9428,7 +9428,7 @@ void LLVOAvatar::updateMeshVisibility()
// virtual
void LLVOAvatar::updateMeshTextures()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
static S32 update_counter = 0;
mBakedTextureDebugText.clear();
@ -10599,7 +10599,7 @@ const LLVOAvatar::MatrixPaletteCache& LLVOAvatar::updateSkinInfoMatrixPalette(co
if (entry.mFrame != gFrameCount)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
entry.mFrame = gFrameCount;
@ -11421,7 +11421,7 @@ void showRigInfoTabExtents(LLVOAvatar *avatar, LLJointRiggingInfoTab& tab, S32&
void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
for ( LLVOAvatar::attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter )
{
LLViewerJointAttachment* attachment = iter->second;
@ -11482,7 +11482,7 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
// virtual
void LLVOAvatar::updateRiggingInfo()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
//LL_DEBUGS("RigSpammish") << getFullname() << " updating rig tab" << LL_ENDL; // <FS:Ansariel> Performance tweak
@ -11682,7 +11682,7 @@ void LLVOAvatar::updateImpostorRendering(U32 newMaxNonImpostorsValue)
void LLVOAvatar::idleUpdateRenderComplexity()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (isControlAvatar())
{
LLControlAvatar *cav = dynamic_cast<LLControlAvatar*>(this);
@ -12330,7 +12330,7 @@ void LLVOAvatar::updateOverallAppearanceAnimations()
// Based on isVisuallyMuted(), but has 3 possible results.
LLVOAvatar::AvatarOverallAppearance LLVOAvatar::getOverallAppearance() const
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
AvatarOverallAppearance result = AOA_NORMAL;
// Priority order (highest priority first)

View File

@ -510,7 +510,7 @@ void LLVOSky::cacheEnvironment(LLSettingsSky::ptr_t psky,AtmosphericsVars& atmos
void LLVOSky::calc()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
cacheEnvironment(psky,m_atmosphericsVars);
@ -681,7 +681,7 @@ bool LLVOSky::updateSky()
return TRUE;
}
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
static S32 next_frame = 0;
@ -719,7 +719,7 @@ bool LLVOSky::updateSky()
}
else if (mCubeMapUpdateStage == NUM_CUBEMAP_FACES)
{
LL_PROFILE_ZONE_NAMED("updateSky - forced");
LL_PROFILE_ZONE_NAMED_CATEGORY_ENVIRONMENT("updateSky - forced");
LLSkyTex::stepCurrent();
bool is_alm_wl_sky = gPipeline.canUseWindLightShaders();
@ -780,7 +780,7 @@ bool LLVOSky::updateSky()
// run 0 to 5 faces, each face in own frame
else if (mCubeMapUpdateStage >= 0 && mCubeMapUpdateStage < NUM_CUBEMAP_FACES)
{
LL_PROFILE_ZONE_NAMED("updateSky - create");
LL_PROFILE_ZONE_NAMED_CATEGORY_ENVIRONMENT("updateSky - create");
S32 side = mCubeMapUpdateStage;
// CPU hungry part, createSkyTexture() is math heavy
// Prior to EEP it was mostly per tile, but since EPP it is per face.
@ -972,7 +972,7 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_
BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (mFace[FACE_REFLECTION] == NULL)
{
LLDrawPoolWater *poolp = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER);

View File

@ -833,7 +833,7 @@ BOOL LLVOVolume::isVisible() const
void LLVOVolume::updateTextureVirtualSize(bool forced)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
// Update the pixel area of all faces
if (mDrawable.isNull())
@ -1138,7 +1138,7 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline)
BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bool unique_volume)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
LLVolumeParams volume_params = params_in;
S32 last_lod = mVolumep.notNull() ? LLVolumeLODGroup::getVolumeDetailFromScale(mVolumep->getDetail()) : -1;
@ -1794,7 +1794,7 @@ BOOL LLVOVolume::setParent(LLViewerObject* parent)
// NOTE: regenFaces() MUST be followed by genTriangles()!
void LLVOVolume::regenFaces()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
// remove existing faces
BOOL count_changed = mNumFaces != getNumTEs();
@ -2098,7 +2098,7 @@ void LLVOVolume::updateRelativeXform(bool force_identity)
bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
bool regen_faces = false;
LLVolume *old_volumep, *new_volumep;
@ -2162,7 +2162,7 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled)
BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
if (mDrawable->isState(LLDrawable::REBUILD_RIGGED))
{
@ -3962,7 +3962,7 @@ void LLVOVolume::afterReparent()
//----------------------------------------------------------------------------
void LLVOVolume::updateRiggingInfo()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
if (isRiggedMesh())
{
const LLMeshSkinInfo* skin = getSkinInfo();
@ -4612,7 +4612,7 @@ void LLVOVolume::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
F32 LLVOVolume::getBinRadius()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
F32 radius;
F32 scale = 1.f;
@ -5011,7 +5011,7 @@ void LLVOVolume::clearRiggedVolume()
void LLVOVolume::updateRiggedVolume(bool force_update)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
//Update mRiggedVolume to match current animation frame of avatar.
//Also update position/size in octree.
@ -5049,7 +5049,7 @@ void LLVOVolume::updateRiggedVolume(bool force_update)
void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* volume)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
bool copy = false;
if (volume->getNumVolumeFaces() != getNumVolumeFaces())
{
@ -5374,7 +5374,7 @@ void LLVolumeGeometryManager::freeFaces()
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
// <FS:Ansariel> Can't do anything about it anyway - stop spamming the log
//if ( type == LLRenderPass::PASS_ALPHA
// && facep->getTextureEntry()->getMaterialParams().notNull()
@ -5739,7 +5739,7 @@ static inline void add_face(T*** list, U32* count, T* face)
void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
if (group->changeLOD())
{
group->mLastUpdateDistance = group->mDistance;
@ -5785,8 +5785,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
group->clearDrawMap();
mFaceList.clear();
U32 fullbright_count[2] = { 0 };
U32 bump_count[2] = { 0 };
U32 simple_count[2] = { 0 };
@ -5815,7 +5813,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
#endif
{
LL_PROFILE_ZONE_NAMED("rebuildGeom - face list");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("rebuildGeom - face list");
//get all the faces into a list
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{}; // <FS:Beq/> render time capture
@ -6004,12 +6002,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
continue;
}
cur_total += facep->getGeomCount();
if (facep->hasGeometry() &&
if (facep->hasGeometry() &&
(rigged || // <-- HACK FIXME -- getPixelArea might be incorrect for rigged objects
facep->getPixelArea() > FORCE_CULL_AREA)) // <-- don't render tiny faces
{
cur_total += facep->getGeomCount();
const LLTextureEntry* te = facep->getTextureEntry();
LLViewerTexture* tex = facep->getTexture();
@ -6267,17 +6265,16 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
group->setState(LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO);
}
mFaceList.clear();
}
void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
llassert(group);
if (group && group->hasState(LLSpatialGroup::MESH_DIRTY) && !group->hasState(LLSpatialGroup::GEOM_DIRTY))
{
{
LL_PROFILE_ZONE_NAMED("rebuildMesh - gen draw info");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("rebuildMesh - gen draw info");
group->mBuilt = 1.f;
@ -6295,7 +6292,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) )
{
LL_PROFILE_ZONE_NAMED("Rebuild all non-Rigged");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("Rebuild all non-Rigged");
LLVOVolume* vobj = drawablep->getVOVolume();
// <FS:Beq> capture render times
if( vobj && vobj->isAttachment() )
@ -6362,7 +6359,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
}
{
LL_PROFILE_ZONE_NAMED("rebuildMesh - flush");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("rebuildMesh - flush");
for (LLVertexBuffer** iter = locked_buffer, ** end_iter = locked_buffer+buffer_count; iter != end_iter; ++iter)
{
(*iter)->flush();
@ -6476,7 +6473,7 @@ struct CompareBatchBreakerRigged
U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures, BOOL rigged)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
U32 geometryBytes = 0;
U32 buffer_usage = group->mBufferUsage;
@ -6508,7 +6505,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
max_vertices = llmin(max_vertices, (U32) 65535);
{
LL_PROFILE_ZONE_NAMED("genDrawInfo - sort");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("genDrawInfo - sort");
if (rigged)
{
@ -6607,7 +6604,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
U32 texture_count = 0;
{
LL_PROFILE_ZONE_NAMED("genDrawInfo - face size");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("genDrawInfo - face size");
if (batch_textures)
{
U8 cur_tex = 0;
@ -6733,7 +6730,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
LLPointer<LLVertexBuffer> buffer;
{
LL_PROFILE_ZONE_NAMED("genDrawInfo - allocate");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("genDrawInfo - allocate");
buffer = createVertexBuffer(mask, buffer_usage);
if(!buffer->allocateBuffer(geom_count, index_count, TRUE))
{
@ -6981,7 +6978,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
if (te->getAlpha() <=0.f || facep->getFaceColor().mV[3] <= 0.f)
// </FS:Beq>
{ //100% transparent, don't render unless we're highlighting transparent
LL_PROFILE_ZONE_NAMED("facep->alpha -> invisible");
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("facep->alpha -> invisible");
registerFace(group, facep, LLRenderPass::PASS_ALPHA_INVISIBLE);
}
else if (facep->canRenderAsMask())
@ -7125,18 +7122,41 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
return geometryBytes;
}
void LLVolumeGeometryManager::addGeometryCount(LLSpatialGroup* group, U32& vertex_count, U32& index_count)
{
//initialize to default usage for this partition
U32 usage = group->getSpatialPartition()->mBufferUsage;
//for each drawable
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
if (!drawablep || drawablep->isDead())
{
continue;
}
if (drawablep->isAnimating())
{ //fall back to stream draw for animating verts
usage = GL_STREAM_DRAW_ARB;
}
}
group->mBufferUsage = usage;
}
void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32 &index_count)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
//initialize to default usage for this partition
U32 usage = group->getSpatialPartition()->mBufferUsage;
//clear off any old faces
mFaceList.clear();
//clear off any old faces
mFaceList.clear();
//for each drawable
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();

View File

@ -1330,7 +1330,7 @@ void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_heigh
void LLWorld::precullWaterObjects(LLCamera& camera, LLCullResult* cull, bool include_void_water)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (!gAgent.getRegion())
{
return;
@ -1551,7 +1551,7 @@ void LLWorld::updateWaterObjects()
void LLWorld::shiftRegions(const LLVector3& offset)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
for (region_list_t::const_iterator i = getRegionList().begin(); i != getRegionList().end(); ++i)
{
LLViewerRegion* region = *i;
@ -1624,7 +1624,7 @@ void LLWorld::disconnectRegions()
void process_enable_simulator(LLMessageSystem *msg, void **user_data)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
// enable the appropriate circuit for this simulator and
// add its values into the gSimulator structure
U64 handle;
@ -1720,7 +1720,7 @@ public:
// Called in response to "DisableSimulator" message.
void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
LLHost host = mesgsys->getSender();
@ -1782,7 +1782,7 @@ void send_agent_pause()
void send_agent_resume()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK
// Note: used to check for LLWorld initialization before it became a singleton.
// Rather than just remove this check I'm changing it to assure that the message
// system has been initialized. -MG

View File

@ -1376,7 +1376,7 @@ void LLPipeline::releaseShadowTargets()
void LLPipeline::createGLBuffers()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
stop_glerror();
assertInitialized();
@ -1646,7 +1646,7 @@ public:
// Called when a texture changes # of channels (causes faces to move to alpha pool)
void LLPipeline::dirtyPoolObjectTextures(const std::set<LLViewerFetchedTexture*>& textures)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
// *TODO: This is inefficient and causes frame spikes; need a better way to do this
@ -1860,7 +1860,7 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj)
void LLPipeline::unlinkDrawable(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
@ -1925,7 +1925,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
//static
void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
iter != gPipeline.mNearbyLights.end(); iter++)
{
@ -1953,7 +1953,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
void LLPipeline::createObjects(F32 max_dtime)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
LLTimer update_timer;
@ -1977,7 +1977,7 @@ void LLPipeline::createObjects(F32 max_dtime)
void LLPipeline::createObject(LLViewerObject* vobj)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
LLDrawable* drawablep = vobj->mDrawable;
if (!drawablep)
@ -2016,7 +2016,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
void LLPipeline::resetFrameStats()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
sCompiles = 0;
@ -2138,7 +2138,7 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
void LLPipeline::updateMove()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (FreezeTime)
{
@ -2240,7 +2240,7 @@ void LLPipeline::grabReferences(LLCullResult& result)
void LLPipeline::clearReferences()
{
LL_PROFILE_ZONE_SCOPED
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
sCull = NULL;
mGroupSaveQ1.clear();
}
@ -2494,7 +2494,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, LLPlane* pla
static bool can_use_occlusion = LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
&& gGLManager.mHasOcclusionQuery;
LL_RECORD_BLOCK_TIME(FTM_CULL);
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; //LL_RECORD_BLOCK_TIME(FTM_CULL);
// <FS:Ansariel> Factor out instance() call
LLWorld& world = LLWorld::instance();
@ -2667,13 +2667,6 @@ void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera)
group->updateDistance(camera);
}
const F32 MINIMUM_PIXEL_AREA = 16.f;
if (group->mPixelArea < MINIMUM_PIXEL_AREA)
{
return;
}
assertInitialized();
if (!group->getSpatialPartition()->mRenderByGroup)
@ -2783,7 +2776,7 @@ void LLPipeline::doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderT
void LLPipeline::doOcclusion(LLCamera& camera)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (LLPipeline::sUseOcclusion > 1 && !LLSpatialPartition::sTeleportRequested &&
(sCull->hasOcclusionGroups() || LLVOCachePartition::sNeedsOcclusionCheck))
{
@ -2870,7 +2863,7 @@ bool LLPipeline::updateDrawableGeom(LLDrawable* drawablep, bool priority)
void LLPipeline::updateGL()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
{
while (!LLGLUpdate::sGLQ.empty())
{
@ -2888,7 +2881,7 @@ void LLPipeline::updateGL()
void LLPipeline::clearRebuildGroups()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
LLSpatialGroup::sg_vector_t hudGroups;
mGroupQ1Locked = true;
@ -2993,7 +2986,7 @@ void LLPipeline::clearRebuildDrawables()
void LLPipeline::rebuildPriorityGroups()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
LLTimer update_timer;
assertInitialized();
@ -3022,7 +3015,7 @@ void LLPipeline::rebuildGroups()
return;
}
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
mGroupQ2Locked = true;
// Iterate through some drawables on the non-priority build queue
S32 size = (S32) mGroupQ2.size();
@ -3271,7 +3264,7 @@ void LLPipeline::markShift(LLDrawable *drawablep)
void LLPipeline::shiftObjects(const LLVector3 &offset)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
glClear(GL_DEPTH_BUFFER_BIT);
@ -3342,7 +3335,7 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable)
void LLPipeline::processPartitionQ()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
// <FS:ND> A vector is much better suited for the use case of mPartitionQ
// for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter)
@ -3455,6 +3448,8 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f
void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (hasAnyRenderType(LLPipeline::RENDER_TYPE_AVATAR,
LLPipeline::RENDER_TYPE_CONTROL_AV,
LLPipeline::RENDER_TYPE_GROUND,
@ -3469,13 +3464,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
gPipeline.resetDrawOrders();
}
LL_RECORD_BLOCK_TIME(FTM_STATESORT);
//LLVertexBuffer::unbind();
grabReferences(result);
{
LL_PROFILE_ZONE_NAMED("checkOcclusionAndRebuildMesh");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("checkOcclusionAndRebuildMesh");
for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
{
LLSpatialGroup* group = *iter;
@ -3503,7 +3496,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
{
LL_PROFILE_ZONE_NAMED("WorldCamera");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("WorldCamera");
LLSpatialGroup* last_group = NULL;
BOOL fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged();
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
@ -3538,7 +3531,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
{
LL_PROFILE_ZONE_NAMED("StateSort: visible groups");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("StateSort: visible groups");
for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
{
LLSpatialGroup* group = *iter;
@ -3560,7 +3553,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}}
{
LL_RECORD_BLOCK_TIME(FTM_STATESORT_DRAWABLE);
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWABLE("stateSort"); // LL_RECORD_BLOCK_TIME(FTM_STATESORT_DRAWABLE);
for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList();
iter != sCull->endVisibleList(); ++iter)
{
@ -3594,7 +3587,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (bridge->getSpatialGroup()->changeLOD() || fov_changed)
{
bool force_update = false;
@ -3604,7 +3597,7 @@ void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_c
void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (!drawablep
|| drawablep->isDead()
|| !hasRenderType(drawablep->getRenderType()))
@ -3921,7 +3914,7 @@ void LLPipeline::touchTexture(LLViewerTexture* tex, F32 vsize)
}
void LLPipeline::touchTextures(LLDrawInfo* info)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
for (int i = 0; i < info->mTextureList.size(); ++i)
{
touchTexture(info->mTextureList[i], info->mTextureListVSize[i]);
@ -3934,7 +3927,7 @@ void LLPipeline::touchTextures(LLDrawInfo* info)
void LLPipeline::postSort(LLCamera& camera)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
sVolumeSAFrame = 0.f; //ZK LBG
@ -3942,7 +3935,7 @@ void LLPipeline::postSort(LLCamera& camera)
LL_PUSH_CALLSTACKS();
//rebuild drawable geometry
{
LL_PROFILE_ZONE_NAMED("PostSort: rebuildGeom");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("PostSort: rebuildGeom");
for (LLCullResult::sg_iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i)
{
LLSpatialGroup* group = *i;
@ -3962,7 +3955,7 @@ void LLPipeline::postSort(LLCamera& camera)
//build render map
{
LL_PROFILE_ZONE_NAMED("build render map");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("build render map");
for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
{
LLSpatialGroup* group = *i;
@ -4002,7 +3995,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (hasRenderType(LLPipeline::RENDER_TYPE_PASS_ALPHA))
{
LL_PROFILE_ZONE_NAMED("Collect Alpha groups");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("Collect Alpha groups");
LLSpatialGroup::draw_map_t::iterator alpha = group->mDrawMap.find(LLRenderPass::PASS_ALPHA);
if (alpha != group->mDrawMap.end())
@ -4055,7 +4048,7 @@ void LLPipeline::postSort(LLCamera& camera)
glBeginQueryARB(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, mMeshDirtyQueryObject);
}*/
{
LL_PROFILE_ZONE_NAMED("rebuild delayed upd groups");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("rebuild delayed upd groups");
//pack vertex buffers for groups that chose to delay their updates
for (LLSpatialGroup::sg_vector_t::iterator iter = mMeshDirtyGroup.begin(); iter != mMeshDirtyGroup.end(); ++iter)
{
@ -4072,7 +4065,7 @@ void LLPipeline::postSort(LLCamera& camera)
mMeshDirtyGroup.clear();
{
LL_PROFILE_ZONE_NAMED("sort alpha groups");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("sort alpha groups");
if (!sShadowRender)
{
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
@ -4081,7 +4074,7 @@ void LLPipeline::postSort(LLCamera& camera)
LL_PUSH_CALLSTACKS();
{
LL_PROFILE_ZONE_NAMED("beacon rendering flags");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("beacon rendering flags");
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
// Ansariel: Make beacons also show when beacons floater is closed.
if (/*LLFloaterReg::instanceVisible("beacons") &&*/ !sShadowRender)
@ -4145,7 +4138,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (!sShadowRender)
{
LL_PROFILE_ZONE_NAMED("Render face highlights");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("Render face highlights");
mSelectedFaces.clear();
if (!gNonInteractive)
@ -4182,7 +4175,8 @@ void LLPipeline::postSort(LLCamera& camera)
void render_hud_elements()
{
gPipeline.disableLights();
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI);
gPipeline.disableLights();
LLGLDisable fog(GL_FOG);
LLGLSUIDefault gls_ui;
@ -4460,7 +4454,7 @@ U32 LLPipeline::sCurRenderPoolType = 0 ;
void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; //LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY);
assertInitialized();
@ -4546,7 +4540,7 @@ void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate)
}
{
LL_RECORD_BLOCK_TIME(FTM_POOLS);
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("pools"); //LL_RECORD_BLOCK_TIME(FTM_POOLS);
// HACK: don't calculate local lights if we're rendering the HUD!
// Removing this check will cause bad flickering when there are
@ -4592,7 +4586,7 @@ void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumPasses() > 0)
{
LL_RECORD_BLOCK_TIME(FTM_POOLRENDER);
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("pool render"); //LL_RECORD_BLOCK_TIME(FTM_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@ -4722,14 +4716,14 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
{
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred");
LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY);
{
// SL-15709 -- NOTE: Tracy only allows one ZoneScoped per function.
// Solutions are:
// 1. Use a new scope
// 2. Use named zones
// 3. Use transient zones
LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLS);
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("deferred pools"); //LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLS);
LLGLEnable cull(GL_CULL_FACE);
@ -4764,7 +4758,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0)
{
LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLRENDER);
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("deferred pool render"); //LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@ -4819,7 +4813,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
{
LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLS);
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLS);
U32 cur_type = 0;
LLGLEnable cull(GL_CULL_FACE);
@ -4853,7 +4847,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0)
{
LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLRENDER);
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("deferred poolrender"); //LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@ -4914,7 +4908,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
void LLPipeline::renderGeomShadow(LLCamera& camera)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
U32 cur_type = 0;
LLGLEnable cull(GL_CULL_FACE);
@ -4980,7 +4974,7 @@ void LLPipeline::renderGeomShadow(LLCamera& camera)
void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
S32 count = 0;
if (render_type == LLRender::TRIANGLE_STRIP)
@ -5693,7 +5687,7 @@ void LLPipeline::renderDebug()
void LLPipeline::rebuildPools()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
@ -6037,7 +6031,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
void LLPipeline::resetDrawOrders()
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
// Iterate through all of the draw pools and rebuild them.
for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter)
@ -7443,7 +7437,7 @@ void LLPipeline::doResetVertexBuffers(bool forced)
}
}
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
mResetVertexBuffers = false;
mCubeVB = NULL;
@ -7549,7 +7543,7 @@ void LLPipeline::renderObjects(U32 type, U32 mask, bool texture, bool batch_text
void LLPipeline::renderAlphaObjects(U32 mask, bool texture, bool batch_texture, bool rigged)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
assertInitialized();
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
@ -8387,7 +8381,7 @@ void LLPipeline::renderFinalize()
void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_target)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
LLRenderTarget* deferred_target = &mDeferredScreen;
LLRenderTarget* deferred_depth_target = &mDeferredDepth;
@ -8649,7 +8643,7 @@ LLVector4 pow4fsrgb(LLVector4 v, F32 f)
void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (!sCull)
{
return;
@ -8660,7 +8654,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
LLRenderTarget *deferred_light_target = &mDeferredLight;
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_DEFERRED);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("deferred"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_DEFERRED);
LLViewerCamera *camera = LLViewerCamera::getInstance();
{
LLGLDepthTest depth(GL_TRUE);
@ -8726,7 +8720,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
{
deferred_light_target->bindTarget();
{ // paint shadow/SSAO light map (direct lighting lightmap)
LL_PROFILE_ZONE_NAMED("renderDeferredLighting - sun shadow");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - sun shadow");
bindDeferredShader(gDeferredSunProgram, deferred_light_target);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glClearColor(1, 1, 1, 1);
@ -8772,7 +8766,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
if (RenderDeferredSSAO)
{ // soften direct lighting lightmap
LL_PROFILE_ZONE_NAMED("renderDeferredLighting - soften shadow");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - soften shadow");
// blur lightmap
screen_target->bindTarget();
glClearColor(1, 1, 1, 1);
@ -8850,7 +8844,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
{ // apply sunlight contribution
LLGLSLShader &soften_shader = LLPipeline::sUnderWaterRender ? gDeferredSoftenWaterProgram : gDeferredSoftenProgram;
LL_PROFILE_ZONE_NAMED("renderDeferredLighting - atmospherics");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - atmospherics");
bindDeferredShader(soften_shader);
LLEnvironment &environment = LLEnvironment::instance();
@ -8916,7 +8910,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
LLVertexBuffer::unbind();
{
LL_PROFILE_ZONE_NAMED("renderDeferredLighting - local lights");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - local lights");
bindDeferredShader(gDeferredLightProgram);
if (mCubeVB.isNull())
@ -9022,7 +9016,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
if (!spot_lights.empty())
{
LL_PROFILE_ZONE_NAMED("renderDeferredLighting - projectors");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - projectors");
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
bindDeferredShader(gDeferredSpotLightProgram);
@ -9067,7 +9061,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
vert[2].set(3, 1, 0);
{
LL_PROFILE_ZONE_NAMED("renderDeferredLighting - fullscreen lights");
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - fullscreen lights");
LLGLDepthTest depth(GL_FALSE);
// full screen blit
@ -9465,7 +9459,7 @@ inline float sgn(float a)
void LLPipeline::generateWaterReflection(LLCamera& camera_in)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (!assertInitialized())
{
@ -9872,7 +9866,7 @@ static LLTrace::BlockTimerStatHandle FTM_SHADOW_FULLBRIGHT_ALPHA_MASKED("Fullbri
void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult& result, bool use_shader, bool use_occlusion, U32 target_width)
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER);
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; //LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER);
//disable occlusion culling for shadow passes (save setting to restore later)
S32 occlude = LLPipeline::sUseOcclusion;
@ -9959,7 +9953,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
gGL.setColorMask(false, false);
}
LL_RECORD_BLOCK_TIME(FTM_SHADOW_SIMPLE);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow simple"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_SIMPLE);
gGL.getTexUnit(0)->disable();
for (U32 i = 0; i < sizeof(types) / sizeof(U32); ++i)
@ -9977,7 +9971,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
if (use_shader)
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_GEOM);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow geom"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_GEOM);
gDeferredShadowProgram.unbind();
renderGeomShadow(shadow_cam);
@ -9986,13 +9980,13 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
}
else
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_GEOM);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow geom"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_GEOM);
renderGeomShadow(shadow_cam);
}
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow alpha"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA);
for (int i = 0; i < 2; ++i)
{
@ -10008,19 +10002,19 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
LLVertexBuffer::MAP_TEXTURE_INDEX;
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA_MASKED);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow alpha masked"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA_MASKED);
renderMaskedObjects(LLRenderPass::PASS_ALPHA_MASK, mask, TRUE, TRUE, rigged);
}
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA_BLEND);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow alpha blend"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA_BLEND);
LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(0.598f);
renderAlphaObjects(mask, TRUE, TRUE, rigged);
}
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_FULLBRIGHT_ALPHA_MASKED);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow fullbright alpha masked"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_FULLBRIGHT_ALPHA_MASKED);
gDeferredShadowFullbrightAlphaMaskProgram.bind(rigged);
LLGLSLShader::sCurBoundShaderPtr->uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
LLGLSLShader::sCurBoundShaderPtr->uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0);
@ -10029,7 +10023,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA_GRASS);
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow alpha grass"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA_GRASS);
gDeferredTreeShadowProgram.bind(rigged);
if (i == 0)
{
@ -10075,7 +10069,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
bool LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir)
{
LL_PROFILE_ZONE_SCOPED;
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
//get point cloud of intersection of frust and min, max
if (getVisibleExtents(camera, min, max))
@ -10338,7 +10332,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
return;
}
LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW);
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; //LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW);
bool skip_avatar_update = false;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)