summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/GLH.cmake5
-rw-r--r--indra/cmake/NDOF.cmake2
-rw-r--r--indra/cmake/TinyGLTF.cmake4
-rw-r--r--indra/cmake/Variables.cmake2
-rw-r--r--indra/llmath/CMakeLists.txt2
-rw-r--r--indra/llplugin/slplugin/CMakeLists.txt5
-rw-r--r--indra/llrender/llvertexbuffer.cpp132
-rw-r--r--indra/llrender/llvertexbuffer.h4
-rw-r--r--indra/llui/llui.cpp2
-rw-r--r--indra/llwindow/llwindow.h4
-rw-r--r--indra/llwindow/llwindowmacosx.cpp17
-rw-r--r--indra/llwindow/llwindowsdl.cpp16
-rw-r--r--indra/media_plugins/cef/CMakeLists.txt23
-rw-r--r--indra/media_plugins/libvlc/CMakeLists.txt32
-rw-r--r--indra/newview/CMakeLists.txt6
-rw-r--r--indra/newview/FixBundle.cmake.in154
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/ViewerInstall.cmake28
-rw-r--r--indra/newview/app_settings/settings.xml28
-rw-r--r--indra/newview/llappviewer.cpp16
-rw-r--r--indra/newview/llstatusbar.cpp13
-rw-r--r--indra/newview/llstatusbar.h4
-rw-r--r--indra/newview/llviewerfloaterreg.cpp4
-rw-r--r--indra/newview/mpvfloatertuning.cpp90
-rw-r--r--indra/newview/mpvfloatertuning.h48
-rw-r--r--indra/newview/skins/default/xui/en/floater_mpv_performance.xml104
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml20
27 files changed, 645 insertions, 122 deletions
diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake
index 09f7d568be..bdd8bc4836 100644
--- a/indra/cmake/GLH.cmake
+++ b/indra/cmake/GLH.cmake
@@ -4,9 +4,8 @@ include(Prebuilt)
add_library( ll::glh_linear INTERFACE IMPORTED )
if (USESYSTEMLIBS)
- target_include_directories(ll::glh_linear SYSTEM INTERFACE
- ${CMAKE_SYSROOT}/usr/local/include)
- return ()
+ target_include_directories( ll::glh_linear SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
+ return ()
endif ()
use_system_binary( glh_linear )
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index b88fbccf2a..aa0f0d042c 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -7,11 +7,13 @@ include_guard()
add_library( ll::ndof INTERFACE IMPORTED )
if (NDOF)
+ if (NOT USESYSTEMLIBS)
if (WINDOWS OR DARWIN)
use_prebuilt_binary(libndofdev)
elseif (LINUX)
use_prebuilt_binary(open-libndofdev)
endif (WINDOWS OR DARWIN)
+ endif (NOT USESYSTEMLIBS)
if (WINDOWS)
target_link_libraries( ll::ndof INTERFACE libndofdev)
diff --git a/indra/cmake/TinyGLTF.cmake b/indra/cmake/TinyGLTF.cmake
index b20a2a41de..7e74089208 100644
--- a/indra/cmake/TinyGLTF.cmake
+++ b/indra/cmake/TinyGLTF.cmake
@@ -2,10 +2,8 @@
include(Prebuilt)
if (NOT USESYSTEMLIBS)
-
use_prebuilt_binary(tinygltf)
+endif (NOT USESYSTEMLIBS)
set(TINYGLTF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tinygltf)
-endif (NOT USESYSTEMLIBS)
-
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 59725ecc65..f1a4d43f90 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -204,7 +204,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "")
set(CMAKE_XCODE_ATTRIBUTE_DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING YES)
set(CMAKE_XCODE_ATTRIBUTE_GCC_WARN_64_TO_32_BIT_CONVERSION NO)
- set(CMAKE_OSX_ARCHITECTURES "${ARCH}")
+ #set(CMAKE_OSX_ARCHITECTURES "${ARCH}")
string(REPLACE "i686" "i386" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}")
string(REPLACE "AMD64" "x86_64" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}")
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index c85d9c75c7..c0a62ad225 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -98,6 +98,8 @@ set(llmath_HEADER_FILES
list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES})
+include_directories(${LIBS_PREBUILT_DIR}/include)
+
add_library (llmath ${llmath_SOURCE_FILES})
target_link_libraries(llmath llcommon llmeshoptimizer)
diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt
index c3752a4705..46e63e473c 100644
--- a/indra/llplugin/slplugin/CMakeLists.txt
+++ b/indra/llplugin/slplugin/CMakeLists.txt
@@ -56,7 +56,7 @@ if (DARWIN)
COMMAND mkdir
ARGS
-p
- ${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/SLPlugin.app/Contents/Resources
+ ${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/SLPlugin.app/Contents/Frameworks
)
endif (DARWIN)
@@ -67,8 +67,7 @@ endif ()
if (INSTALL)
if (DARWIN)
- install(TARGETS ${PROJECT_NAME}
- DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources)
+ install(TARGETS ${PROJECT_NAME} DESTINATION Resources)
else (DARWIN)
install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME})
endif (DARWIN)
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 52fb58187a..30a7ed796a 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -37,6 +37,10 @@
#include "llglslshader.h"
#include "llmemory.h"
+#include "llcontrol.h"
+
+extern LLControlGroup gSavedSettings;
+
//Next Highest Power Of Two
//helper function, returns first number > v that is a power of 2, or v if v is already a power of 2
U32 nhpo2(U32 v)
@@ -530,6 +534,7 @@ U32 LLVertexBuffer::sGLRenderIndices = 0;
U32 LLVertexBuffer::sLastMask = 0;
U32 LLVertexBuffer::sVertexCount = 0;
+U32 LLVertexBuffer::sMappingMode = gSavedSettings.getU32("MPVBufferOptiMode");
//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] =
@@ -1144,93 +1149,58 @@ 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)
+static void flush_vbo(GLenum target, U32 start, U32 end, void* data, S16 mode)
{
- if (end != 0)
+ if (end == 0) return;
+
+ if (mode == 0)
+ {
+ if(gGLManager.mIsApple) mode = 2;
+ else mode = 1;
+ }
+
+ if (mode == 1)
{
- //Note (observeur): I maintained the profile "glBufferSubData" names because i'm not sure if it would impact any statistics part somewhere in the code.
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("glBufferSubData");
LL_PROFILE_ZONE_NUM(start);
LL_PROFILE_ZONE_NUM(end);
LL_PROFILE_ZONE_NUM(end-start);
- U32 size = end-start+1;
- U32 block_size = 65536;
+ const U32 block_size = 65536;
- //Note (observeur): The following code is executed on non Apple gpus. Using glMapBufferRange() didn't show obvious benefit on the other tested platforms (intel igpu, amd igpu and nVidia dgpus).
- if(!gGLManager.mIsApple)
- {
- for (U32 i = start; i <= end; i += block_size)
- {
- 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, size, (U8*) data + (i-start));
- }
-
- return;
- }
-
- //Note (observeur): glBufferSubData() was causing synchronization stalls on Apple GPUs resulting to heavy stutters and lower performance in the world and UI rendering. Using glMapBufferRange() benefits Macs with Apple gpus enormously.
-
- //Note (observeur): Other bits such as GL_MAP_INVALIDATE_RANGE_BIT or GL_MAP_UNSYNCHRONIZED_BIT didn't seem to make much of a difference on Apple gpus, so we stick to the simple way.
- U32 MapBits = GL_MAP_WRITE_BIT;
-
- //Note (observeur): Using a block size of 0 will call the following block and map the buffer all in once. It doesn't bother Apple machines, it might actually benefit them a little bit. A larger value is also fine. The largest buffers I observed where around 2mb or 3mb while most of buffers are smaller than 50000 bytes.
- block_size = 524288;
-
- //Note (observeur): This is called in case block_size is set to 0 (All in one mapping).
- if(block_size == 0)
+ for (U32 i = start; i <= end; i += block_size)
{
- U8 * mptr = NULL;
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("glBufferSubData block");
LL_PROFILE_GPU_ZONE("glBufferSubData");
-
- mptr = (U8*) glMapBufferRange( target, start, size, MapBits);
-
- if(mptr)
- {
- std::memcpy(mptr, (U8*) data, size);
- glUnmapBuffer(target);
- }
- else
- {
- LL_WARNS() << "glMapBufferRange() returned NULL" << LL_ENDL;
- }
- return;
+ U32 tend = llmin(i + block_size, end);
+ //U32 size = tend - i + 1;
+ glBufferSubData(target, i, tend - i +1, (U8*) data + (i-start));
}
- //Note (observeur): The following code is executed in case of block_size is superior to 0
-
- //Note (observeur): This is for analysis purpose only
- //if(size > block_size)
- //{
- // LL_INFOS() << "Large data range (MB MODE) : " << size << LL_ENDL;
- //}
+ return;
+ }
- U8 * mptr = NULL;
+ U32 MapBits = GL_MAP_WRITE_BIT;
+ if (mode>2) MapBits = GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT;
- for (U32 i = start; i <= end; i += block_size)
- {
- LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("glBufferSubData block");
- LL_PROFILE_GPU_ZONE("glBufferSubData");
- U32 tend = llmin(i + block_size, end);
- size = tend - i + 1;
+ U32 buffer_size = end-start+1;
- mptr = (U8*) glMapBufferRange( target, i, size, MapBits );
+ U8 * mptr = NULL;
+ mptr = (U8*) glMapBufferRange( target, start, end-start+1, MapBits);
- if(mptr)
- {
- std::memcpy(mptr, (U8*) data + (i-start), size);
- glUnmapBuffer(target);
- }
- else
- {
- LL_WARNS() << "glMapBufferRange() returned NULL" << LL_ENDL;
- }
+ if (mptr)
+ {
+ std::memcpy(mptr, (U8*) data, buffer_size);
+ if(!glUnmapBuffer(target))
+ {
+ LL_WARNS() << "glUnmapBuffer() failed" << LL_ENDL;
}
}
+ else
+ {
+ LL_WARNS() << "glMapBufferRange() returned NULL" << LL_ENDL;
+ }
+
}
void LLVertexBuffer::unmapBuffer()
@@ -1266,13 +1236,13 @@ void LLVertexBuffer::unmapBuffer()
}
else
{
- flush_vbo(GL_ARRAY_BUFFER, start, end, (U8*)mMappedData + 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);
+ flush_vbo(GL_ARRAY_BUFFER, start, end, (U8*)mMappedData + start, sMappingMode);
mMappedVertexRegions.clear();
}
@@ -1300,13 +1270,14 @@ void LLVertexBuffer::unmapBuffer()
}
else
{
- flush_vbo(GL_ELEMENT_ARRAY_BUFFER, start, end, (U8*)mMappedIndexData + 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);
+ flush_vbo(GL_ELEMENT_ARRAY_BUFFER, start, end, (U8*)mMappedIndexData + start, sMappingMode);
mMappedIndexRegions.clear();
}
@@ -1562,43 +1533,43 @@ void LLVertexBuffer::setupVertexBuffer()
void LLVertexBuffer::setPositionData(const LLVector4a* data)
{
llassert(sGLRenderBuffer == mGLBuffer);
- flush_vbo(GL_ARRAY_BUFFER, 0, sizeof(LLVector4a) * getNumVerts()-1, (U8*) data);
+ flush_vbo(GL_ARRAY_BUFFER, 0, sizeof(LLVector4a) * getNumVerts()-1, (U8*) data, sMappingMode);
}
void LLVertexBuffer::setTexCoordData(const LLVector2* data)
{
llassert(sGLRenderBuffer == mGLBuffer);
- flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_TEXCOORD0], mOffsets[TYPE_TEXCOORD0] + sTypeSize[TYPE_TEXCOORD0] * getNumVerts() - 1, (U8*)data);
+ flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_TEXCOORD0], mOffsets[TYPE_TEXCOORD0] + sTypeSize[TYPE_TEXCOORD0] * getNumVerts() - 1, (U8*) data, sMappingMode);
}
void LLVertexBuffer::setColorData(const LLColor4U* data)
{
llassert(sGLRenderBuffer == mGLBuffer);
- flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_COLOR], mOffsets[TYPE_COLOR] + sTypeSize[TYPE_COLOR] * getNumVerts() - 1, (U8*) data);
+ flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_COLOR], mOffsets[TYPE_COLOR] + sTypeSize[TYPE_COLOR] * getNumVerts() - 1, (U8*) data, sMappingMode);
}
void LLVertexBuffer::setNormalData(const LLVector4a* data)
{
llassert(sGLRenderBuffer == mGLBuffer);
- flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_NORMAL], mOffsets[TYPE_NORMAL] + sTypeSize[TYPE_NORMAL] * getNumVerts() - 1, (U8*) data);
+ flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_NORMAL], mOffsets[TYPE_NORMAL] + sTypeSize[TYPE_NORMAL] * getNumVerts() - 1, (U8*) data, sMappingMode);
}
void LLVertexBuffer::setTangentData(const LLVector4a* data)
{
llassert(sGLRenderBuffer == mGLBuffer);
- flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_TANGENT], mOffsets[TYPE_TANGENT] + sTypeSize[TYPE_TANGENT] * getNumVerts() - 1, (U8*) data);
+ flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_TANGENT], mOffsets[TYPE_TANGENT] + sTypeSize[TYPE_TANGENT] * getNumVerts() - 1, (U8*) data, sMappingMode);
}
void LLVertexBuffer::setWeight4Data(const LLVector4a* data)
{
llassert(sGLRenderBuffer == mGLBuffer);
- flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_WEIGHT4], mOffsets[TYPE_WEIGHT4] + sTypeSize[TYPE_WEIGHT4] * getNumVerts() - 1, (U8*) data);
+ flush_vbo(GL_ARRAY_BUFFER, mOffsets[TYPE_WEIGHT4], mOffsets[TYPE_WEIGHT4] + sTypeSize[TYPE_WEIGHT4] * getNumVerts() - 1, (U8*) data, sMappingMode);
}
void LLVertexBuffer::setIndexData(const U16* data)
{
llassert(sGLRenderIndices == mGLIndices);
- flush_vbo(GL_ELEMENT_ARRAY_BUFFER, 0, sizeof(U16) * getNumIndices() - 1, (U8*) data);
+ flush_vbo(GL_ELEMENT_ARRAY_BUFFER, 0, sizeof(U16) * getNumIndices() - 1, (U8*) data, sMappingMode);
}
void LLVertexBuffer::setIndexData(const U32* data)
@@ -1610,6 +1581,7 @@ void LLVertexBuffer::setIndexData(const U32* data)
mIndicesStride = 4;
mNumIndices /= 2;
}
- flush_vbo(GL_ELEMENT_ARRAY_BUFFER, 0, sizeof(U32) * getNumIndices() - 1, (U8*)data);
+
+ flush_vbo(GL_ELEMENT_ARRAY_BUFFER, 0, sizeof(U32) * getNumIndices() - 1, (U8*) data, sMappingMode);
}
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index b634609929..184b0a4ac9 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -161,7 +161,7 @@ public:
// set for rendering
// assumes (and will assert on) the following:
- // - this buffer has no pending unampBuffer call
+ // - this buffer has no pending unmapBuffer call
// - a shader is currently bound
// - This buffer has sufficient attributes within it to satisfy the needs of the currently bound shader
void setBuffer();
@@ -267,6 +267,8 @@ public:
static U32 sGLRenderIndices;
static U32 sLastMask;
static U32 sVertexCount;
+
+ static U32 sMappingMode;
};
#ifdef LL_PROFILER_ENABLE_RENDER_DOC
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 35e2e54217..c3dd2eb17a 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -223,7 +223,7 @@ void LLUI::getMousePositionScreen(S32 *x, S32 *y)
LLCoordGL cursor_pos_gl(cursor_pos_window.convert());
*x = ll_round((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]);
*y = ll_round((F32)cursor_pos_gl.mY / getScaleFactor().mV[VY]);
-#if defined(LL_DARWIN)
+#if defined(LL_SDL)
*x = *x * LLView::getWindow()->getSystemUISize();
*y = *y * LLView::getWindow()->getSystemUISize();
#endif
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index aff9334cb6..5bb538f892 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -34,6 +34,8 @@
#include "llinstancetracker.h"
#include "llsd.h"
+#include "../llrender/llglheaders.h"
+
class LLSplashScreen;
class LLPreeditor;
class LLWindowCallbacks;
@@ -243,6 +245,8 @@ 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 453905b19b..1b8ab27f23 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -38,6 +38,8 @@
#include "lldir.h"
#include "indra_constants.h"
+#include "../newview/llviewercontrol.h"
+
#include <OpenGL/OpenGL.h>
#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
@@ -50,6 +52,8 @@
#include <IOKit/hid/IOHIDLib.h>
#include <IOKit/usb/IOUSBLib.h>
+
+
extern BOOL gDebugWindowProc;
BOOL gHiDPISupport = TRUE;
@@ -1009,6 +1013,19 @@ 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 98484419f9..531c70e8d9 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -40,6 +40,10 @@
#include "lldir.h"
#include "llfindlocale.h"
+#include "../newview/llviewercontrol.h"
+
+extern LLControlGroup gSavedSettings;
+
#if LL_GTK
extern "C" {
# include "gtk/gtk.h"
@@ -1098,6 +1102,18 @@ 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/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 5fb0158aa3..b739017a9b 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -85,6 +85,27 @@ if (DARWIN)
add_custom_command(TARGET media_plugin_cef
POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "@executable_path/Chromium Embedded Framework"
"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
+ -change "/opt/local/lib/libopenjp2.7.dylib" "@loader_path/../../Frameworks/libopenjp2.7.dylib"
+ -change "/opt/local/lib/libpng16.16.dylib" "@loader_path/../../Frameworks/libpng16.16.dylib"
+ -change "/opt/local/lib/libjpeg.8.dylib" "@loader_path/../../Frameworks/libjpeg.8.dylib"
+ -change "/opt/local/lib/libfreetype.6.dylib" "@loader_path/../../Frameworks/libfreetype.6.dylib"
+ -change "@rpath/libmeshoptimizer.dylib" "@loader_path/../../Frameworks/libmeshoptimizer.dylib"
+ -change "/opt/local/lib/libaprutil-1.0.dylib" "@loader_path/../../Frameworks/libaprutil-1.0.dylib"
+ -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib"
+ -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib"
+ -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib"
+ -change "/opt/local/lib/libjsoncpp.25.dylib" "@loader_path/../../Frameworks/libjsoncpp.25.dylib"
+ -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib"
+ -change "/opt/local/lib/liburiparser.1.dylib" "@loader_path/../../Frameworks/liburiparser.1.dylib"
+ -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib"
+ -change "/usr/local/lib/libxmlrpc-epi.0.dylib" "@loader_path/../../Frameworks/libxmlrpc-epi.0.dylib"
"$<TARGET_FILE:media_plugin_cef>"
VERBATIM
COMMENT "Fixing path to CEF Framework"
@@ -94,7 +115,7 @@ endif (DARWIN)
if (INSTALL)
if (DARWIN)
- set(_LIB ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/llplugin)
+ set(_LIB Resources/llplugin)
elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
set(_LIB lib/${ARCH}-linux-gnu)
elseif (EXISTS /lib64)
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 2c70db1141..795920ebfc 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -54,11 +54,41 @@ if (DARWIN)
LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
+ add_custom_command(TARGET ${PROJECT_NAME}
+ POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL}
+ -change "/opt/local/lib/libopenjp2.7.dylib" "@loader_path/../../Frameworks/libopenjp2.7.dylib"
+ -change "/opt/local/lib/libpng16.16.dylib" "@loader_path/../../Frameworks/libpng16.16.dylib"
+ -change "/opt/local/lib/libjpeg.8.dylib" "@loader_path/../../Frameworks/libjpeg.8.dylib"
+ -change "/opt/local/lib/libfreetype.6.dylib" "@loader_path/../../Frameworks/libfreetype.6.dylib"
+ -change "@rpath/libmeshoptimizer.dylib" "@loader_path/../../Frameworks/libmeshoptimizer.dylib"
+ -change "/opt/local/lib/libaprutil-1.0.dylib" "@loader_path/../../Frameworks/libaprutil-1.0.dylib"
+ -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib"
+ -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib"
+ -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib"
+ -change "/opt/local/lib/libjsoncpp.25.dylib" "@loader_path/../../Frameworks/libjsoncpp.25.dylib"
+ -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib"
+ -change "/opt/local/libexec/boost/1.76/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib"
+ -change "/opt/local/lib/liburiparser.1.dylib" "@loader_path/../../Frameworks/liburiparser.1.dylib"
+ -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib"
+ -change "/usr/local/lib/libxmlrpc-epi.0.dylib" "@loader_path/../../Frameworks/libxmlrpc-epi.0.dylib"
+ -change "@rpath/libvlc.dylib" "@loader_path/../../Frameworks/libvlc.dylib"
+ -change "@rpath/libvlccore.dylib" "@loader_path/../../Frameworks/libvlccore.dylib"
+ "$<TARGET_FILE:media_plugin_libvlc>"
+ VERBATIM
+ COMMENT "Fixing paths to LibVLC media plugin dependencies"
+ )
+
endif (DARWIN)
if (INSTALL)
if (DARWIN)
- set(_LIB ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/llplugin)
+ set(_LIB Resources/llplugin)
elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
set(_LIB lib/${ARCH}-linux-gnu)
elseif (EXISTS /lib64)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 26d60bc947..a0031b0b1a 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -250,6 +250,7 @@ set(viewer_SOURCE_FILES
llfloaterhandler.cpp
llfloaterhelpbrowser.cpp
llfloaterhoverheight.cpp
+ mpvfloatertuning.cpp
llfloaterhowto.cpp
llfloaterhud.cpp
llfloaterimagepreview.cpp
@@ -913,6 +914,7 @@ set(viewer_HEADER_FILES
llfloaterhandler.h
llfloaterhelpbrowser.h
llfloaterhoverheight.h
+ mpvfloatertuning.h
llfloaterhowto.h
llfloaterhud.h
llfloaterimagepreview.h
@@ -2201,11 +2203,7 @@ if (DARWIN)
endif (NOT INSTALL)
if (ENABLE_MEDIA_PLUGINS)
- if (DARWIN OR LINUX)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
- else (DARWIN)
- add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc)
- endif (DARWIN OR LINUX)
else (ENABLE_MEDIA_PLUGINS)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin)
endif (ENABLE_MEDIA_PLUGINS)
diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in
index 73806642e4..b2957cd9b5 100644
--- a/indra/newview/FixBundle.cmake.in
+++ b/indra/newview/FixBundle.cmake.in
@@ -5,3 +5,157 @@ set(dirs
)
fixup_bundle(${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app "" "${dirs}")
+
+file(CREATE_LINK
+ "../../../../Frameworks/libnghttp2.14.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libnghttp2.14.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libxmlrpc-epi.0.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libxmlrpc-epi.0.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libopenjp2.7.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libopenjp2.7.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libpng16.16.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libpng16.16.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libjpeg.8.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjpeg.8.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libmeshoptimizer.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libmeshoptimizer.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libaprutil-1.0.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libaprutil-1.0.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libiconv.2.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libiconv.2.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libapr-1.0.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libapr-1.0.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libjsoncpp.25.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjsoncpp.25.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libz.1.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libz.1.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libboost_context-mt.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_context-mt.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libboost_fiber-mt.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_fiber-mt.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libboost_filesystem-mt.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_filesystem-mt.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libboost_program_options-mt.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_program_options-mt.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libboost_regex-mt.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_regex-mt.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libboost_system-mt.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_system-mt.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libboost_thread-mt.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_thread-mt.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/liburiparser.1.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/liburiparser.1.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libexpat.1.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libexpat.1.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libfreetype.6.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libfreetype.6.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libicudata.74.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.74.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libicui18n.74.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.74.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libicuuc.74.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.74.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libbz2.1.0.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbz2.1.0.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libbrotlidec.1.1.0.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlidec.1.1.0.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libbrotlidec.1.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlidec.1.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/libbrotlicommon.1.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlicommon.1.dylib"
+ SYMBOLIC
+ )
+file(CREATE_LINK
+ "../../../../Frameworks/Chromium Embedded Framework.framework"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework"
+ SYMBOLIC
+ )
+
+file(CHMOD
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper (Plugin)"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)"
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ )
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index cc8edfadb8..82f63519db 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake
index 7d9f160467..b6e670d09b 100644
--- a/indra/newview/ViewerInstall.cmake
+++ b/indra/newview/ViewerInstall.cmake
@@ -22,7 +22,7 @@ if (DARWIN)
skins
tr.lproj
zh-Hans.lproj
- DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources
+ DESTINATION Resources
)
install(FILES
@@ -31,21 +31,41 @@ if (DARWIN)
cube.dae
featuretable_mac.txt
secondlife.icns
- DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources
+ DESTINATION Resources
)
install(FILES
licenses-mac.txt
RENAME licenses.txt
- DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources
+ DESTINATION Resources
)
install(FILES
${SCRIPTS_DIR}/messages/message_template.msg
${SCRIPTS_DIR}/../etc/message.xml
- DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/app_settings
+ DESTINATION Resources/app_settings
)
+ install(DIRECTORY
+ "${AUTOBUILD_INSTALL_DIR}/lib/release/Chromium Embedded Framework.framework"
+ DESTINATION Frameworks
+ )
+
+ install(DIRECTORY
+ "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper.app"
+ "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (GPU).app"
+ "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (Plugin).app"
+ "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (Renderer).app"
+ DESTINATION Resources/SLPlugin.app/Contents/Frameworks
+ )
+
+ if (NDOF)
+ install(FILES
+ "${AUTOBUILD_INSTALL_DIR}/lib/release/libndofdev.dylib"
+ DESTINATION Resources
+ )
+ endif ()
+
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/FixBundle.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 7981a2d270..0888eb8acd 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13518,6 +13518,17 @@
<key>Value</key>
<real>0</real>
</map>
+ <key>MaxFPS</key>
+ <map>
+ <key>Comment</key>
+ <string>FPS Limiter.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <real>0</real>
+ </map>
<key>ZoomDirect</key>
<map>
<key>Comment</key>
@@ -13777,6 +13788,23 @@
<real>12</real>
</map>
+
+ <!-- megapahit settings -->
+ <key>MPVBufferOptiMode</key>
+ <map>
+ <key>Comment</key>
+ <string>
+ OpenGL buffer mapping mode:
+ 0:auto, 1:normal, 2:optimised, 3:unsynchronized.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+
+
<!-- Settings below are for back compatibility only.
They are not used in current viewer anymore. But they can't be removed to avoid
influence on previous versions of the viewer in case of settings are not used or default value
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 1b1a47aa0d..91b06945cc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -256,6 +256,8 @@ using namespace LL;
#include "llcoproceduremanager.h"
#include "llviewereventrecorder.h"
+#include <chrono>
+
// *FIX: These extern globals should be cleaned up.
// The globals either represent state/config/resource-storage of either
// this app, or another 'component' of the viewer. App globals should be
@@ -1374,9 +1376,10 @@ bool LLAppViewer::doFrame()
{
static LLCachedControl<U32> fpsLimitMaxFps(gSavedSettings, "MaxFPS", 0);
+ using TimePoint = std::chrono::steady_clock::time_point;
+
U64 fpsLimitSleepFor = 0;
- U64 fpsLimitFrameStartTime = 0;
- if(fpsLimitMaxFps > 0) fpsLimitFrameStartTime = LLTrace::BlockTimer::getCPUClockCount64();
+ TimePoint fpsLimitFrameStartTime = std::chrono::steady_clock::now();
LL_RECORD_BLOCK_TIME(FTM_FRAME);
{
@@ -1550,12 +1553,13 @@ bool LLAppViewer::doFrame()
if(fpsLimitMaxFps > 0)
{
- U64 fpsLimitFrameTime = LLTrace::BlockTimer::getCPUClockCount64() - fpsLimitFrameStartTime;
- U64 desired_time_ns = (U32)(1000000.f / fpsLimitMaxFps);
+ auto elapsed = std::chrono::steady_clock::now() - fpsLimitFrameStartTime;
- if((fpsLimitFrameTime+1000) < desired_time_ns)
+ long long fpsLimitFrameTime = std::chrono::duration_cast<std::chrono::microseconds>(elapsed).count();
+ U64 desired_time_us = (U32)(1000000.f / fpsLimitMaxFps);
+ if((fpsLimitFrameTime+1000) < desired_time_us)
{
- fpsLimitSleepFor = (desired_time_ns - fpsLimitFrameTime - 1000) * 1.0;
+ fpsLimitSleepFor = (desired_time_us - fpsLimitFrameTime - 1000) * 1.0;
}
}
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index a0a625c5fc..eecf9c60b6 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -166,7 +166,9 @@ BOOL LLStatusBar::postBuild()
gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3));
mTextTime = getChild<LLTextBox>("TimeText" );
- mTextFps = getChild<LLTextBox>("FpsText");
+
+ mTextFps = getChild<LLButton>("FpsText");
+ mTextFps->setClickedCallback( &LLStatusBar::onClickFps, this );
getChild<LLUICtrl>("buyL")->setCommitCallback(
boost::bind(&LLStatusBar::onClickBuyCurrency, this));
@@ -306,7 +308,8 @@ void LLStatusBar::refresh()
S32 fps = (S32) llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, 50));
std::string fpsStr = std::to_string(fps);
- mTextFps->setText(fpsStr);
+ //mTextFps->setText(fpsStr);
+ mTextFps->setLabel(fpsStr);
}
// update clock every 10 seconds
@@ -649,6 +652,12 @@ void LLStatusBar::onClickMediaToggle(void* data)
LLViewerMedia::getInstance()->setAllMediaPaused(pause);
}
+//static
+void LLStatusBar::onClickFps(void* data)
+{
+ LLFloaterReg::toggleInstance("mpv_performance");
+}
+
BOOL can_afford_transaction(S32 cost)
{
return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost)));
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index da3c4a71f1..650d7d6c40 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -109,6 +109,8 @@ private:
static void onClickMediaToggle(void* data);
static void onClickBalance(void* data);
+ static void onClickFps(void* data);
+
LLSearchEditor *mFilterEdit;
LLPanel *mSearchPanel;
void onUpdateFilterTerm();
@@ -121,7 +123,7 @@ private:
private:
LLTextBox *mTextTime;
- LLTextBox *mTextFps;
+ LLButton *mTextFps;
LLStatGraph *mSGBandwidth;
LLStatGraph *mSGPacketLoss;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index ceda2675d5..9ec5f4f122 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -81,6 +81,7 @@
#include "llfloatergroups.h"
#include "llfloaterhelpbrowser.h"
#include "llfloaterhoverheight.h"
+#include "mpvfloatertuning.h"
#include "llfloaterhowto.h"
#include "llfloaterhud.h"
#include "llfloaterimagepreview.h"
@@ -380,6 +381,9 @@ 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("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMSession>);
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMContainer>);
LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>);
diff --git a/indra/newview/mpvfloatertuning.cpp b/indra/newview/mpvfloatertuning.cpp
new file mode 100644
index 0000000000..177bd3caa7
--- /dev/null
+++ b/indra/newview/mpvfloatertuning.cpp
@@ -0,0 +1,90 @@
+/**
+* @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<MPVFloaterTuning*>(user_data);
+
+ U32 fps = gSavedSettings.getU32("MaxFPS");
+ LLSliderCtrl* fpsSliderCtrl = self->getChild<LLSliderCtrl>("fpsSlider");
+ fpsSliderCtrl->setValue(fps,FALSE);
+
+ U32 optBuf = gSavedSettings.getU32("MPVBufferOptiMode");
+ LLComboBox * optBufCtrl = self->getChild<LLComboBox>("MPVBuffModeComboBox");
+ optBufCtrl->setCurrentByIndex(optBuf);
+
+ LL_INFOS() << "syncFromPreferenceSetting optBuf=" << optBuf << LL_ENDL;
+}
+
+BOOL MPVFloaterTuning::postBuild()
+{
+ LLSliderCtrl* fpsSliderCtrl = getChild<LLSliderCtrl>("fpsSlider");
+ fpsSliderCtrl->setMinValue(0);
+ fpsSliderCtrl->setMaxValue(165);
+ fpsSliderCtrl->setSliderMouseUpCallback(boost::bind(&MPVFloaterTuning::onFinalCommit,this));
+
+ LLComboBox* optBufCtrl = getChild<LLComboBox>("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<LLSliderCtrl>("fpsSlider");
+ U32 fps = (U32)fpsSliderCtrl->getValueF32();
+ gSavedSettings.setU32("MaxFPS",fps);
+
+ LLComboBox* optBufCtrl = getChild<LLComboBox>("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
new file mode 100644
index 0000000000..ed91317eab
--- /dev/null
+++ b/indra/newview/mpvfloatertuning.h
@@ -0,0 +1,48 @@
+/**
+* @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_mpv_performance.xml b/indra/newview/skins/default/xui/en/floater_mpv_performance.xml
new file mode 100644
index 0000000000..5c54d366f2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_mpv_performance.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater
+ positioning="cascading"
+ legacy_header_height="40"
+ top="12"
+ right="2"
+ height="120"
+ min_height="120"
+ width="320"
+ min_width="320"
+ can_minimize="true"
+ can_close="true"
+ can_resize="false"
+ layout="topright"
+ name="mpv_performance"
+ single_instance="true"
+ save_rect="true"
+ save_visibility="true"
+ title="Megapahit Tuning">
+
+ <panel
+ name="panel_fps"
+ border="false"
+ width="300"
+ height="36"
+ left="10"
+ top="40"
+ follows="top|left"
+ layout="topleft"
+ >
+
+ <slider
+ name="fpsSlider"
+ width="300"
+ height="15"
+ layout="topleft"
+ enabled="true"
+ control_name="fpsSlider"
+ decimal_digits="0"
+ increment="5"
+ initial_value="0"
+ label="Max FPS"
+ label_width="50"
+ text_width="30"
+ can_edit_text="false"
+ show_text="true"
+ >
+ </slider>
+
+ </panel>
+
+ <panel
+ name="panel_mapping"
+ border="false"
+ width="300"
+ height="36"
+ left="10"
+ top="78"
+ follows="top|left"
+ layout="topleft"
+ >
+
+ <text
+ name="MPVBuffModeLabel"
+ width="100"
+ height="15"
+ left="2"
+ top="8">
+ Buffer mapping:
+ </text>
+
+ <combo_box
+ control_name="MPVBuffModeControl"
+ name="MPVBuffModeComboBox"
+ width="150"
+ height="23"
+ left="120"
+ top="4"
+ >
+ <combo_box.item
+ enabled="true"
+ label="Auto"
+ name="Auto"
+ value="0" />
+ <combo_box.item
+ enabled="true"
+ label="Normal"
+ name="Normal"
+ value="1" />
+ <combo_box.item
+ enabled="true"
+ label="Optimized (Apple GPU)"
+ name="Optimized"
+ value="2" />
+ <combo_box.item
+ enabled="true"
+ label="Optimized+ (AMD GPU)"
+ name="Optimized+"
+ value="3" />
+ </combo_box>
+
+ </panel>
+
+</floater>
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 dbc181855f..f337ad9038 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -55,11 +55,11 @@
text_pad_left="6"
tool_tip="Type the search term you are interested in here. Results will be displayed for partial fulltext matches within the menu."
top="0">
- <search_button
+ <search_button
top_pad="4"
- left_pad="4"
+ left_pad="4"
width="12"
- height="12"
+ height="12"
image_unselected="Search"
image_selected="Search"/>
<clear_button
@@ -77,20 +77,20 @@
left="-398"
width="185"
top="1"
- follows="right|top"
+ follows="right|top"
name="balance_bg">
<text
halign="center"
font="SansSerifSmall"
follows="all"
height="18"
- left="0"
+ left="0"
name="balance"
tool_tip="Click to refresh your L$ balance"
v_pad="4"
top="0"
- wrap="false"
- value="L$??"
+ wrap="false"
+ value="L$??"
width="40" />
<button
halign="center"
@@ -185,7 +185,7 @@
top="2"
name="volume_btn"
width="16" />
- <text
+ <button
type="string"
font="SansSerif"
text_color="FpsTextColor"
@@ -195,10 +195,10 @@
height="18"
top="1"
v_pad="0"
- left_pad="0"
+ left_pad="4"
name="FpsText"
tool_tip="fps"
- width="40">
+ width="32">
60
</text>
</panel>