diff --git a/autobuild.xml b/autobuild.xml
index 8f54556929..26d859935e 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -988,9 +988,9 @@
archive
name
linux64
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 0783b1bab7..2b6e62c44b 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -437,7 +437,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
- BOOL disable_vsync, BOOL use_gl,
+ BOOL enable_vsync, BOOL use_gl,
// Legacy cursor setting from main program
//BOOL ignore_pixel_depth, U32 fsaa_samples,)
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors)
@@ -483,7 +483,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
mWindowTitle = title;
// Create the GL context and set it up for windowed or fullscreen, as appropriate.
- if(createContext(x, y, width, height, 32, fullscreen, disable_vsync))
+ if(createContext(x, y, width, height, 32, fullscreen, enable_vsync))
{
gGLManager.initGL();
@@ -667,7 +667,7 @@ void LLWindowSDL::setTitle(const std::string &title)
SDL_WM_SetCaption(title.c_str(), title.c_str());
}
-BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync)
+BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync)
{
//bool glneedsinit = false;
@@ -1001,7 +1001,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
// changing fullscreen resolution, or switching between windowed and fullscreen mode.
-BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp)
+BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp)
{
const BOOL needsRebuild = TRUE; // Just nuke the context and start over.
BOOL result = true;
@@ -1011,7 +1011,7 @@ BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL
if(needsRebuild)
{
destroyContext();
- result = createContext(0, 0, size.mX, size.mY, 0, fullscreen, disable_vsync);
+ result = createContext(0, 0, size.mX, size.mY, 0, fullscreen, enable_vsync);
if (result)
{
gGLManager.initGL();
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index da6da0f4d8..a4aadb99fa 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -69,7 +69,7 @@ public:
/*virtual*/ BOOL setPosition(LLCoordScreen position);
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
- /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
+ /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
/*virtual*/ void showCursor();
@@ -159,7 +159,7 @@ public:
protected:
LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, int x, int y, int width, int height, U32 flags,
- BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
+ BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
//BOOL ignore_pixel_depth, U32 fsaa_samples);
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors); // Legacy cursor setting from main program
~LLWindowSDL();
@@ -186,7 +186,7 @@ protected:
//
// create or re-create the GL context/window. Called from the constructor and switchContext().
- BOOL createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync);
+ BOOL createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync);
void destroyContext();
void setupFailure(const std::string& text, const std::string& caption, U32 type);
void fixWindowSize(void);
@@ -263,4 +263,4 @@ public:
S32 OSMessageBoxSDL(const std::string& text, const std::string& caption, U32 type);
#endif //LL_LLWINDOWSDL_H
-#endif
\ No newline at end of file
+#endif
diff --git a/indra/llwindow/llwindowsdl2.cpp b/indra/llwindow/llwindowsdl2.cpp
index 3e6dcf1ea2..129576f8fc 100644
--- a/indra/llwindow/llwindowsdl2.cpp
+++ b/indra/llwindow/llwindowsdl2.cpp
@@ -382,7 +382,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
- BOOL disable_vsync, BOOL use_gl,
+ BOOL enable_vsync, BOOL use_gl,
// Legacy cursor setting from main program
//BOOL ignore_pixel_depth, U32 fsaa_samples,)
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors)
@@ -427,7 +427,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
mWindowTitle = title;
// Create the GL context and set it up for windowed or fullscreen, as appropriate.
- if(createContext(x, y, width, height, 32, fullscreen, disable_vsync))
+ if(createContext(x, y, width, height, 32, fullscreen, enable_vsync))
{
gGLManager.initGL();
@@ -663,7 +663,7 @@ void LLWindowSDL::tryFindFullscreenSize( int &width, int &height )
}
}
-BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync)
+BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync)
{
//bool glneedsinit = false;
@@ -739,7 +739,6 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
// We need stencil support for a few (minor) things.
if (stencilBits)
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, stencilBits);
- // *FIX: try to toggle vsync here?
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
@@ -763,7 +762,11 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
setupFailure("GL Context creation error creation error", "Error", OSMB_OK);
return FALSE;
}
- // SDL_GL_SetSwapInterval(1);
+
+ // FIRE-32559: This *should* work, but for some reason aftrer login vsync always acts as if it's disabled, so
+ // the flag will get set again later in void LLViewerWindow::setStartupComplete() -Zi
+ toggleVSync(enable_vsync);
+
mSurface = SDL_GetWindowSurface( mWindow );
}
@@ -921,7 +924,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
// changing fullscreen resolution, or switching between windowed and fullscreen mode.
-BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp)
+BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp)
{
const BOOL needsRebuild = TRUE; // Just nuke the context and start over.
BOOL result = true;
@@ -931,7 +934,7 @@ BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL
if(needsRebuild)
{
destroyContext();
- result = createContext(0, 0, size.mX, size.mY, 0, fullscreen, disable_vsync);
+ result = createContext(0, 0, size.mX, size.mY, 0, fullscreen, enable_vsync);
if (result)
{
gGLManager.initGL();
@@ -2731,7 +2734,31 @@ void LLWindowSDL::destroySharedContext(void* context)
void LLWindowSDL::toggleVSync(bool enable_vsync)
{
- SDL_GL_SetSwapInterval(enable_vsync);
+ if (enable_vsync)
+ {
+ // try adaptive vsync first (-1) and if that fails, try regular vsync (1)
+ if (SDL_GL_SetSwapInterval(-1) == -1)
+ {
+ LL_INFOS() << "Failed to enable adaptive vsync, trying regular vsync" << LL_ENDL;
+ if (SDL_GL_SetSwapInterval(1) == -1)
+ {
+ LL_WARNS() << "Failed to enable vsync" << LL_ENDL;
+ }
+ else
+ {
+ LL_DEBUGS() << "Vsync enabled" << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_DEBUGS() << "Adaptive vsync enabled" << LL_ENDL;
+ }
+ }
+ else
+ {
+ SDL_GL_SetSwapInterval(0);
+ LL_DEBUGS() << "Vsync disabled" << LL_ENDL;
+ }
}
//
diff --git a/indra/llwindow/llwindowsdl2.h b/indra/llwindow/llwindowsdl2.h
index 83807d12db..878f2a579b 100644
--- a/indra/llwindow/llwindowsdl2.h
+++ b/indra/llwindow/llwindowsdl2.h
@@ -65,7 +65,7 @@ public:
/*virtual*/ BOOL setPosition(LLCoordScreen position);
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
- /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
+ /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL);
// Make shared context work on Linux for multithreaded OpenGL
void* createSharedContext() override;
void makeContextCurrent(void* context) override;
@@ -162,7 +162,7 @@ public:
protected:
LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, int x, int y, int width, int height, U32 flags,
- BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
+ BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
//BOOL ignore_pixel_depth, U32 fsaa_samples);
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors); // Legacy cursor setting from main program
~LLWindowSDL();
@@ -189,7 +189,7 @@ protected:
//
// create or re-create the GL context/window. Called from the constructor and switchContext().
- BOOL createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync);
+ BOOL createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync);
void destroyContext();
void setupFailure(const std::string& text, const std::string& caption, U32 type);
void fixWindowSize(void);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 78082c42e0..bb3a26c20e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1817,7 +1817,10 @@ bool LLAppViewer::doFrame()
{
// Sleep if we're not rendering, or the window is minimized.
static LLCachedControl s_background_yield_time(gSavedSettings, "BackgroundYieldTime", 40);
- S32 milliseconds_to_sleep = llclamp((S32)s_background_yield_time, 0, 1000);
+ // FIRE-32722: Make sure to idle if actually minimized
+ //S32 milliseconds_to_sleep = llclamp((S32)s_background_yield_time, 0, 1000);
+ S32 milliseconds_to_sleep = llclamp((S32)s_background_yield_time, (gViewerWindow && gViewerWindow->getWindow()->getMinimized()) ? 1 : 0, 1000);
+ //
// don't sleep when BackgroundYieldTime set to 0, since this will still yield to other threads
// of equal priority on Windows
if (milliseconds_to_sleep > 0)
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 9fc03192e8..efe529e38e 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -175,7 +175,7 @@ SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "Simulator time scale",
SIM_MAIN_AGENTS("simmainagents", "Number of avatars in current region", LL_SIM_STAT_NUMAGENTMAIN),
SIM_CHILD_AGENTS("simchildagents", "Number of avatars in neighboring regions", LL_SIM_STAT_NUMAGENTCHILD),
SIM_OBJECTS("simobjects", "", LL_SIM_STAT_NUMTASKS),
- SIM_ACTIVE_OBJECTS("simactiveobjects", "Number of scripted and/or mocing objects", LL_SIM_STAT_NUMTASKSACTIVE),
+ SIM_ACTIVE_OBJECTS("simactiveobjects", "Number of scripted and/or moving objects", LL_SIM_STAT_NUMTASKSACTIVE),
SIM_ACTIVE_SCRIPTS("simactivescripts", "Number of scripted objects", LL_SIM_STAT_NUMSCRIPTSACTIVE),
SIM_IN_PACKETS_PER_SEC("siminpps", "", LL_SIM_STAT_INPPS),
SIM_OUT_PACKETS_PER_SEC("simoutpps", "", LL_SIM_STAT_OUTPPS),
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 19155c1fde..8257a60fba 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -6827,6 +6827,12 @@ void LLViewerWindow::setStartupComplete()
{
mProgressView->setStartupComplete();
}
+
+#if LL_SDL2
+ // FIRE-32559: For some reason aftrer login vsync always acts as if it's disabled, so
+ // the flag will get set again here after the 3D view is set up -Zi
+ getWindow()->toggleVSync(gSavedSettings.getBOOL("RenderVSyncEnable"));
+#endif
}
BOOL LLViewerWindow::getShowProgress() const
diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml
index 0c487d5bbb..9fdeeb52b5 100644
--- a/indra/newview/skins/default/xui/pl/notifications.xml
+++ b/indra/newview/skins/default/xui/pl/notifications.xml
@@ -1163,7 +1163,7 @@ Zazwyczaj jest to tymczasowy problem. Możesz kontynuować modyfikacje i zapisa
Nie możesz kupić działek dla grupy.
Nie masz praw kupowania działek dla Twojej aktywnej grupy.
-
+
Znajomi mogą pozwalać na odnajdywanie się wzajemnie na mapie i na otrzymywanie informacji o statusie online.
Zaproponować znajomość [NAME]?
@@ -1407,7 +1407,7 @@ Możesz normalnie używać [APP_NAME], inni użytkownicy będą Cię widzieli po
Twój [https://community.secondlife.com/t5/English-Knowledge-Base/Avatar-Rendering-Complexity/ta-p/2967838 stopień złożoności awatara] to [AGENT_COMPLEXITY].
[OVERLIMIT_MSG]
-
+
Twój [https://community.secondlife.com/t5/English-Knowledge-Base/Avatar-Rendering-Complexity/ta-p/2967838 stopień złożoności awatara] to [AGENT_COMPLEXITY].
@@ -1793,7 +1793,7 @@ Premium Plus pozwala na [MAX_PREMIUM_PLUS]. [https://secondlife.com/my/account/m
- Z jakim komunikatem wyrzucić wszystkich użytkowników z regionu?
+ Z jakim komunikatem wyrzucić wszystkich użytkowników ze świata?