...
 
Commits (6)
......@@ -281,6 +281,7 @@ namespace LLError
}
//this is cheaper than llcallstacks if no need to output other variables to call stacks.
#if ENABLE_DEBUG
#define LL_PUSH_CALLSTACKS() LLError::LLCallStacks::push(__FUNCTION__, __LINE__)
#define llcallstacks \
......@@ -292,6 +293,20 @@ namespace LLError
LLError::End(); \
LLError::LLCallStacks::end(_out) ; \
}
#else
#define LL_PUSH_CALLSTACKS()
#define llcallstacks \
if (false) \
{ \
std::ostringstream* _out = LLError::LLCallStacks::insert(__FUNCTION__, __LINE__) ; \
(*_out)
#define llcallstacksendl \
LLError::End(); \
LLError::LLCallStacks::end(_out) ; \
}
#endif
#define LL_CLEAR_CALLSTACKS() LLError::LLCallStacks::clear()
#define LL_PRINT_CALLSTACKS() LLError::LLCallStacks::print()
......@@ -338,6 +353,30 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
std::ostringstream* _out = LLError::Log::out(); \
(*_out)
#ifdef ENABLE_DEBUG
#define lllog_debug(level, once, ...) \
do { \
const char* tags[] = {"", ##__VA_ARGS__}; \
static LLError::CallSite _site(lllog_site_args_(level, once, tags)); \
lllog_test_debug_()
#define lllog_test_debug_() \
if (LL_UNLIKELY(_site.shouldLog())) \
{ \
std::ostringstream* _out = LLError::Log::out(); \
(*_out)
#else
#define lllog_debug(level, once, ...) \
do { \
if (false) \
{ \
const char* tags[] = {"", ##__VA_ARGS__}; \
LLError::CallSite _site(lllog_site_args_(level, once, tags)); \
std::ostringstream* _out = LLError::Log::out(); \
(*_out)
#endif
#define lllog_site_args_(level, once, tags) \
level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), \
__FUNCTION__, once, &tags[1], LL_ARRAY_SIZE(tags)-1
......@@ -368,7 +407,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// NEW Macros for debugging, allow the passing of a string tag
// Pass comma separated list of tags (currently only supports up to 0, 1, or 2)
#define LL_DEBUGS(...) lllog(LLError::LEVEL_DEBUG, false, ##__VA_ARGS__)
#define LL_DEBUGS(...) lllog_debug(LLError::LEVEL_DEBUG, false, ##__VA_ARGS__)
#define LL_INFOS(...) lllog(LLError::LEVEL_INFO, false, ##__VA_ARGS__)
#define LL_WARNS(...) lllog(LLError::LEVEL_WARN, false, ##__VA_ARGS__)
#define LL_ERRS(...) lllog(LLError::LEVEL_ERROR, false, ##__VA_ARGS__)
......@@ -378,7 +417,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// Only print the log message once (good for warnings or infos that would otherwise
// spam the log file over and over, such as tighter loops).
#define LL_DEBUGS_ONCE(...) lllog(LLError::LEVEL_DEBUG, true, ##__VA_ARGS__)
#define LL_DEBUGS_ONCE(...) lllog_debug(LLError::LEVEL_DEBUG, true, ##__VA_ARGS__)
#define LL_INFOS_ONCE(...) lllog(LLError::LEVEL_INFO, true, ##__VA_ARGS__)
#define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, ##__VA_ARGS__)
......
......@@ -202,7 +202,7 @@ void LLPanel::draw()
{
F32 alpha = getCurrentTransparency();
LLRect&& local_rect = getLocalRect();
LLRect local_rect = getLocalRect();
if (mBgOpaque )
{
// opaque, in-front look
......
......@@ -1456,7 +1456,7 @@ bool LLAppViewer::doFrame()
{
pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds!
LL_RECORD_BLOCK_TIME(FTM_IDLE);
LL_ALWAYS_RECORD_BLOCK_TIME(FTM_IDLE);
idle();
resumeMainloopTimeout();
......
......@@ -2629,7 +2629,7 @@ LLTextureFetch::~LLTextureFetch()
while (! mCommands.empty())
{
TFRequest * req(mCommands.front());
mCommands.erase(mCommands.begin());
mCommands.pop_front();
delete req;
}
mCommandsSize = 0;
......@@ -2814,7 +2814,7 @@ void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32Bytes received_siz
{
LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq
mHTTPTextureQueue.erase(id);
mHTTPTextureBits = (U32Bits)mHTTPTextureBits + received_size;
mHTTPTextureBits = U32Bits(mHTTPTextureBits) + received_size;
} // -Mfnq
// NB: If you change deleteRequest() you should probably make
......@@ -3894,7 +3894,7 @@ LLTextureFetch::TFRequest * LLTextureFetch::cmdDequeue()
if (! mCommands.empty())
{
ret = mCommands.front();
mCommands.erase(mCommands.begin());
mCommands.pop_front();
}
mCommandsSize = mCommands.size();
unlockQueue(); // -Mfq
......
......@@ -344,7 +344,7 @@ private:
// is logically tied to LLQueuedThread's list of
// QueuedRequest instances and so must be covered by the
// same locks.
typedef std::vector<TFRequest *> command_queue_t;
typedef std::deque<TFRequest *> command_queue_t;
command_queue_t mCommands; // Mfq
std::atomic<S32> mCommandsSize;
......
......@@ -254,7 +254,7 @@ static LLTrace::BlockTimerStatHandle FTM_TELEPORT_DISPLAY("Teleport Display");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER);
LL_ALWAYS_RECORD_BLOCK_TIME(FTM_RENDER);
gViewerWindow->checkSettings();
LLVBOPool::deleteReleasedBuffers();
......
......@@ -2978,13 +2978,13 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
}
}
static LLTrace::BlockTimerStatHandle ftm("Update UI");
static LLTrace::BlockTimerStatHandle FTM_UPDATE_UI("Update UI");
// Update UI based on stored mouse position from mouse-move
// event processing.
void LLViewerWindow::updateUI()
{
LL_RECORD_BLOCK_TIME(ftm);
LL_RECORD_BLOCK_TIME(FTM_UPDATE_UI);
static std::string last_handle_msg;
......
......@@ -8058,7 +8058,7 @@ void LLPipeline::renderDeferredLighting()
const F32* c = center.getF32ptr();
F32 s = volume->getLightRadius()*1.5f;
LLColor3 col = volume->getLightSRGBColor();
LLColor3 col = volume->getLightColor();
if (col.magVecSquared() < 0.001f)
{
......@@ -8154,7 +8154,10 @@ void LLPipeline::renderDeferredLighting()
setupSpotLight(gDeferredSpotLightProgram, drawablep);
LLColor3 col = volume->getLightSRGBColor();
LLColor3 col = volume->getLightColor();
/*col.mV[0] = powf(col.mV[0], 2.2f);
col.mV[1] = powf(col.mV[1], 2.2f);
col.mV[2] = powf(col.mV[2], 2.2f);*/
gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s);
......@@ -8237,7 +8240,7 @@ void LLPipeline::renderDeferredLighting()
setupSpotLight(gDeferredMultiSpotLightProgram, drawablep);
LLColor3 col = volume->getLightSRGBColor();
LLColor3 col = volume->getLightColor();
/*col.mV[0] = powf(col.mV[0], 2.2f);
col.mV[1] = powf(col.mV[1], 2.2f);
......