From b5ac09bdb43e0f2506d9229e0070c5e8b8792b17 Mon Sep 17 00:00:00 2001 From: mobserveur Date: Sun, 14 Jul 2024 23:49:59 +0200 Subject: Performance and tuning Performance and tuning floater updated including fixes --- indra/llrender/llgl.cpp | 14 +++ indra/llrender/llvertexbuffer.cpp | 41 +++----- indra/llwindow/llwindow.h | 4 - indra/llwindow/llwindowmacosx.cpp | 14 --- indra/llwindow/llwindowsdl.cpp | 17 ---- indra/newview/CMakeLists.txt | 22 ++--- indra/newview/llviewerfloaterreg.cpp | 6 +- indra/newview/mpfloatertuning.cpp | 97 +++++++++++++++++++ indra/newview/mpfloatertuning.h | 48 ++++++++++ indra/newview/mpvfloatertuning.cpp | 90 ------------------ indra/newview/mpvfloatertuning.h | 48 ---------- .../default/xui/en/floater_mp_performance.xml | 99 ++++++++++++++++++++ .../default/xui/en/floater_mpv_performance.xml | 104 --------------------- .../skins/default/xui/en/panel_status_bar.xml | 3 +- 14 files changed, 287 insertions(+), 320 deletions(-) create mode 100644 indra/newview/mpfloatertuning.cpp create mode 100644 indra/newview/mpfloatertuning.h delete mode 100644 indra/newview/mpvfloatertuning.cpp delete mode 100644 indra/newview/mpvfloatertuning.h create mode 100644 indra/newview/skins/default/xui/en/floater_mp_performance.xml delete mode 100644 indra/newview/skins/default/xui/en/floater_mpv_performance.xml (limited to 'indra') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 9207e6ad73..cb54785e76 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -50,6 +50,11 @@ #include "llglheaders.h" #include "llglslshader.h" +#include "llvertexbuffer.h" +#include "llcontrol.h" +extern LLControlGroup gSavedSettings; + + #if LL_WINDOWS #include "lldxhardware.h" #endif @@ -1263,6 +1268,15 @@ bool LLGLManager::initGL() initGLStates(); + U32 MPVBufferOptiMode = gSavedSettings.getU32("MPVBufferOptiMode"); + if (MPVBufferOptiMode == 0) + { + if(mIsApple) MPVBufferOptiMode = 2; + else MPVBufferOptiMode = 1; + gSavedSettings.setU32("MPVBufferOptiMode",MPVBufferOptiMode); + } + LLVertexBuffer::sMappingMode = MPVBufferOptiMode; + return true; } diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 30a7ed796a..59a8b3f7fb 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -534,7 +534,7 @@ U32 LLVertexBuffer::sGLRenderIndices = 0; U32 LLVertexBuffer::sLastMask = 0; U32 LLVertexBuffer::sVertexCount = 0; -U32 LLVertexBuffer::sMappingMode = gSavedSettings.getU32("MPVBufferOptiMode"); +U32 LLVertexBuffer::sMappingMode = 0; //NOTE: each component must be AT LEAST 4 bytes in size to avoid a performance penalty on AMD hardware const U32 LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_MAX] = @@ -1149,17 +1149,12 @@ U8* LLVertexBuffer::mapIndexBuffer(U32 index, S32 count) // start -- first byte to copy // end -- last byte to copy (NOT last byte + 1) // data -- mMappedData or mMappedIndexData -static void flush_vbo(GLenum target, U32 start, U32 end, void* data, S16 mode) +// note (observeur) : the mode parameter adds an altenative method to map the buffer +// mode = 0 or 1: glBufferSubData(), mode = 2 : glMapBufferRange() works much better on Apple gpus +// mode = 3 or 4: experimental bits parameters for glMapBufferRange() +static void flush_vbo(GLenum target, U32 start, U32 end, void* data, U32 mode) { - if (end == 0) return; - - if (mode == 0) - { - if(gGLManager.mIsApple) mode = 2; - else mode = 1; - } - - if (mode == 1) + if (mode < 2) { LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("glBufferSubData"); LL_PROFILE_ZONE_NUM(start); @@ -1173,7 +1168,6 @@ static void flush_vbo(GLenum target, U32 start, U32 end, void* data, S16 mode) LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("glBufferSubData block"); LL_PROFILE_GPU_ZONE("glBufferSubData"); U32 tend = llmin(i + block_size, end); - //U32 size = tend - i + 1; glBufferSubData(target, i, tend - i +1, (U8*) data + (i-start)); } @@ -1181,7 +1175,8 @@ static void flush_vbo(GLenum target, U32 start, U32 end, void* data, S16 mode) } U32 MapBits = GL_MAP_WRITE_BIT; - if (mode>2) MapBits = GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT; + if (mode==3) MapBits = MapBits | GL_MAP_INVALIDATE_RANGE_BIT; + if (mode==4) MapBits = MapBits | GL_MAP_UNSYNCHRONIZED_BIT; U32 buffer_size = end-start+1; @@ -1191,16 +1186,9 @@ static void flush_vbo(GLenum target, U32 start, U32 end, void* data, S16 mode) if (mptr) { std::memcpy(mptr, (U8*) data, buffer_size); - if(!glUnmapBuffer(target)) - { - LL_WARNS() << "glUnmapBuffer() failed" << LL_ENDL; - } + if(!glUnmapBuffer(target)) LL_WARNS() << "glUnmapBuffer() failed" << LL_ENDL; } - else - { - LL_WARNS() << "glMapBufferRange() returned NULL" << LL_ENDL; - } - + else LL_WARNS() << "glMapBufferRange() returned NULL" << LL_ENDL; } void LLVertexBuffer::unmapBuffer() @@ -1236,13 +1224,13 @@ void LLVertexBuffer::unmapBuffer() } else { - flush_vbo(GL_ARRAY_BUFFER, start, end, (U8*)mMappedData + start, sMappingMode); + if(end > start) flush_vbo(GL_ARRAY_BUFFER, start, end, (U8*)mMappedData + start,sMappingMode); start = region.mStart; end = region.mEnd; } } - flush_vbo(GL_ARRAY_BUFFER, start, end, (U8*)mMappedData + start, sMappingMode); + if(end > start) flush_vbo(GL_ARRAY_BUFFER, start, end, (U8*)mMappedData + start,sMappingMode); mMappedVertexRegions.clear(); } @@ -1270,14 +1258,13 @@ void LLVertexBuffer::unmapBuffer() } else { - flush_vbo(GL_ELEMENT_ARRAY_BUFFER, start, end, (U8*)mMappedIndexData + start, sMappingMode); - + if(end > start) flush_vbo(GL_ELEMENT_ARRAY_BUFFER, start, end, (U8*)mMappedIndexData + start, sMappingMode); start = region.mStart; end = region.mEnd; } } - flush_vbo(GL_ELEMENT_ARRAY_BUFFER, start, end, (U8*)mMappedIndexData + start, sMappingMode); + if(end > start) flush_vbo(GL_ELEMENT_ARRAY_BUFFER, start, end, (U8*)mMappedIndexData + start, sMappingMode); mMappedIndexRegions.clear(); } diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 5bb538f892..aff9334cb6 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -34,8 +34,6 @@ #include "llinstancetracker.h" #include "llsd.h" -#include "../llrender/llglheaders.h" - class LLSplashScreen; class LLPreeditor; class LLWindowCallbacks; @@ -245,8 +243,6 @@ protected: S32 mMinWindowHeight; S32 mRefreshRate; - GLsync swapFense; - // Handle a UTF-16 encoding unit received from keyboard. // Converting the series of UTF-16 encoding units to UTF-32 data, // this method passes the resulting UTF-32 data to mCallback's diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 1b8ab27f23..842a41427e 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -38,7 +38,6 @@ #include "lldir.h" #include "indra_constants.h" -#include "../newview/llviewercontrol.h" #include #include @@ -1013,19 +1012,6 @@ BOOL LLWindowMacOSX::setSizeImpl(const LLCoordWindow size) void LLWindowMacOSX::swapBuffers() { CGLFlushDrawable(mContext); - - U32 mode = gSavedSettings.getU32("MPVBufferOptiMode"); - if (mode == 0) - { - if(gGLManager.mIsApple) mode = 2; - else mode = 1; - } - if (mode > 2) - { - glClientWaitSync(swapFense, GL_SYNC_FLUSH_COMMANDS_BIT, GL_TIMEOUT_IGNORED); - glDeleteSync(swapFense); - swapFense = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); - } } void LLWindowMacOSX::restoreGLContext() diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 531c70e8d9..753d678bda 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -40,10 +40,6 @@ #include "lldir.h" #include "llfindlocale.h" -#include "../newview/llviewercontrol.h" - -extern LLControlGroup gSavedSettings; - #if LL_GTK extern "C" { # include "gtk/gtk.h" @@ -1096,24 +1092,11 @@ BOOL LLWindowSDL::setSizeImpl(const LLCoordWindow size) return FALSE; } - void LLWindowSDL::swapBuffers() { if (mWindow) { SDL_GL_SwapWindow(mWindow); - U32 mode = gSavedSettings.getU32("MPVBufferOptiMode"); - if (mode == 0) - { - if(gGLManager.mIsApple) mode = 2; - else mode = 1; - } - if (mode > 2) - { - glClientWaitSync(swapFense, GL_SYNC_FLUSH_COMMANDS_BIT, GL_TIMEOUT_IGNORED); - glDeleteSync(swapFense); - swapFense = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); - } } } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3076724a05..1821e12e09 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -250,7 +250,7 @@ set(viewer_SOURCE_FILES llfloaterhandler.cpp llfloaterhelpbrowser.cpp llfloaterhoverheight.cpp - mpvfloatertuning.cpp + mpfloatertuning.cpp llfloaterhowto.cpp llfloaterhud.cpp llfloaterimagepreview.cpp @@ -913,7 +913,7 @@ set(viewer_HEADER_FILES llfloaterhandler.h llfloaterhelpbrowser.h llfloaterhoverheight.h - mpvfloatertuning.h + mpfloatertuning.h llfloaterhowto.h llfloaterhud.h llfloaterimagepreview.h @@ -1417,7 +1417,7 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n") set_source_files_properties( - llversioninfo.cpp tests/llversioninfo_test.cpp + llversioninfo.cpp tests/llversioninfo_test.cpp PROPERTIES COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake ) @@ -1624,7 +1624,7 @@ endif (WINDOWS) file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE ${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/skins PREFIX "XUI Files" FILES ${viewer_XUI_FILES}) -set_source_files_properties(${viewer_XUI_FILES} +set_source_files_properties(${viewer_XUI_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES}) @@ -1632,7 +1632,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES}) file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES}) -set_source_files_properties(${viewer_SHADER_FILES} +set_source_files_properties(${viewer_SHADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES}) @@ -1924,7 +1924,7 @@ endif (WINDOWS) # one of these being libz where you can find four or more versions in play # at once. On Linux, libz can be found at link and run time via a number # of paths: -# +# # => -lfreetype # => libz.so.1 (on install machine, not build) # => -lSDL @@ -2041,7 +2041,7 @@ foreach(elem ${country_codes}) set(emoji_mapping_src_file "${emoji_mapping_src_folder}/${elem}/emoji_characters.xml") set(emoji_mapping_dst_file - "${emoji_mapping_dst_folder}/${elem}/emoji_characters.xml") + "${emoji_mapping_dst_folder}/${elem}/emoji_characters.xml") configure_file(${emoji_mapping_src_file} ${emoji_mapping_dst_file} COPYONLY) endforeach() @@ -2145,7 +2145,7 @@ if (DARWIN) # https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/ set(CMAKE_MACOSX_RPATH 1) - + set_target_properties( ${VIEWER_BINARY_NAME} PROPERTIES @@ -2352,7 +2352,7 @@ if (LL_TESTS) # llremoteparcelrequest.cpp llviewerhelputil.cpp llversioninfo.cpp -# llvocache.cpp +# llvocache.cpp llworldmap.cpp llworldmipmap.cpp ) @@ -2361,7 +2361,7 @@ if (LL_TESTS) llworldmap.cpp llworldmipmap.cpp PROPERTIES - LL_TEST_ADDITIONAL_SOURCE_FILES + LL_TEST_ADDITIONAL_SOURCE_FILES tests/llviewertexture_stub.cpp #llviewertexturelist.cpp ) @@ -2395,7 +2395,7 @@ if (LL_TESTS) llworldmap.cpp llworldmipmap.cpp PROPERTIES - LL_TEST_ADDITIONAL_SOURCE_FILES + LL_TEST_ADDITIONAL_SOURCE_FILES tests/llviewertexture_stub.cpp ) diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 9ec5f4f122..38fde25ebb 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -81,7 +81,7 @@ #include "llfloatergroups.h" #include "llfloaterhelpbrowser.h" #include "llfloaterhoverheight.h" -#include "mpvfloatertuning.h" +#include "mpfloatertuning.h" #include "llfloaterhowto.h" #include "llfloaterhud.h" #include "llfloaterimagepreview.h" @@ -381,8 +381,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("edit_hover_height", "floater_edit_hover_height.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("mpv_performance", "floater_mpv_performance.xml", (LLFloaterBuildFunc)& - LLFloaterReg::build); + LLFloaterReg::add("mpv_performance", "floater_mp_performance.xml", (LLFloaterBuildFunc)& + LLFloaterReg::build); LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/mpfloatertuning.cpp b/indra/newview/mpfloatertuning.cpp new file mode 100644 index 0000000000..938299cacf --- /dev/null +++ b/indra/newview/mpfloatertuning.cpp @@ -0,0 +1,97 @@ +/** +* @file mpfloatertuning.cpp +* @brief Controller for viewer tuning +* @author observeur@megapahit.net +* +* $LicenseInfo:firstyear=2014&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2014, 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 "mpfloatertuning.h" +#include "llsliderctrl.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "llviewercontrol.h" +#include "llsdserialize.h" + +#include "../llrender/llvertexbuffer.cpp" + +MPFloaterTuning::MPFloaterTuning(const LLSD& key) : LLFloater(key) +{ +} + +void MPFloaterTuning::syncFromPreferenceSetting(void *user_data) +{ + MPFloaterTuning *self = static_cast(user_data); + + U32 fps = gSavedSettings.getU32("MaxFPS"); + LLSliderCtrl* fpsSliderCtrl = self->getChild("fpsSlider"); + fpsSliderCtrl->setValue(fps,FALSE); + + U32 optBuf = gSavedSettings.getU32("MPVBufferOptiMode"); + + if(optBuf == 0) + { + if(gGLManager.mIsApple) optBuf = 2; + else optBuf = 1; + } + + LLComboBox * optBufCtrl = self->getChild("MPVBuffModeComboBox"); + optBufCtrl->setCurrentByIndex(optBuf-1); + + LL_INFOS() << "syncFromPreferenceSetting optBuf=" << optBuf << LL_ENDL; +} + +BOOL MPFloaterTuning::postBuild() +{ + LLSliderCtrl* fpsSliderCtrl = getChild("fpsSlider"); + fpsSliderCtrl->setMinValue(0); + fpsSliderCtrl->setMaxValue(165); + fpsSliderCtrl->setSliderMouseUpCallback(boost::bind(&MPFloaterTuning::onFinalCommit,this)); + + LLComboBox* optBufCtrl = getChild("MPVBuffModeComboBox"); + optBufCtrl->setCommitCallback(boost::bind(&MPFloaterTuning::onFinalCommit,this)); + + syncFromPreferenceSetting(this); + + return TRUE; +} + +// Do send-to-the-server work when slider drag completes, or new +// value entered as text. +void MPFloaterTuning::onFinalCommit() +{ + LLSliderCtrl* fpsSliderCtrl = getChild("fpsSlider"); + U32 fps = (U32)fpsSliderCtrl->getValueF32(); + gSavedSettings.setU32("MaxFPS",fps); + + LLComboBox* optBufCtrl = getChild("MPVBuffModeComboBox"); + S16 optBuf = optBufCtrl->getCurrentIndex() + 1; + gSavedSettings.setU32("MPVBufferOptiMode",optBuf); + + LLVertexBuffer::sMappingMode = optBuf; +} + +void MPFloaterTuning::onClose(bool app_quitting) +{ +} \ No newline at end of file diff --git a/indra/newview/mpfloatertuning.h b/indra/newview/mpfloatertuning.h new file mode 100644 index 0000000000..8812395ef3 --- /dev/null +++ b/indra/newview/mpfloatertuning.h @@ -0,0 +1,48 @@ +/** +* @file mpfloatertuning.h +* @brief Controller for viewer tuning +* @author observeur@megapahit.net +* +* $LicenseInfo:firstyear=2014&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2014, 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_MPFLOATERTUNING_H +#define LL_MPFLOATERTUNING_H + +#include "llfloater.h" + +class MPFloaterTuning: public LLFloater +{ +public: + MPFloaterTuning(const LLSD& key); + + BOOL postBuild(); + + void onFinalCommit(); + + static void syncFromPreferenceSetting(void *user_data); + + //void updateEditEnabled(); + + /*virtual*/ void onClose(bool app_quitting); +}; + +#endif diff --git a/indra/newview/mpvfloatertuning.cpp b/indra/newview/mpvfloatertuning.cpp deleted file mode 100644 index 177bd3caa7..0000000000 --- a/indra/newview/mpvfloatertuning.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/** -* @file mpvfloatertuning.cpp -* @brief Controller for viewer tuning -* @author observeur@megapahit.net -* -* $LicenseInfo:firstyear=2014&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2014, 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 "mpvfloatertuning.h" -#include "llsliderctrl.h" -#include "llcheckboxctrl.h" -#include "llcombobox.h" -#include "llviewercontrol.h" -#include "llsdserialize.h" - -#include "../llrender/llvertexbuffer.cpp" - -MPVFloaterTuning::MPVFloaterTuning(const LLSD& key) : LLFloater(key) -{ -} - -void MPVFloaterTuning::syncFromPreferenceSetting(void *user_data) -{ - MPVFloaterTuning *self = static_cast(user_data); - - U32 fps = gSavedSettings.getU32("MaxFPS"); - LLSliderCtrl* fpsSliderCtrl = self->getChild("fpsSlider"); - fpsSliderCtrl->setValue(fps,FALSE); - - U32 optBuf = gSavedSettings.getU32("MPVBufferOptiMode"); - LLComboBox * optBufCtrl = self->getChild("MPVBuffModeComboBox"); - optBufCtrl->setCurrentByIndex(optBuf); - - LL_INFOS() << "syncFromPreferenceSetting optBuf=" << optBuf << LL_ENDL; -} - -BOOL MPVFloaterTuning::postBuild() -{ - LLSliderCtrl* fpsSliderCtrl = getChild("fpsSlider"); - fpsSliderCtrl->setMinValue(0); - fpsSliderCtrl->setMaxValue(165); - fpsSliderCtrl->setSliderMouseUpCallback(boost::bind(&MPVFloaterTuning::onFinalCommit,this)); - - LLComboBox* optBufCtrl = getChild("MPVBuffModeComboBox"); - optBufCtrl->setCommitCallback(boost::bind(&MPVFloaterTuning::onFinalCommit,this)); - - syncFromPreferenceSetting(this); - - return TRUE; -} - -// Do send-to-the-server work when slider drag completes, or new -// value entered as text. -void MPVFloaterTuning::onFinalCommit() -{ - LLSliderCtrl* fpsSliderCtrl = getChild("fpsSlider"); - U32 fps = (U32)fpsSliderCtrl->getValueF32(); - gSavedSettings.setU32("MaxFPS",fps); - - LLComboBox* optBufCtrl = getChild("MPVBuffModeComboBox"); - S16 optBuf = optBufCtrl->getCurrentIndex(); - gSavedSettings.setU32("MPVBufferOptiMode",optBuf); - - LLVertexBuffer::sMappingMode = optBuf; -} - -void MPVFloaterTuning::onClose(bool app_quitting) -{ -} \ No newline at end of file diff --git a/indra/newview/mpvfloatertuning.h b/indra/newview/mpvfloatertuning.h deleted file mode 100644 index ed91317eab..0000000000 --- a/indra/newview/mpvfloatertuning.h +++ /dev/null @@ -1,48 +0,0 @@ -/** -* @file mpvfloatertuning.h -* @brief Controller for viewer tuning -* @author observeur@megapahit.net -* -* $LicenseInfo:firstyear=2014&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2014, 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_MPVFLOATERTUNING_H -#define LL_MPVFLOATERTUNING_H - -#include "llfloater.h" - -class MPVFloaterTuning: public LLFloater -{ -public: - MPVFloaterTuning(const LLSD& key); - - BOOL postBuild(); - - void onFinalCommit(); - - static void syncFromPreferenceSetting(void *user_data); - - //void updateEditEnabled(); - - /*virtual*/ void onClose(bool app_quitting); -}; - -#endif diff --git a/indra/newview/skins/default/xui/en/floater_mp_performance.xml b/indra/newview/skins/default/xui/en/floater_mp_performance.xml new file mode 100644 index 0000000000..865ffe82cf --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_mp_performance.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + Buffer mapping: + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/floater_mpv_performance.xml b/indra/newview/skins/default/xui/en/floater_mpv_performance.xml deleted file mode 100644 index 5c54d366f2..0000000000 --- a/indra/newview/skins/default/xui/en/floater_mpv_performance.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - Buffer mapping: - - - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index f337ad9038..80fa230bba 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -188,13 +188,12 @@ + max_val="1" + > + + width="124"> @@ -259,7 +280,7 @@ top="135" width="400" height="150" - border="true" + border="false" visible="false" background_visible="true"/> -- cgit v1.2.3 From 16f232bb509dae0d7570d9b815e86f120e596dc0 Mon Sep 17 00:00:00 2001 From: mobserveur Date: Sun, 14 Jul 2024 23:52:55 +0200 Subject: Vsync fix for Linux Vsync was activated when the viewer is launched. This should fix the issue. --- indra/newview/llviewerwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a19d9a3567..e7caf777f5 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2010,6 +2010,8 @@ LLViewerWindow::LLViewerWindow(const Params& p) mDebugText = new LLDebugText(this); mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale); + + mWindow->toggleVSync(gSavedSettings.getBOOL("RenderVSyncEnabled")); } std::string LLViewerWindow::getLastSnapshotDir() -- cgit v1.2.3 From 92dafc85c6fefd32ba8bad918173dd57a3df2213 Mon Sep 17 00:00:00 2001 From: mobserveur Date: Sun, 14 Jul 2024 23:54:02 +0200 Subject: Script dialog position This commit allows the script dialog position to be remembered --- indra/newview/skins/default/xui/en/floater_script.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml index ae6e68de17..900319620d 100644 --- a/indra/newview/skins/default/xui/en/floater_script.xml +++ b/indra/newview/skins/default/xui/en/floater_script.xml @@ -7,7 +7,8 @@ name="script_floater" can_dock="true" can_minimize="true" - visible="false" + save_rect="true" + visible="false" width="350" can_resize="false" min_width="350" -- cgit v1.2.3 From 54ef82dae2005d2340ea39208f262c564642f98f Mon Sep 17 00:00:00 2001 From: mobserveur Date: Sun, 14 Jul 2024 23:55:07 +0200 Subject: Eliminates the fatal warning in llprogressview.cpp The unused variables are commented --- indra/newview/llprogressview.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 664860db30..0a2debc7c6 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -379,17 +379,17 @@ void LLProgressView::initLogos() { mLogosList.clear(); - const U8 image_codec = IMG_CODEC_PNG; - const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); + //const U8 image_codec = IMG_CODEC_PNG; + //const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); //const S32 default_height = 28; - const S32 default_pad = 15; + //const S32 default_pad = 15; - S32 icon_width, icon_height; + //S32 icon_width, icon_height; // We don't know final screen rect yet, so we can't precalculate position fully - LLTextBox *logos_label = getChild("logos_lbl"); - S32 texture_start_x = logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad; - S32 texture_start_y = -7; + //LLTextBox *logos_label = getChild("logos_lbl"); + //S32 texture_start_x = logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad; + //S32 texture_start_y = -7; // Normally we would just preload these textures from textures.xml, // and display them via icon control, but they are only needed on -- cgit v1.2.3 From 357311c9b5cb5a7b4d1bbc92086750574c2539bd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 15 Jul 2024 08:47:44 +0800 Subject: Revert "Eliminates the fatal warning in llprogressview.cpp" This reverts commit 54ef82dae2005d2340ea39208f262c564642f98f. --- indra/newview/llprogressview.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 0a2debc7c6..664860db30 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -379,17 +379,17 @@ void LLProgressView::initLogos() { mLogosList.clear(); - //const U8 image_codec = IMG_CODEC_PNG; - //const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); + const U8 image_codec = IMG_CODEC_PNG; + const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); //const S32 default_height = 28; - //const S32 default_pad = 15; + const S32 default_pad = 15; - //S32 icon_width, icon_height; + S32 icon_width, icon_height; // We don't know final screen rect yet, so we can't precalculate position fully - //LLTextBox *logos_label = getChild("logos_lbl"); - //S32 texture_start_x = logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad; - //S32 texture_start_y = -7; + LLTextBox *logos_label = getChild("logos_lbl"); + S32 texture_start_x = logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad; + S32 texture_start_y = -7; // Normally we would just preload these textures from textures.xml, // and display them via icon control, but they are only needed on -- cgit v1.2.3 From 639a23f91ca4fcf8a0812f73ad75ea21257e8488 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 15 Jul 2024 08:50:40 +0800 Subject: Scope variables that are used when Fmod/Havok's on This way it still builds whether FMOD or OpenAL is the one set ON. --- indra/newview/llprogressview.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 664860db30..7e56e1ac0e 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -379,6 +379,7 @@ void LLProgressView::initLogos() { mLogosList.clear(); +#ifdef LL_FMODSTUDIO || LL_HAVOK const U8 image_codec = IMG_CODEC_PNG; const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); //const S32 default_height = 28; @@ -390,6 +391,7 @@ void LLProgressView::initLogos() LLTextBox *logos_label = getChild("logos_lbl"); S32 texture_start_x = logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad; S32 texture_start_y = -7; +#endif //LL_FMODSTUDIO || LL_HAVOK // Normally we would just preload these textures from textures.xml, // and display them via icon control, but they are only needed on -- cgit v1.2.3 From c48e6f5e95d44761e4e9ce27366711b2624c1ed3 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 15 Jul 2024 09:08:54 +0800 Subject: Fix macro processing syntax in previous commit --- indra/newview/llprogressview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 7e56e1ac0e..ae0face297 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -379,7 +379,7 @@ void LLProgressView::initLogos() { mLogosList.clear(); -#ifdef LL_FMODSTUDIO || LL_HAVOK +#if LL_FMODSTUDIO || LL_HAVOK const U8 image_codec = IMG_CODEC_PNG; const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); //const S32 default_height = 28; -- cgit v1.2.3 From 1c90b4208ed9efa77b7227c2d6e9691ed123452b Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Mon, 15 Jul 2024 14:21:08 -0600 Subject: colors.xml: MapParcelOutlineColor Change from Yellow to White --- indra/newview/skins/default/colors.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 73e9c85f4d..1fd46fc637 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -519,7 +519,7 @@ reference="White_10" /> + value="1 1 1 0.5" /> -- cgit v1.2.3 From 267c031b254015029463f609231b48b6188cf7b6 Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Mon, 15 Jul 2024 14:23:35 -0600 Subject: floater_my_environments.xml cleanup Remove unneeded background colour and bevel/border --- indra/newview/skins/default/xui/en/floater_my_environments.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_my_environments.xml b/indra/newview/skins/default/xui/en/floater_my_environments.xml index 8c9c450d7c..dd0795305e 100644 --- a/indra/newview/skins/default/xui/en/floater_my_environments.xml +++ b/indra/newview/skins/default/xui/en/floater_my_environments.xml @@ -26,8 +26,8 @@ bottom="-5" orientation="vertical"> Date: Mon, 15 Jul 2024 14:24:24 -0600 Subject: floater_world_map.xml search results bg Add transparent gray block behind world map search results --- indra/newview/skins/default/xui/en/floater_world_map.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index b3f672d51a..49dd55e91b 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -570,7 +570,7 @@ Date: Mon, 15 Jul 2024 14:25:16 -0600 Subject: WellButton_Lit & WellButton_Lit_Selected replacement New buttons that fit better --- .../default/textures/bottomtray/WellButton_Lit.png | Bin 4456 -> 5762 bytes .../textures/bottomtray/WellButton_Lit_Selected.png | Bin 4455 -> 5762 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png index 63e07a31d4..84711ddc29 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png and b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png index 2aa31478d8..9b9468c574 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png and b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png differ -- cgit v1.2.3 From 4b1bfe6434a33f47c60fc1da1926a37e8e9ec1e6 Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Mon, 15 Jul 2024 20:19:47 -0600 Subject: floater_gesture.xml cleanup Remove unneeded solid background --- indra/newview/skins/default/xui/en/floater_gesture.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index 832716c600..7fce91a2c3 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -52,7 +52,7 @@ width="80" /> Date: Tue, 16 Jul 2024 21:18:53 +0200 Subject: Max visible distance fix in the people panel This commit adds a custom debug variable set to 4096 by default that affects only the people panel list. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llpanelpeople.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f76992c30b..bf0abee385 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13785,6 +13785,17 @@ Value 0 + MPVNearMeRange + + Comment + Search radius in the people panel + Persist + 1 + Type + F32 + Value + 4096 +