diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 35a55570e..3937184d2 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -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; } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 25991f04e..7b06d351d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -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 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b2f3b32f1..ad9b7d8ed 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -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 mainloop_timeout_default("ThrottleBandwidthKBPS",20); + static const LLCachedControl 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 mainloop_timeout_default("ThrottleBandwidthKBPS",20); + static const LLCachedControl mainloop_timeout_default("MainloopTimeoutDefault",20); secs = mainloop_timeout_default; } diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index be90667cf..e8f3fafbe 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -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; } diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp new file mode 100644 index 000000000..d73048a28 --- /dev/null +++ b/indra/newview/llmainlooprepeater.cpp @@ -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(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; +} diff --git a/indra/newview/llmainlooprepeater.h b/indra/newview/llmainlooprepeater.h new file mode 100644 index 000000000..f84c0ca94 --- /dev/null +++ b/indra/newview/llmainlooprepeater.h @@ -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 +{ +public: + LLMainLoopRepeater(void); + + // Start the repeater service. + void start(void); + + // Stop the repeater service. + void stop(void); + +private: + LLTempBoundListener mMainLoopConnection; + LLTempBoundListener mRepeaterConnection; + LLThreadSafeQueue * mQueue; + + bool onMainLoop(LLSD const &); + bool onMessage(LLSD const & event); +}; + + +#endif diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 88eff9fb8..c20231a49 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -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(); } diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index d55f9e389..a22532a99 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -144,7 +144,7 @@ Unknown status - (Editing Appearance) + (Editing Appearance) Away Busy Muted