V3 merge. Added LLMainLoopRepeater repeater. Disabled FBOs for baking. Fixed typo in strings.xml. Setting ThrottleBandwidthKBPS was used in a few places that MainloopTimeoutDefault should have been. Better outdated driver detection for ATI hardware.

This commit is contained in:
Shyotl
2012-05-28 03:59:19 -05:00
parent 271883e737
commit 51a4e4960f
8 changed files with 192 additions and 15 deletions

View File

@@ -620,8 +620,11 @@ bool LLGLManager::initGL()
#endif // LL_WINDOWS
#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS
// count any pre OpenGL 3.0 implementation as an old driver
if (mGLVersion < 3.f)
// release 7277 is a point at which we verify that ATI OpenGL
// drivers get pretty stable with SL, ~Catalyst 8.2,
// for both Win32 and Linux.
if (mDriverVersionRelease < 7277 &&
mDriverVersionRelease != 0) // 0 == Undetectable driver version - these get to pretend to be new ATI drivers, though that decision may be revisited.
{
mATIOldDriver = TRUE;
}

View File

@@ -315,6 +315,7 @@ set(viewer_SOURCE_FILES
lllogchat.cpp
llloginhandler.cpp
llsavedlogins.cpp
llmainlooprepeater.cpp
llmanip.cpp
llmaniprotate.cpp
llmanipscale.cpp
@@ -806,6 +807,7 @@ set(viewer_HEADER_FILES
lllogchat.h
llloginhandler.h
llsavedlogins.h
llmainlooprepeater.h
llmanip.h
llmaniprotate.h
llmanipscale.h

View File

@@ -195,6 +195,7 @@
#include "llprogressview.h"
#include "llmemory.h"
#include "llmainlooprepeater.h"
// [RLVa:KB]
#include "rlvhandler.h"
@@ -736,13 +737,15 @@ bool LLAppViewer::init()
LLAgent::parseTeleportMessages("teleport_strings.xml");
// load MIME type -> media impl mappings
#if LL_WINDOWS
LLMIMETypes::parseMIMETypes( std::string("mime_types_windows.xml") );
#elif LL_DARWIN
LLMIMETypes::parseMIMETypes( std::string("mime_types_mac.xml") );
std::string mime_types_name;
#if LL_DARWIN
mime_types_name = "mime_types_mac.xml";
#elif LL_LINUX
LLMIMETypes::parseMIMETypes( std::string("mime_types_linux.xml") );
mime_types_name = "mime_types_linux.xml";
#else
mime_types_name = "mime_types_windows.xml";
#endif
LLMIMETypes::parseMIMETypes( mime_types_name );
// Copy settings to globals. *TODO: Remove or move to appropriage class initializers
settings_to_globals();
@@ -790,7 +793,10 @@ bool LLAppViewer::init()
return 1;
}
LL_INFOS("InitInfo") << "Cache initialization is done." << LL_ENDL ;
// Initialize the repeater service.
LLMainLoopRepeater::instance().start();
//
// Initialize the window
//
@@ -804,7 +810,7 @@ bool LLAppViewer::init()
// call all self-registered classes
LLInitClassList::instance().fireCallbacks();
#if LL_LCD_COMPILE
#if LL_LCD_COMPILE
// start up an LCD window on a logitech keyboard, if there is one
HINSTANCE hInstance = GetModuleHandle(NULL);
gLcdScreen = new LLLCD(hInstance);
@@ -1057,7 +1063,13 @@ bool LLAppViewer::mainLoop()
LLFrameTimer memCheckTimer;
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
joystick->setNeedsReset(true);
LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
// As we do not (yet) send data on the mainloop LLEventPump that varies
// with each frame, no need to instantiate a new LLSD event object each
// time. Obviously, if that changes, just instantiate the LLSD at the
// point of posting.
LLSD newFrame;
// Handle messages
@@ -1110,6 +1122,8 @@ bool LLAppViewer::mainLoop()
mem_leak_instance->idle() ;
}
// canonical per-frame event
mainloop.post(newFrame);
if (!LLApp::isExiting())
{
pingMainloopTimeout("Main:JoystickKeyboard");
@@ -1119,7 +1133,7 @@ bool LLAppViewer::mainLoop()
// done initializing. JC
if (gViewerWindow->mWindow->getVisible()
&& gViewerWindow->getActive()
&& !gViewerWindow->mWindow->getMinimized()
&& !gViewerWindow->getWindow()->getMinimized()
&& LLStartUp::getStartupState() == STATE_STARTED
&& !gViewerWindow->getShowProgress()
&& !gFocusMgr.focusLocked())
@@ -1775,6 +1789,7 @@ bool LLAppViewer::cleanup()
llinfos << "File launched." << llendflush;
}
LLMainLoopRepeater::instance().stop();
//release all private memory pools.
LLPrivateMemoryPoolManager::destroyClass() ;
@@ -4578,7 +4593,7 @@ void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs)
{
if(secs < 0.0f)
{
static const LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
static const LLCachedControl<F32> mainloop_timeout_default("MainloopTimeoutDefault",20);
secs = mainloop_timeout_default;
}
@@ -4606,7 +4621,7 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs)
{
if(secs < 0.0f)
{
static const LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
static const LLCachedControl<F32> mainloop_timeout_default("MainloopTimeoutDefault",20);
secs = mainloop_timeout_default;
}

View File

@@ -218,11 +218,13 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
return TRUE;
}
#if 0 //THIS CAUSES MAINT-1092
bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete();
if (use_fbo)
{
gPipeline.mWaterDis.bindTarget();
}
#endif
LLGLSLShader::bindNoShader();
LLVertexBuffer::unbind();
@@ -257,10 +259,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
}
}
#if 0 //THIS CAUSES MAINT-1092
if (use_fbo)
{
gPipeline.mWaterDis.flush();
}
#endif
return ret;
}

