diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 972be5dfcc..ce15004f3e 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -418,7 +418,6 @@ LLWindow* LLWindowManager::createWindow( bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, - U32 max_vram, F32 max_gl_version, bool useLegacyCursors) // Legacy cursor setting from main program { @@ -433,18 +432,18 @@ LLWindow* LLWindowManager::createWindow( #elif LL_SDL new_window = new LLWindowSDL(callbacks, title, x, y, width, height, flags, - //fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram); - fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram, useLegacyCursors); // Legacy cursor setting from main program + //fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples); + fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, useLegacyCursors); // Legacy cursor setting from main program #elif LL_WINDOWS new_window = new LLWindowWin32(callbacks, title, name, x, y, width, height, flags, - //fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_vram, max_gl_version); - fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_vram, max_gl_version, useLegacyCursors); // Legacy cursor setting from main program + //fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_gl_version); + fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_gl_version, useLegacyCursors); // Legacy cursor setting from main program #elif LL_DARWIN new_window = new LLWindowMacOSX(callbacks, title, name, x, y, width, height, flags, - //fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram); - fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram, useLegacyCursors); // Legacy cursor setting from main program + //fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples); + fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, useLegacyCursors); // Legacy cursor setting from main program #endif } else diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 0fd8391d1f..f3466b583a 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -164,8 +164,6 @@ public: virtual F32 getPixelAspectRatio() = 0; virtual void setNativeAspectRatio(F32 aspect) = 0; - virtual void setMaxVRAMMegabytes(U32 max_vram) = 0; - virtual void beforeDialog() {}; // prepare to put up an OS dialog (if special measures are required, such as in fullscreen mode) virtual void afterDialog() {}; // undo whatever was done in beforeDialog() @@ -293,14 +291,14 @@ protected: // Platform-neutral for accessing the platform specific message box S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type); -const U32 OSMB_OK = 0; -const U32 OSMB_OKCANCEL = 1; -const U32 OSMB_YESNO = 2; +constexpr U32 OSMB_OK = 0; +constexpr U32 OSMB_OKCANCEL = 1; +constexpr U32 OSMB_YESNO = 2; -const S32 OSBTN_YES = 0; -const S32 OSBTN_NO = 1; -const S32 OSBTN_OK = 2; -const S32 OSBTN_CANCEL = 3; +constexpr S32 OSBTN_YES = 0; +constexpr S32 OSBTN_NO = 1; +constexpr S32 OSBTN_OK = 2; +constexpr S32 OSBTN_CANCEL = 3; // // LLWindowManager @@ -320,7 +318,6 @@ public: bool ignore_pixel_depth = false, U32 fsaa_samples = 0, U32 max_cores = 0, - U32 max_vram = 0, F32 max_gl_version = 4.6f, bool useLegacyCursors = false); // Legacy cursor setting from main program static bool destroyWindow(LLWindow* window); @@ -337,6 +334,4 @@ extern const S32 gURLProtocolWhitelistCount; extern const std::string gURLProtocolWhitelist[]; //extern const std::string gURLProtocolWhitelistHandler[]; -void simpleEscapeString ( std::string& stringIn ); - #endif // _LL_window_h_ diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h index 32c12b0d47..5696b69a59 100644 --- a/indra/llwindow/llwindowheadless.h +++ b/indra/llwindow/llwindowheadless.h @@ -101,8 +101,6 @@ public: /*virtual*/ F32 getPixelAspectRatio() override { return 1.0f; } /*virtual*/ void setNativeAspectRatio(F32 ratio) override {} - void setMaxVRAMMegabytes(U32 max_vram) override {} - /*virtual*/ void *getPlatformWindow() override { return 0; } /*virtual*/ void bringToFront() override {} diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 05d5fdfc0b..94e7de333f 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -128,7 +128,6 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks, bool enable_vsync, bool use_gl, bool ignore_pixel_depth, U32 fsaa_samples, - U32 max_vram, bool useLegacyCursors) // Legacy cursor setting from main program : LLWindow(NULL, fullscreen, flags) , mUseLegacyCursors(useLegacyCursors) // Legacy cursor setting from main program diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index e4713434f0..f66b66db1b 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -100,8 +100,6 @@ public: F32 getPixelAspectRatio() override; void setNativeAspectRatio(F32 ratio) override { mOverrideAspectRatio = ratio; } - virtual void setMaxVRAMMegabytes(U32 max_vram) override {} - void beforeDialog() override; void afterDialog() override; @@ -157,7 +155,6 @@ protected: bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl, bool ignore_pixel_depth, U32 fsaa_samples, - U32 max_vram, bool useLegacyCursors); // Legacy cursor setting from main program ~LLWindowMacOSX(); diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 71305fc61b..ae92f993ec 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -440,7 +440,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, 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, U32 max_vram, bool useLegacyCursors) + bool ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors) : LLWindow(callbacks, fullscreen, flags), Lock_Display(NULL), //Unlock_Display(NULL), mGamma(1.0f) diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index bb670bcbb2..3bf341eb11 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -118,9 +118,6 @@ public: /*virtual*/ F32 getPixelAspectRatio(); /*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; } - U32 getAvailableVRAMMegabytes() override { return 4096; }; - /*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) {} - /*virtual*/ void beforeDialog(); /*virtual*/ void afterDialog(); diff --git a/indra/llwindow/llwindowsdl2.cpp b/indra/llwindow/llwindowsdl2.cpp index 7796f05b0f..5c34e99ae4 100644 --- a/indra/llwindow/llwindowsdl2.cpp +++ b/indra/llwindow/llwindowsdl2.cpp @@ -385,7 +385,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, 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, U32 max_vram, bool useLegacyCursors) + bool ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors) : LLWindow(callbacks, fullscreen, flags), Lock_Display(NULL), //Unlock_Display(NULL), mGamma(1.0f) diff --git a/indra/llwindow/llwindowsdl2.h b/indra/llwindow/llwindowsdl2.h index 5c92d8d913..390ff2eafc 100644 --- a/indra/llwindow/llwindowsdl2.h +++ b/indra/llwindow/llwindowsdl2.h @@ -120,8 +120,6 @@ public: /*virtual*/ F32 getPixelAspectRatio(); /*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; } - /*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) {} - /*virtual*/ void beforeDialog(); /*virtual*/ void afterDialog(); @@ -166,7 +164,7 @@ protected: const std::string& title, int x, int y, int width, int height, U32 flags, bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl, //bool ignore_pixel_depth, U32 fsaa_samples); - bool ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors); // Legacy cursor setting from main program + bool ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors); // Legacy cursor setting from main program ~LLWindowSDL(); /*virtual*/ bool isValid(); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 776feae5a9..6e26ebd3ad 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -404,7 +404,6 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool using FuncType = std::function; // call GetMessage() and pull enqueue messages for later processing - void gatherInput(); HWND mWindowHandleThrd = NULL; HDC mhDCThrd = 0; @@ -412,8 +411,6 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool // until after some graphics setup. See SL-20177. -Cosmic,2023-09-18 bool mGLReady = false; bool mGotGLBuffer = false; - - U32 mMaxVRAM = 0; // maximum amount of vram to allow in the "budget", or 0 for no maximum (see updateVRAMUsage) }; @@ -425,7 +422,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks, bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, - U32 max_vram, F32 max_gl_version, bool useLegacyCursors) // Legacy cursor setting from main program : @@ -435,7 +431,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks, { sMainThreadId = LLThread::currentID(); mWindowThread = new LLWindowWin32Thread(); - mWindowThread->mMaxVRAM = max_vram; //MAINT-516 -- force a load of opengl32.dll just in case windows went sideways LoadLibrary(L"opengl32.dll"); @@ -4636,15 +4631,6 @@ std::vector LLWindowWin32::getDynamicFallbackFontList() // Fonts previously in getFontListSans() have moved to fonts.xml. return std::vector(); } - -void LLWindowWin32::setMaxVRAMMegabytes(U32 max_vram) -{ - if (mWindowThread) - { - mWindowThread->mMaxVRAM = max_vram; - } -} - // Allow to query for window chrome sizes. void LLWindowWin32::getWindowChrome( U32 &aChromeW, U32 &aChromeH ) { diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index a6131dfad2..2d22ccfa7d 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -108,8 +108,6 @@ public: /*virtual*/ F32 getPixelAspectRatio(); /*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; } - /*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) override; - /*virtual*/ bool dialogColorPicker(F32 *r, F32 *g, F32 *b ); /*virtual*/ void *getPlatformWindow(); @@ -143,13 +141,12 @@ protected: LLWindowWin32(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl, - //bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version); - bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version, bool useLegacyCursors); // Legacy cursor setting from main program + //bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, F32 max_gl_version); + bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, F32 max_gl_version, bool useLegacyCursors); // Legacy cursor setting from main program ~LLWindowWin32(); //void initCursors(); void initCursors(bool useLegacyCursors); // Legacy cursor setting from main program - void initInputDevices(); HCURSOR loadColorCursor(LPCTSTR name); bool isValid(); void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size); @@ -166,7 +163,6 @@ protected: bool shouldPostQuit() { return mPostQuit; } - void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form); void fillCandidateForm(const LLCoordGL& caret, const LLRect& bounds, CANDIDATEFORM *form); void fillCharPosition(const LLCoordGL& caret, const LLRect& bounds, const LLRect& control, IMECHARPOSITION *char_position); void fillCompositionLogfont(LOGFONT *logfont); @@ -181,10 +177,8 @@ protected: // bool getClientRectInScreenSpace(RECT* rectp); - void updateJoystick( ); static LRESULT CALLBACK mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_param, LPARAM l_param); - static bool CALLBACK enumChildWindows(HWND h_wnd, LPARAM l_param); // @@ -295,8 +289,6 @@ private: extern LLW32MsgCallback gAsyncMsgCallback; extern LPWSTR gIconResource; -static void handleMessage( const MSG& msg ); - S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 type); #endif //LL_LLWINDOWWIN32_H diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cee5366f6a..4c874d9901 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1973,15 +1973,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) U32 max_core_count = gSavedSettings.getU32("EmulateCoreCount"); F32 max_gl_version = gSavedSettings.getF32("RenderMaxOpenGLVersion"); - LLControlVariable* vram_control = gSavedSettings.getControl("RenderMaxVRAMBudget"); - U32 max_vram = vram_control->getValue().asInteger(); - mMaxVRAMControlConnection = vram_control->getSignal()->connect( - [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val) - { - if (mWindow) mWindow->setMaxVRAMMegabytes(new_val.asInteger()); - }); - - mWindow = LLWindowManager::createWindow(this, p.title, p.name, p.x, p.y, p.width, p.height, 0, p.fullscreen, @@ -1991,7 +1982,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) p.ignore_pixel_depth, 0, max_core_count, - max_vram, max_gl_version, //don't use window level anti-aliasing useLegacyCursors); // Legacy cursor setting from main program @@ -2721,8 +2711,6 @@ LLViewerWindow::~LLViewerWindow() LLViewerShaderMgr::releaseInstance(); LLViewerShaderMgr::sInitialized = false; } - - mMaxVRAMControlConnection.disconnect(); } diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index d04a314b9e..bcbb06eda7 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -556,8 +556,6 @@ private: // Object temporarily hovered over while dragging LLPointer mDragHoveredObject; - boost::signals2::connection mMaxVRAMControlConnection; - static LLTrace::SampleStatHandle<> sMouseVelocityStat; };