summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authormobserveur <mobserveur@gmail.com>2024-07-14 23:49:59 +0200
committermobserveur <mobserveur@gmail.com>2024-07-14 23:49:59 +0200
commitb5ac09bdb43e0f2506d9229e0070c5e8b8792b17 (patch)
treec155397cedef7fc72306dc15ae86c92e99b4cd66 /indra/newview
parent2b1888091acb25bcbd849e9e216f62900c4a032d (diff)
Performance and tuning
Performance and tuning floater updated including fixes
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt22
-rw-r--r--indra/newview/llviewerfloaterreg.cpp6
-rw-r--r--indra/newview/mpfloatertuning.cpp (renamed from indra/newview/mpvfloatertuning.cpp)31
-rw-r--r--indra/newview/mpfloatertuning.h (renamed from indra/newview/mpvfloatertuning.h)10
-rw-r--r--indra/newview/skins/default/xui/en/floater_mp_performance.xml (renamed from indra/newview/skins/default/xui/en/floater_mpv_performance.xml)13
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml3
6 files changed, 43 insertions, 42 deletions
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<LLFloaterHoverHeight>);
LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);
- LLFloaterReg::add("mpv_performance", "floater_mpv_performance.xml", (LLFloaterBuildFunc)&
- LLFloaterReg::build<MPVFloaterTuning>);
+ LLFloaterReg::add("mpv_performance", "floater_mp_performance.xml", (LLFloaterBuildFunc)&
+ LLFloaterReg::build<MPFloaterTuning>);
LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMSession>);
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMContainer>);
diff --git a/indra/newview/mpvfloatertuning.cpp b/indra/newview/mpfloatertuning.cpp
index 177bd3caa7..938299cacf 100644
--- a/indra/newview/mpvfloatertuning.cpp
+++ b/indra/newview/mpfloatertuning.cpp
@@ -1,5 +1,5 @@
/**
-* @file mpvfloatertuning.cpp
+* @file mpfloatertuning.cpp
* @brief Controller for viewer tuning
* @author observeur@megapahit.net
*
@@ -27,7 +27,7 @@
#include "llviewerprecompiledheaders.h"
-#include "mpvfloatertuning.h"
+#include "mpfloatertuning.h"
#include "llsliderctrl.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@@ -36,34 +36,41 @@
#include "../llrender/llvertexbuffer.cpp"
-MPVFloaterTuning::MPVFloaterTuning(const LLSD& key) : LLFloater(key)
+MPFloaterTuning::MPFloaterTuning(const LLSD& key) : LLFloater(key)
{
}
-void MPVFloaterTuning::syncFromPreferenceSetting(void *user_data)
+void MPFloaterTuning::syncFromPreferenceSetting(void *user_data)
{
- MPVFloaterTuning *self = static_cast<MPVFloaterTuning*>(user_data);
+ MPFloaterTuning *self = static_cast<MPFloaterTuning*>(user_data);
U32 fps = gSavedSettings.getU32("MaxFPS");
LLSliderCtrl* fpsSliderCtrl = self->getChild<LLSliderCtrl>("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<LLComboBox>("MPVBuffModeComboBox");
- optBufCtrl->setCurrentByIndex(optBuf);
+ optBufCtrl->setCurrentByIndex(optBuf-1);
LL_INFOS() << "syncFromPreferenceSetting optBuf=" << optBuf << LL_ENDL;
}
-BOOL MPVFloaterTuning::postBuild()
+BOOL MPFloaterTuning::postBuild()
{
LLSliderCtrl* fpsSliderCtrl = getChild<LLSliderCtrl>("fpsSlider");
fpsSliderCtrl->setMinValue(0);
fpsSliderCtrl->setMaxValue(165);
- fpsSliderCtrl->setSliderMouseUpCallback(boost::bind(&MPVFloaterTuning::onFinalCommit,this));
+ fpsSliderCtrl->setSliderMouseUpCallback(boost::bind(&MPFloaterTuning::onFinalCommit,this));
LLComboBox* optBufCtrl = getChild<LLComboBox>("MPVBuffModeComboBox");
- optBufCtrl->setCommitCallback(boost::bind(&MPVFloaterTuning::onFinalCommit,this));
+ optBufCtrl->setCommitCallback(boost::bind(&MPFloaterTuning::onFinalCommit,this));
syncFromPreferenceSetting(this);
@@ -72,19 +79,19 @@ BOOL MPVFloaterTuning::postBuild()
// Do send-to-the-server work when slider drag completes, or new
// value entered as text.
-void MPVFloaterTuning::onFinalCommit()
+void MPFloaterTuning::onFinalCommit()
{
LLSliderCtrl* fpsSliderCtrl = getChild<LLSliderCtrl>("fpsSlider");
U32 fps = (U32)fpsSliderCtrl->getValueF32();
gSavedSettings.setU32("MaxFPS",fps);
LLComboBox* optBufCtrl = getChild<LLComboBox>("MPVBuffModeComboBox");
- S16 optBuf = optBufCtrl->getCurrentIndex();
+ S16 optBuf = optBufCtrl->getCurrentIndex() + 1;
gSavedSettings.setU32("MPVBufferOptiMode",optBuf);
LLVertexBuffer::sMappingMode = optBuf;
}
-void MPVFloaterTuning::onClose(bool app_quitting)
+void MPFloaterTuning::onClose(bool app_quitting)
{
} \ No newline at end of file
diff --git a/indra/newview/mpvfloatertuning.h b/indra/newview/mpfloatertuning.h
index ed91317eab..8812395ef3 100644
--- a/indra/newview/mpvfloatertuning.h
+++ b/indra/newview/mpfloatertuning.h
@@ -1,5 +1,5 @@
/**
-* @file mpvfloatertuning.h
+* @file mpfloatertuning.h
* @brief Controller for viewer tuning
* @author observeur@megapahit.net
*
@@ -24,15 +24,15 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-#ifndef LL_MPVFLOATERTUNING_H
-#define LL_MPVFLOATERTUNING_H
+#ifndef LL_MPFLOATERTUNING_H
+#define LL_MPFLOATERTUNING_H
#include "llfloater.h"
-class MPVFloaterTuning: public LLFloater
+class MPFloaterTuning: public LLFloater
{
public:
- MPVFloaterTuning(const LLSD& key);
+ MPFloaterTuning(const LLSD& key);
BOOL postBuild();
diff --git a/indra/newview/skins/default/xui/en/floater_mpv_performance.xml b/indra/newview/skins/default/xui/en/floater_mp_performance.xml
index 5c54d366f2..865ffe82cf 100644
--- a/indra/newview/skins/default/xui/en/floater_mpv_performance.xml
+++ b/indra/newview/skins/default/xui/en/floater_mp_performance.xml
@@ -3,7 +3,7 @@
positioning="cascading"
legacy_header_height="40"
top="12"
- right="2"
+ right="-324"
height="120"
min_height="120"
width="320"
@@ -74,16 +74,11 @@
name="MPVBuffModeComboBox"
width="150"
height="23"
- left="120"
+ left="130"
top="4"
>
<combo_box.item
enabled="true"
- label="Auto"
- name="Auto"
- value="0" />
- <combo_box.item
- enabled="true"
label="Normal"
name="Normal"
value="1" />
@@ -94,8 +89,8 @@
value="2" />
<combo_box.item
enabled="true"
- label="Optimized+ (AMD GPU)"
- name="Optimized+"
+ label="Experimental"
+ name="Experimental"
value="3" />
</combo_box>
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 @@
<button
type="string"
font="SansSerif"
- text_color="FpsTextColor"
+ label_color="FpsTextColor"
follows="right|top"
halign="center"
valign="center"
height="18"
top="1"
- v_pad="0"
left_pad="4"
name="FpsText"
tool_tip="fps"