View File

@@ -0,0 +1,88 @@
/**
* @file llmachineid.cpp
* @brief retrieves unique machine ids
*
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, 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$
*/
#include "llviewerprecompiledheaders.h"
#include "llapr.h"
#include "llevents.h"
#include "llmainlooprepeater.h"
// LLMainLoopRepeater
//-----------------------------------------------------------------------------
LLMainLoopRepeater::LLMainLoopRepeater(void):
mQueue(0)
{
; // No op.
}
void LLMainLoopRepeater::start(void)
{
if(mQueue != 0) return;
mQueue = new LLThreadSafeQueue<LLSD>(1024);
mMainLoopConnection = LLEventPumps::instance().
obtain("mainloop").listen(LLEventPump::inventName(), boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1));
mRepeaterConnection = LLEventPumps::instance().
obtain("mainlooprepeater").listen(LLEventPump::inventName(), boost::bind(&LLMainLoopRepeater::onMessage, this, _1));
}
void LLMainLoopRepeater::stop(void)
{
mMainLoopConnection.release();
mRepeaterConnection.release();
delete mQueue;
mQueue = 0;
}
bool LLMainLoopRepeater::onMainLoop(LLSD const &)
{
LLSD message;
while(mQueue->tryPopBack(message)) {
std::string pump = message["pump"].asString();
if(pump.length() == 0 ) continue; // No pump.
LLEventPumps::instance().obtain(pump).post(message["payload"]);
}
return false;
}
bool LLMainLoopRepeater::onMessage(LLSD const & event)
{
try {
mQueue->pushFront(event);
} catch(LLThreadSafeQueueError & e) {
llwarns << "could not repeat message (" << e.what() << ")" <<
event.asString() << LL_ENDL;
}
return false;
}

View File

@@ -0,0 +1,65 @@
/**
* @file llmainlooprepeater.h
* @brief a service for repeating messages on the main loop.
*
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, 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_LLMAINLOOPREPEATER_H
#define LL_LLMAINLOOPREPEATER_H
#include "llsd.h"
#include "llthreadsafequeue.h"
//
// A service which creates the pump 'mainlooprepeater' to which any thread can
// post a message that will be re-posted on the main loop.
//
// The posted message should contain two map elements: pump and payload. The
// pump value is a string naming the pump to which the message should be
// re-posted. The payload value is what will be posted to the designated pump.
//
class LLMainLoopRepeater:
public LLSingleton<LLMainLoopRepeater>
{
public:
LLMainLoopRepeater(void);
// Start the repeater service.
void start(void);
// Stop the repeater service.
void stop(void);
private:
LLTempBoundListener mMainLoopConnection;
LLTempBoundListener mRepeaterConnection;
LLThreadSafeQueue<LLSD> * mQueue;
bool onMainLoop(LLSD const &);
bool onMessage(LLSD const & event);
};
#endif

View File

@@ -4879,7 +4879,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
gResizeScreenTexture = TRUE;
gWindowResized = TRUE;
if (gFloaterCustomize && gFloaterCustomize->getVisible())
if (isAgentAvatarValid() && !gAgentAvatarp->isUsingBakedTextures())
{
LLVisualParamHint::requestHintUpdates();
}

View File

@@ -144,7 +144,7 @@
<string name="AssetErrorUnknownStatus">Unknown status</string>
<!-- llvoavatar. Displayed in the avatar's chat bubble -->
<string name="AvatarEditingApparance">(Editing Appearance)</string>
<string name="AvatarEditingAppearance">(Editing Appearance)</string>
<string name="AvatarAway">Away</string>
<string name="AvatarBusy">Busy</string>
<string name="AvatarMuted">Muted</string>