diff options
Diffstat (limited to 'indra/newview')
77 files changed, 1677 insertions, 800 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b45153013d..0a267cbad0 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -30,7 +30,6 @@ include(LLUI) include(LLVFS) include(LLWindow) include(LLXML) -include(LLXUIXML) include(LScript) include(Linking) include(NDOF) @@ -66,7 +65,6 @@ include_directories( ${LLVFS_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} - ${LLXUIXML_INCLUDE_DIRS} ${LSCRIPT_INCLUDE_DIRS} ${LSCRIPT_INCLUDE_DIRS}/lscript_compile ${LLLOGIN_INCLUDE_DIRS} @@ -237,7 +235,7 @@ set(viewer_SOURCE_FILES llfloatertelehub.cpp llfloatertestinspectors.cpp llfloatertestlistview.cpp - llfloatertexturefetchdebugger.cpp + llfloatertexturefetchdebugger.cpp llfloatertools.cpp llfloatertopobjects.cpp llfloatertos.cpp @@ -491,6 +489,7 @@ set(viewer_SOURCE_FILES lltoastnotifypanel.cpp lltoastpanel.cpp lltoastscripttextbox.cpp + lltoastscriptquestion.cpp lltool.cpp lltoolbarview.cpp lltoolbrush.cpp @@ -794,7 +793,7 @@ set(viewer_HEADER_FILES llfloatertelehub.h llfloatertestinspectors.h llfloatertestlistview.h - llfloatertexturefetchdebugger.h + llfloatertexturefetchdebugger.h llfloatertools.h llfloatertopobjects.h llfloatertos.h @@ -1039,6 +1038,7 @@ set(viewer_HEADER_FILES lltoastnotifypanel.h lltoastpanel.h lltoastscripttextbox.h + lltoastscriptquestion.h lltool.h lltoolbarview.h lltoolbrush.h @@ -1748,7 +1748,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLVFS_LIBRARIES} ${LLWINDOW_LIBRARIES} ${LLXML_LIBRARIES} - ${LLXUIXML_LIBRARIES} ${LSCRIPT_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 15434f2b8f..be79f91919 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -1,45 +1,101 @@ <?xml version="1.0"?> <llsd> <map> - <key>help</key> + <!-- Please insert new keys in alphabetical order. --> + <key>analyzeperformance</key> <map> <key>desc</key> - <string>display this help message</string> + <string>When used in conjunction with logperformance, analyzes result of log against baseline.</string> + <key>map-to</key> + <string>AnalyzePerformance</string> + </map> - <key>short</key> - <string>h</string> + <key>autologin</key> + <map> + <key>desc</key> + <string>log in as last saved user</string> + <key>map-to</key> + <string>AutoLogin</string> </map> - <key>port</key> + <key>channel</key> <map> <key>count</key> <integer>1</integer> - <key>map-to</key> - <string>UserConnectionPort</string> + <!-- Special case. Not mapped to a setting. --> </map> - <key>drop</key> + <key>console</key> <map> <key>count</key> <integer>1</integer> <key>map-to</key> - <string>PacketDropPercentage</string> + <string>ShowConsoleWindow</string> </map> - <key>inbw</key> + <key>cooperative</key> <map> + <key>desc</key> + <string>Yield some idle time to local host.</string> <key>count</key> <integer>1</integer> <key>map-to</key> - <string>InBandwidth</string> + <string>YieldTime</string> </map> - <key>outbw</key> + <key>crashonstartup</key> + <map> + <key>desc</key> + <string>Crashes on startup. For QA use.</string> + <key>map-to</key> + <string>CrashOnStartup</string> + </map> + + <key>debugsession</key> + <map> + <key>desc</key> + <string>Run as if RenderDebugGL is TRUE, but log errors until end of session.</string> + <key>map-to</key> + <string>DebugSession</string> + </map> + + <key>debugviews</key> + <map> + <key>map-to</key> + <string>DebugViews</string> + </map> + + <key>disablecrashlogger</key> + <map> + <key>desc</key> + <string>Disables the crash logger and lets the OS handle crashes</string> + <key>map-to</key> + <string>DisableCrashLogger</string> + </map> + + <key>drop</key> <map> <key>count</key> <integer>1</integer> <key>map-to</key> - <string>OutBandwidth</string> + <string>PacketDropPercentage</string> + </map> + + <key>god</key> + <map> + <key>desc</key> + <string>Log in a god if you have god access.</string> + <key>map-to</key> + <string>ConnectAsGod</string> + </map> + + <key>graphicslevel</key> + <map> + <key>desc</key> + <string>Set the detail level. +0 - low, 1 - medium, 2 - high, 3 - ultra</string> + <key>count</key> + <integer>1</integer> </map> <key>grid</key> @@ -52,16 +108,13 @@ <string>CmdLineGridChoice</string> </map> - <key>loginuri</key> + <key>help</key> <map> <key>desc</key> - <string>login server and CGI script to use</string> - <key>count</key> - <integer>1</integer> - <key>compose</key> - <boolean>true</boolean> - <key>map-to</key> - <string>CmdLineLoginURI</string> + <string>display this help message</string> + + <key>short</key> + <string>h</string> </map> <key>helperuri</key> @@ -74,44 +127,73 @@ <string>CmdLineHelperURI</string> </map> - <key>debugviews</key> + <key>ignorepixeldepth</key> <map> + <key>desc</key> + <string>Ignore pixel depth settings.</string> <key>map-to</key> - <string>DebugViews</string> + <string>IgnorePixelDepth</string> </map> - <key>skin</key> + <key>inbw</key> + <map> + <key>count</key> + <integer>1</integer> + <key>map-to</key> + <string>InBandwidth</string> + </map> + + <key>leap</key> <map> <key>desc</key> - <string>ui/branding skin folder to use</string> + <string>command line to run an LLSD Event API Plugin</string> <key>count</key> <integer>1</integer> + <!-- you can specify multiple such plugins --> + <key>compose</key> + <boolean>true</boolean> <key>map-to</key> - <string>SkinFolder</string> + <string>LeapCommand</string> </map> - <key>autologin</key> + <key>logfile</key> + <map> + <key>count</key> + <integer>1</integer> + <key>map-to</key> + <string>UserLogFile</string> + </map> + + <key>login</key> <map> <key>desc</key> - <string>log in as last saved user</string> + <string>3 tokens: first, last and password</string> + <key>count</key> + <integer>3</integer> <key>map-to</key> - <string>AutoLogin</string> + <string>UserLoginInfo</string> </map> - <key>quitafter</key> + <key>loginpage</key> <map> + <key>desc</key> + <string>Login authentication page to use.</string> <key>count</key> <integer>1</integer> <key>map-to</key> - <string>QuitAfterSeconds</string> + <string>LoginPage</string> </map> - <key>logperformance</key> + <key>loginuri</key> <map> <key>desc</key> - <string>Log performance metrics for benchmarking</string> + <string>login server and CGI script to use</string> + <key>count</key> + <integer>1</integer> + <key>compose</key> + <boolean>true</boolean> <key>map-to</key> - <string>LogPerformance</string> + <string>CmdLineLoginURI</string> </map> <key>logmetrics</key> @@ -123,29 +205,35 @@ <key>map-to</key> <string>LogMetrics</string> </map> - - <key>analyzeperformance</key> + + <key>logperformance</key> <map> <key>desc</key> - <string>When used in conjunction with logperformance, analyzes result of log against baseline.</string> + <string>Log performance metrics for benchmarking</string> <key>map-to</key> - <string>AnalyzePerformance</string> + <string>LogPerformance</string> </map> - <key>debugsession</key> + <key>multiple</key> <map> <key>desc</key> - <string>Run as if RenderDebugGL is TRUE, but log errors until end of session.</string> + <string>Allow multiple viewers.</string> <key>map-to</key> - <string>DebugSession</string> + <string>AllowMultipleViewers</string> </map> - <key>replaysession</key> + <key>noaudio</key> + <map> + <key>map-to</key> + <string>NoAudio</string> + </map> + + <key>noinvlib</key> <map> <key>desc</key> - <string>After login, replay last recorded session and quit.</string> + <string>Do not request the inventory library.</string> <key>map-to</key> - <string>ReplaySession</string> + <string>NoInventoryLibrary</string> </map> <key>nonotifications</key> @@ -156,22 +244,10 @@ <string>IgnoreAllNotifications</string> </map> - <key>rotate</key> - <map> - <key>map-to</key> - <string>RotateRight</string> - </map> - - <key>noaudio</key> - <map> - <key>map-to</key> - <string>NoAudio</string> - </map> - - <key>nosound</key> + <key>nopreload</key> <map> <key>map-to</key> - <string>NoAudio</string> + <string>NoPreload</string> </map> <key>noprobe</key> @@ -186,151 +262,134 @@ <string>NoQuickTime</string> </map> - <key>nopreload</key> + <key>nosound</key> <map> <key>map-to</key> - <string>NoPreload</string> + <string>NoAudio</string> </map> - <key>purge</key> + <key>no-verify-ssl-cert</key> <map> - <key>desc</key> - <string>Delete files in the cache.</string> <key>map-to</key> - <string>PurgeCacheOnNextStartup</string> + <string>NoVerifySSLCert</string> </map> - <key>noinvlib</key> + <key>novoice</key> <map> <key>desc</key> - <string>Do not request the inventory library.</string> + <string>Disable voice.</string> <key>map-to</key> - <string>NoInventoryLibrary</string> + <string>CmdLineDisableVoice</string> </map> - <key>logfile</key> + <key>outbw</key> <map> <key>count</key> <integer>1</integer> <key>map-to</key> - <string>UserLogFile</string> + <string>OutBandwidth</string> </map> - <key>graphicslevel</key> + <key>port</key> <map> - <key>desc</key> - <string>Set the detail level. -0 - low, 1 - medium, 2 - high, 3 - ultra</string> <key>count</key> <integer>1</integer> + <key>map-to</key> + <string>UserConnectionPort</string> </map> - <key>setdefault</key> + <key>purge</key> <map> <key>desc</key> - <string>specify the value of a particular configuration variable which can be overridden by settings.xml.</string> - <key>count</key> - <integer>2</integer> - <!-- Special case. Mapped to settings procedurally. --> + <string>Delete files in the cache.</string> + <key>map-to</key> + <string>PurgeCacheOnNextStartup</string> </map> - <key>set</key> + <key>qa</key> <map> <key>desc</key> - <string>specify the value of a particular configuration variable that overrides all other settings.</string> - <key>count</key> - <integer>2</integer> - <key>compose</key> - <boolean>true</boolean> - <!-- Special case. Mapped to settings procedurally. --> + <string>Activated debugging menu in Advanced Settings.</string> + <key>map-to</key> + <string>QAMode</string> </map> - <key>settings</key> + <key>quitafter</key> <map> - <key>desc</key> - <string>Specify the filename of a configuration file.</string> <key>count</key> <integer>1</integer> - <!-- Special case. Mapped to settings procedurally. --> + <key>map-to</key> + <string>QuitAfterSeconds</string> </map> - - <key>sessionsettings</key> + + <key>replaysession</key> <map> <key>desc</key> - <string>Specify the filename of a configuration file that contains temporary per-session configuration overrides.</string> - <key>count</key> - <integer>1</integer> - <!-- Special case. Mapped to settings procedurally. --> + <string>After login, replay last recorded session and quit.</string> + <key>map-to</key> + <string>ReplaySession</string> </map> - <key>usersessionsettings</key> - <map> - <key>desc</key> - <string>Specify the filename of a configuration file that contains temporary per-session configuration user overrides.</string> - <key>count</key> - <integer>1</integer> - <!-- Special case. Mapped to settings procedurally. --> - </map> - - <key>login</key> + <key>rotate</key> <map> - <key>desc</key> - <string>3 tokens: first, last and password</string> - <key>count</key> - <integer>3</integer> <key>map-to</key> - <string>UserLoginInfo</string> + <string>RotateRight</string> </map> - <key>god</key> + <key>safe</key> <map> <key>desc</key> - <string>Log in a god if you have god access.</string> + <string>Reset preferences, run in safe mode.</string> <key>map-to</key> - <string>ConnectAsGod</string> + <string>SafeMode</string> </map> - <key>console</key> + <key>sessionsettings</key> <map> + <key>desc</key> + <string>Specify the filename of a configuration file that contains temporary per-session configuration overrides.</string> <key>count</key> <integer>1</integer> - <key>map-to</key> - <string>ShowConsoleWindow</string> + <!-- Special case. Mapped to settings procedurally. --> </map> - <key>safe</key> + <key>set</key> <map> <key>desc</key> - <string>Reset preferences, run in safe mode.</string> - <key>map-to</key> - <string>SafeMode</string> + <string>specify the value of a particular configuration variable that overrides all other settings.</string> + <key>count</key> + <integer>2</integer> + <key>compose</key> + <boolean>true</boolean> + <!-- Special case. Mapped to settings procedurally. --> </map> - <key>multiple</key> + <key>setdefault</key> <map> <key>desc</key> - <string>Allow multiple viewers.</string> - <key>map-to</key> - <string>AllowMultipleViewers</string> + <string>specify the value of a particular configuration variable which can be overridden by settings.xml.</string> + <key>count</key> + <integer>2</integer> + <!-- Special case. Mapped to settings procedurally. --> </map> - <key>novoice</key> + <key>settings</key> <map> <key>desc</key> - <string>Disable voice.</string> - <key>map-to</key> - <string>CmdLineDisableVoice</string> + <string>Specify the filename of a configuration file.</string> + <key>count</key> + <integer>1</integer> + <!-- Special case. Mapped to settings procedurally. --> </map> - <key>url</key> + <key>skin</key> <map> <key>desc</key> - <string>Startup location</string> + <string>ui/branding skin folder to use</string> <key>count</key> <integer>1</integer> - <key>last_option</key> - <boolean>true</boolean> - <!-- Special case. Not mapped to a setting. --> + <key>map-to</key> + <string>SkinFolder</string> </map> <key>slurl</key> @@ -346,69 +405,24 @@ <!-- Special case. Not mapped to a setting. --> </map> - <key>ignorepixeldepth</key> - <map> - <key>desc</key> - <string>Ignore pixel depth settings.</string> - <key>map-to</key> - <string>IgnorePixelDepth</string> - </map> - - <key>cooperative</key> + <key>url</key> <map> <key>desc</key> - <string>Yield some idle time to local host.</string> - <key>count</key> - <integer>1</integer> - <key>map-to</key> - <string>YieldTime</string> - </map> - - <key>no-verify-ssl-cert</key> - <map> - <key>map-to</key> - <string>NoVerifySSLCert</string> - </map> - - <key>channel</key> - <map> + <string>Startup location</string> <key>count</key> <integer>1</integer> + <key>last_option</key> + <boolean>true</boolean> <!-- Special case. Not mapped to a setting. --> </map> - <key>loginpage</key> + <key>usersessionsettings</key> <map> <key>desc</key> - <string>Login authentication page to use.</string> + <string>Specify the filename of a configuration file that contains temporary per-session configuration user overrides.</string> <key>count</key> <integer>1</integer> - <key>map-to</key> - <string>LoginPage</string> - </map> - - <key>qa</key> - <map> - <key>desc</key> - <string>Activated debugging menu in Advanced Settings.</string> - <key>map-to</key> - <string>QAMode</string> - </map> - - <key>crashonstartup</key> - <map> - <key>desc</key> - <string>Crashes on startup. For QA use.</string> - <key>map-to</key> - <string>CrashOnStartup</string> - </map> - - <key>disablecrashlogger</key> - <map> - <key>desc</key> - <string>Disables the crash logger and lets the OS handle crashes</string> - <key>map-to</key> - <string>DisableCrashLogger</string> + <!-- Special case. Mapped to settings procedurally. --> </map> </map> </llsd> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1911943842..adfe6361db 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4601,6 +4601,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>LeapCommand</key> + <map> + <key>Comment</key> + <string>Zero or more command lines to run LLSD Event API Plugin programs.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>LLSD</string> + <key>Value</key> + <array /> + </map> <key>LSLFindCaseInsensitivity</key> <map> <key>Comment</key> @@ -7164,7 +7175,7 @@ <key>QAModeEventHostPort</key> <map> <key>Comment</key> - <string>Port on which lleventhost should listen</string> + <string>DEPRECATED: Port on which lleventhost should listen</string> <key>Persist</key> <integer>0</integer> <key>Type</key> @@ -7642,6 +7653,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>RenderCompressTextures</key> + <map> + <key>Comment</key> + <string>Enable texture compression on OpenGL 3.0 and later implementations (EXPERIMENTAL, requires restart)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>RenderPerformanceTest</key> <map> <key>Comment</key> @@ -9134,28 +9156,19 @@ <key>Value</key> <integer>0</integer> </map> - <key>RenderUseShaderLOD</key> - <map> - <key>Comment</key> - <string>Whether we want to have different shaders for LOD</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>RenderUseShaderNearParticles</key> - <map> - <key>Comment</key> - <string>Whether we want to use shaders on near particles</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> + + <key>RenderAutoHideSurfaceAreaLimit</key> + <map> + <key>Comment</key> + <string>Maximum surface area of a set of proximal objects inworld before automatically hiding geometry to prevent system overload.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>RenderVBOEnable</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl index cf8cf8364a..bced4a5577 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl @@ -29,11 +29,11 @@ out vec4 frag_color; #define frag_color gl_FragColor #endif -uniform float minimum_alpha; - uniform sampler2D diffuseMap; -VARYING vec4 post_pos; +VARYING float pos_zd2; +VARYING float pos_w; +VARYING float target_pos_x; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; @@ -41,12 +41,20 @@ void main() { float alpha = diffuseLookup(vary_texcoord0.xy).a * vertex_color.a; - if (alpha < minimum_alpha) + if (alpha < 0.05) // treat as totally transparent { discard; } + if (alpha < 0.88) // treat as semi-transparent + { + if (fract(0.5*floor(target_pos_x / pos_w )) < 0.25) + { + discard; + } + } + frag_color = vec4(1,1,1,1); - gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0); + gl_FragDepth = max(pos_zd2/pos_w+0.5, 0.0); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl index 7d3b06c56e..c1f2d90712 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl @@ -25,12 +25,15 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_projection_matrix; +uniform float shadow_target_width; ATTRIBUTE vec3 position; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; -VARYING vec4 post_pos; +VARYING float pos_zd2; +VARYING float pos_w; +VARYING float target_pos_x; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; @@ -39,8 +42,11 @@ void passTextureIndex(); void main() { //transform vertex - vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0); - post_pos = pos; + vec4 pre_pos = vec4(position.xyz, 1.0); + vec4 pos = modelview_projection_matrix * pre_pos; + target_pos_x = 0.5 * (shadow_target_width - 1.0) * pos.x; + pos_w = pos.w; + pos_zd2 = pos.z * 0.5; gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w); diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 08f6ec63fe..8db4cb58cf 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -58,20 +58,22 @@ uniform float shadow_bias; uniform mat4 inv_proj; -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl) +float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) { stc.xyz /= stc.w; stc.z += shadow_bias; + + stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, -scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, -scl, 0.0)).x, cs); - - return shadow/5.0; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; + + return shadow*0.2; } @@ -101,7 +103,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap3, lpos, 0.25)*w; + shadow += pcfShadow(shadowMap3, lpos)*w; weight += w; shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); } @@ -114,7 +116,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap2, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap2, lpos)*w; weight += w; } @@ -126,7 +128,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; - shadow += pcfShadow(shadowMap1, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap1, lpos)*w; weight += w; } @@ -138,7 +140,7 @@ void main() float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; - shadow += pcfShadow(shadowMap0, lpos, 1.0)*w; + shadow += pcfShadow(shadowMap0, lpos)*w; weight += w; } diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl index aae6a070e2..33958a5010 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl @@ -71,20 +71,22 @@ vec4 getPosition(vec2 pos_screen) return pos; } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl) +float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) { stc.xyz /= stc.w; stc.z += shadow_bias; + + stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, -scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, -scl, 0.0)).x, cs); - - return shadow/5.0; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; + + return shadow*0.2; } @@ -114,7 +116,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap3, lpos, 0.25)*w; + shadow += pcfShadow(shadowMap3, lpos)*w; weight += w; shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); } @@ -127,7 +129,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap2, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap2, lpos)*w; weight += w; } @@ -139,7 +141,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; - shadow += pcfShadow(shadowMap1, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap1, lpos)*w; weight += w; } @@ -151,7 +153,7 @@ void main() float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; - shadow += pcfShadow(shadowMap0, lpos, 1.0)*w; + shadow += pcfShadow(shadowMap0, lpos)*w; weight += w; } diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl index 931577359e..ba6f3ace53 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl @@ -70,20 +70,22 @@ vec4 getPosition(vec2 pos_screen) return pos; } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl) +float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc) { stc.xyz /= stc.w; stc.z += shadow_bias; + + stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, -scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, -scl, 0.0)).x, cs); - - return shadow/5.0; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; + + return shadow*0.2; } @@ -113,7 +115,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap3, lpos, 0.25)*w; + shadow += pcfShadow(shadowMap3, lpos)*w; weight += w; shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); } @@ -126,7 +128,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap2, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap2, lpos)*w; weight += w; } @@ -138,7 +140,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; - shadow += pcfShadow(shadowMap1, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap1, lpos)*w; weight += w; } @@ -150,7 +152,7 @@ void main() float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; - shadow += pcfShadow(shadowMap0, lpos, 1.0)*w; + shadow += pcfShadow(shadowMap0, lpos)*w; weight += w; } diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index 8c4ccf9cb3..db3d760359 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -78,42 +78,42 @@ vec4 getPosition(vec2 pos_screen) return pos; } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl) +float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += shadow_bias*scl; - + + stc.x = floor(stc.x + fract(pos_screen.y*0.666666666)); // add some jitter to X sample pos according to Y to disguise the snapping going on here + float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, 1.5, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, -1.5, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, 1.5, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, -1.5, 0.0)).x, cs); + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, -1.5, 0.0)).x; - return shadow/5.0; - - //return shadow; + return shadow*0.2; } -float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; + stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; - vec2 off = 1.5/proj_shadow_res; + vec2 off = 1.0/proj_shadow_res; + off.y *= 1.5; - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs); - - return shadow/5.0; - - //return shadow; + shadow += shadow2D(shadowMap, stc.xyz+vec3(off.x*2.0, off.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-off.x*2.0, -off.y, 0.0)).x; + + return shadow*0.2; } void main() @@ -166,7 +166,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap3, lpos, 0.25)*w; + shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w; weight += w; shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); } @@ -179,7 +179,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap2, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap2, lpos, 0.5, pos_screen)*w; weight += w; } @@ -191,7 +191,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; - shadow += pcfShadow(shadowMap1, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap1, lpos, 0.75, pos_screen)*w; weight += w; } @@ -203,7 +203,7 @@ void main() float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; - shadow += pcfShadow(shadowMap0, lpos, 1.0)*w; + shadow += pcfShadow(shadowMap0, lpos, 1.0, pos_screen)*w; weight += w; } @@ -237,11 +237,11 @@ void main() //spotlight shadow 1 vec4 lpos = shadow_matrix[4]*spos; - frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8); + frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen); //spotlight shadow 2 lpos = shadow_matrix[5]*spos; - frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8); + frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen); //frag_color.rgb = pos.xyz; //frag_color.b = shadow; diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index 02075a7687..dfe108eb01 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -90,7 +90,7 @@ vec2 getKern(int i) kern[5] = vec2(-0.7071, -0.7071) * 0.750*0.750; kern[6] = vec2(-0.7071, 0.7071) * 0.875*0.875; kern[7] = vec2(0.7071, -0.7071) * 1.000*1.000; - + return kern[i]; } @@ -139,42 +139,42 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm) return min(ret, 1.0); } -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl) +float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += shadow_bias*scl; + + stc.x = floor(stc.x + fract(pos_screen.y*0.666666666)); float cs = shadow2DRect(shadowMap, stc.xyz).x; float shadow = cs; - - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, 1.5, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, -1.5, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, 1.5, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, -1.5, 0.0)).x, cs); - - return shadow/5.0; - //return shadow; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x; + shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x; + + return shadow*0.2; } -float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; + stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; - vec2 off = 1.5/proj_shadow_res; + vec2 off = 1.0/proj_shadow_res; + off.y *= 1.5; - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs); - shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs); - - return shadow/5.0; - - //return shadow; + shadow += shadow2D(shadowMap, stc.xyz+vec3(off.x*2.0, off.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-off.x*2.0, -off.y, 0.0)).x; + + return shadow*0.2; } void main() @@ -227,7 +227,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap3, lpos, 0.25)*w; + shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w; weight += w; shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); } @@ -240,7 +240,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap2, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap2, lpos, 0.5, pos_screen)*w; weight += w; } @@ -252,7 +252,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; - shadow += pcfShadow(shadowMap1, lpos, 0.75)*w; + shadow += pcfShadow(shadowMap1, lpos, 0.75, pos_screen)*w; weight += w; } @@ -264,7 +264,7 @@ void main() float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; - shadow += pcfShadow(shadowMap0, lpos, 1.0)*w; + shadow += pcfShadow(shadowMap0, lpos, 1.0, pos_screen)*w; weight += w; } @@ -298,11 +298,11 @@ void main() //spotlight shadow 1 vec4 lpos = shadow_matrix[4]*spos; - frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8); + frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen); //spotlight shadow 2 lpos = shadow_matrix[5]*spos; - frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8); + frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen); //frag_color.rgb = pos.xyz; //frag_color.b = shadow; diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 76bb2b0976..e8a109e661 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -61,6 +61,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 +RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 1 RenderDeferredSSAO 1 1 @@ -72,6 +73,38 @@ RenderMaxTextureIndex 1 16 // +// Low Graphics Settings (fixed function) +// +list LowFixedFunction +RenderAnisotropic 1 0 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 +RenderAvatarMaxVisible 1 3 +RenderAvatarVP 1 0 +RenderFarClip 1 64 +RenderFlexTimeFactor 1 0 +RenderGlowResolutionPow 1 8 +RenderMaxPartCount 1 0 +RenderObjectBump 1 0 +RenderLocalLights 1 0 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 0 +RenderTerrainLODFactor 1 1 +RenderTransparentWater 1 0 +RenderTreeLODFactor 1 0 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 0 +WindLightUseAtmosShaders 1 0 +WLSkyDetail 1 48 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +RenderFSAASamples 1 0 + + +// // Low Graphics Settings // list Low @@ -94,7 +127,7 @@ RenderTransparentWater 1 0 RenderTreeLODFactor 1 0 RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 -VertexShaderEnable 1 0 +VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 RenderDeferred 1 0 @@ -223,6 +256,12 @@ list Class3 RenderVBOEnable 1 1 // +// VRAM > 512MB +// +list VRAMGT512 +RenderCompressTextures 1 0 + +// // No Pixel Shaders available // list NoPixelShaders @@ -302,6 +341,7 @@ RenderMaxTextureIndex 1 1 list Intel RenderAnisotropic 1 0 RenderVBOEnable 1 0 +RenderFSAASamples 1 0 list GeForce2 RenderAnisotropic 1 0 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 5e217e000a..3a0e7e3697 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -61,6 +61,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 +RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 1 RenderDeferredSSAO 1 1 @@ -69,6 +70,37 @@ RenderFSAASamples 1 16 RenderMaxTextureIndex 1 16 // +// Low Graphics Settings (fixed function) +// +list LowFixedFunction +RenderAnisotropic 1 0 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 +RenderAvatarMaxVisible 1 3 +RenderAvatarVP 1 0 +RenderFarClip 1 64 +RenderFlexTimeFactor 1 0 +RenderGlowResolutionPow 1 8 +RenderLocalLights 1 0 +RenderMaxPartCount 1 0 +RenderObjectBump 1 0 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 0 +RenderTerrainLODFactor 1 1 +RenderTransparentWater 1 0 +RenderTreeLODFactor 1 0 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 0.5 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 0 +WLSkyDetail 1 48 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +RenderFSAASamples 1 0 + +// // Low Graphics Settings // list Low @@ -220,6 +252,12 @@ list Class3 RenderVBOEnable 1 1 // +// VRAM > 512MB +// +list VRAMGT512 +RenderCompressTextures 1 0 + +// // No Pixel Shaders available // list NoPixelShaders @@ -291,10 +329,15 @@ RenderObjectBump 0 0 list OpenGLPre15 RenderVBOEnable 1 0 +list OpenGLPre30 +RenderDeferred 0 0 +RenderMaxTextureIndex 1 1 + list Intel RenderAnisotropic 1 0 // Avoid some Intel crashes on Linux RenderCubeMap 0 0 +RenderFSAASamples 1 0 list GeForce2 RenderAnisotropic 1 0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 915a012a39..96362ff4bb 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -61,6 +61,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 0.5 +RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 1 RenderDeferredSSAO 1 1 @@ -71,6 +72,37 @@ RenderFSAASamples 1 16 RenderMaxTextureIndex 1 16 // +// Low Graphics Settings (fixed function) +// +list LowFixedFunction +RenderAnisotropic 1 0 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 +RenderAvatarMaxVisible 1 3 +RenderAvatarVP 1 0 +RenderFarClip 1 64 +RenderFlexTimeFactor 1 0 +RenderGlowResolutionPow 1 8 +RenderLocalLights 1 0 +RenderMaxPartCount 1 0 +RenderObjectBump 1 0 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 0 +RenderTerrainLODFactor 1 1 +RenderTransparentWater 1 0 +RenderTreeLODFactor 1 0 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 0.5 +VertexShaderEnable 1 0 +WindLightUseAtmosShaders 1 0 +WLSkyDetail 1 48 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +RenderFSAASamples 1 0 + +// // Low Graphics Settings // list Low @@ -93,7 +125,7 @@ RenderTransparentWater 1 0 RenderTreeLODFactor 1 0 RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 -VertexShaderEnable 1 0 +VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 RenderDeferred 1 0 @@ -248,6 +280,12 @@ RenderDeferredSSAO 0 0 RenderShadowDetail 0 0 // +// VRAM > 512MB +// +list VRAMGT512 +RenderCompressTextures 1 0 + +// // "Default" setups for safe, low, medium, high // list safe @@ -286,6 +324,7 @@ RenderObjectBump 0 0 list OpenGLPre15 RenderVBOEnable 1 0 + list TexUnit8orLess RenderDeferredSSAO 0 0 @@ -295,6 +334,7 @@ RenderDeferredSSAO 1 0 list Intel RenderAnisotropic 1 0 RenderLocalLights 1 0 +RenderFSAASamples 1 0 list GeForce2 RenderAnisotropic 1 0 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index ae2cf910f2..398a64378e 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -61,6 +61,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 +RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 0 RenderDeferredSSAO 1 0 @@ -71,6 +72,37 @@ RenderFSAASamples 1 16 RenderMaxTextureIndex 1 16 // +// Low Graphics Settings (fixed function) +// +list LowFixedFunction +RenderAnisotropic 1 0 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 +RenderAvatarMaxVisible 1 3 +RenderAvatarVP 1 0 +RenderFarClip 1 64 +RenderFlexTimeFactor 1 0 +RenderGlowResolutionPow 1 8 +RenderLocalLights 1 0 +RenderMaxPartCount 1 0 +RenderObjectBump 1 0 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 0 +RenderTerrainLODFactor 1 1 +RenderTransparentWater 1 0 +RenderTreeLODFactor 1 0 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 0.5 +VertexShaderEnable 1 0 +WindLightUseAtmosShaders 1 0 +WLSkyDetail 1 48 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +RenderFSAASamples 1 0 + +// // Low Graphics Settings // list Low @@ -93,7 +125,7 @@ RenderTransparentWater 1 0 RenderTreeLODFactor 1 0 RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 -VertexShaderEnable 1 0 +VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 RenderDeferred 1 0 @@ -222,6 +254,12 @@ list Class3 RenderVBOEnable 1 1 // +// VRAM > 512MB +// +list VRAMGT512 +RenderCompressTextures 1 0 + +// // No Pixel Shaders available // list NoPixelShaders @@ -299,6 +337,7 @@ RenderMaxTextureIndex 1 1 list Intel RenderAnisotropic 1 0 RenderVBOEnable 1 0 +RenderFSAASamples 1 0 list GeForce2 RenderAnisotropic 1 0 diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 198e702459..777d54a5c3 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -205,6 +205,7 @@ ATI Radeon X800 .*ATI.*Radeon ?X8.* 2 1 ATI Radeon X900 .*ATI.*Radeon ?X9.* 2 1 ATI Radeon Xpress .*ATI.*Radeon Xpress.* 0 1 ATI Rage 128 .*ATI.*Rage 128.* 0 1 +ATI R300 (9700) .*R300.* 1 1 ATI R350 (9800) .*R350.* 1 1 ATI R580 (X1900) .*R580.* 3 1 ATI RC410 (Xpress 200) .*RC410.* 0 0 diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index 283a28a0aa..20936c6460 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -110,22 +110,34 @@ export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" # fi #fi -export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"${LD_LIBRARY_PATH}"' -export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-secondlife-bin' -export SL_OPT="`cat etc/gridargs.dat` $@" - -# Run the program -eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || LL_RUN_ERR=runerr +export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}" + +# Have to deal specially with gridargs.dat; typical contents look like: +# --channel "Second Life Developer" --settings settings_developer.xml +# Simply embedding $(<etc/gridargs.dat) into a command line treats each of +# Second, Life and Developer as separate args -- no good. We need bash to +# process quotes using eval. +# First read it without scanning, then scan that string. Break quoted words +# into a bash array. Note that if gridargs.dat is empty, or contains only +# whitespace, the resulting gridargs array will be empty -- zero entries -- +# therefore "${gridargs[@]}" entirely vanishes from the command line below, +# just as we want. +eval gridargs=("$(<etc/gridargs.dat)") + +# Run the program. +# Don't quote $LL_WRAPPER because, if empty, it should simply vanish from the +# command line. But DO quote "$@": preserve separate args as individually +# quoted. Similar remarks about the contents of gridargs. +$LL_WRAPPER bin/do-not-directly-run-secondlife-bin "${gridargs[@]}" "$@" +LL_RUN_ERR=$? # Handle any resulting errors -if [ -n "$LL_RUN_ERR" ]; then - LL_RUN_ERR_MSG="" - if [ "$LL_RUN_ERR" = "runerr" ]; then - # generic error running the binary - echo '*** Bad shutdown. ***' - if [ "`uname -m`" = "x86_64" ]; then - echo - cat << EOFMARKER +if [ $LL_RUN_ERR -ne 0 ]; then + # generic error running the binary + echo '*** Bad shutdown ($LL_RUN_ERR). ***' + if [ "$(uname -m)" = "x86_64" ]; then + echo + cat << EOFMARKER You are running the Second Life Viewer on a x86_64 platform. The most common problems when launching the Viewer (particularly 'bin/do-not-directly-run-secondlife-bin: not found' and 'error while @@ -134,10 +146,8 @@ distribution's 32-bit compatibility packages. For example, on Ubuntu and other Debian-based Linuxes you might run: $ sudo apt-get install ia32-libs ia32-libs-gtk ia32-libs-kde ia32-libs-sdl EOFMARKER - fi fi fi - echo echo '*******************************************************' diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4fb0a7628c..aa581df3d4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -112,6 +112,8 @@ #include "llnotifications.h" #include "llnotificationsutil.h" +#include "llleap.h" + // Third party library includes #include <boost/bind.hpp> #include <boost/foreach.hpp> @@ -125,7 +127,6 @@ #endif #include "llapr.h" -#include "apr_dso.h" #include <boost/lexical_cast.hpp> #include "llviewerkeyboard.h" @@ -162,6 +163,7 @@ #include "llcontainerview.h" #include "lltooltip.h" +#include "llsdutil.h" #include "llsdserialize.h" #include "llworld.h" @@ -529,6 +531,7 @@ static void settings_to_globals() LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); + LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor"); LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor"); @@ -546,7 +549,7 @@ static void settings_to_globals() gAgentPilot.setNumRuns(gSavedSettings.getS32("StatsNumRuns")); gAgentPilot.setQuitAfterRuns(gSavedSettings.getBOOL("StatsQuitAfterRuns")); gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle")); - + gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale"); @@ -1014,6 +1017,15 @@ bool LLAppViewer::init() } } +#if LL_WINDOWS + if (gGLManager.mIsIntel && + LLFeatureManager::getInstance()->getGPUClass() > 0 && + gGLManager.mGLVersion <= 3.f) + { + LLNotificationsUtil::add("IntelOldDriver"); + } +#endif + // save the graphics card gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString(); @@ -1038,11 +1050,38 @@ bool LLAppViewer::init() gGLActive = FALSE; + + // Iterate over --leap command-line options. But this is a bit tricky: if + // there's only one, it won't be an array at all. + LLSD LeapCommand(gSavedSettings.getLLSD("LeapCommand")); + LL_DEBUGS("InitInfo") << "LeapCommand: " << LeapCommand << LL_ENDL; + if (LeapCommand.isDefined() && ! LeapCommand.isArray()) + { + // If LeapCommand is actually a scalar value, make an array of it. + // Have to do it in two steps because LeapCommand.append(LeapCommand) + // trashes content! :-P + LLSD item(LeapCommand); + LeapCommand.append(item); + } + BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand)) + { + LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL; + // We don't have any better description of this plugin than the + // user-specified command line. Passing "" causes LLLeap to derive a + // description from the command line itself. + // Suppress LLLeap::Error exception: trust LLLeap's own logging. We + // don't consider any one --leap command mission-critical, so if one + // fails, log it, shrug and carry on. + LLLeap::create("", leap, false); // exception=false + } + if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getS32("QAModeEventHostPort") > 0) { - loadEventHostModule(gSavedSettings.getS32("QAModeEventHostPort")); + LL_WARNS("InitInfo") << "QAModeEventHostPort DEPRECATED: " + << "lleventhost no longer supported as a dynamic library" + << LL_ENDL; } - + LLViewerMedia::initClass(); LL_INFOS("InitInfo") << "Viewer media initialized." << LL_ENDL ; @@ -1520,21 +1559,27 @@ bool LLAppViewer::cleanup() if (! isError()) { std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); - logdir += gDirUtilp->getDirDelimiter(); gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp"); } - // *TODO - generalize this and move DSO wrangling to a helper class -brad - std::set<struct apr_dso_handle_t *>::const_iterator i; - for(i = mPlugins.begin(); i != mPlugins.end(); ++i) { - int (*ll_plugin_stop_func)(void) = NULL; - apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, *i, "ll_plugin_stop"); - ll_plugin_stop_func(); - - rv = apr_dso_unload(*i); - } - mPlugins.clear(); + // Kill off LLLeap objects. We can find them all because LLLeap is derived + // from LLInstanceTracker. But collect instances first: LLInstanceTracker + // specifically forbids adding/deleting instances while iterating. + std::vector<LLLeap*> leaps; + leaps.reserve(LLLeap::instanceCount()); + for (LLLeap::instance_iter li(LLLeap::beginInstances()), lend(LLLeap::endInstances()); + li != lend; ++li) + { + leaps.push_back(&*li); + } + // Okay, now trash them all. We don't have to NULL or erase the entry + // in 'leaps' because the whole vector is going away momentarily. + BOOST_FOREACH(LLLeap* leap, leaps) + { + delete leap; + } + } // destroy 'leaps' //flag all elements as needing to be destroyed immediately // to ensure shutdown order @@ -1769,8 +1814,7 @@ bool LLAppViewer::cleanup() if (mPurgeOnExit) { llinfos << "Purging all cache files on exit" << llendflush; - std::string mask = gDirUtilp->getDirDelimiter() + "*.*"; - gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""),mask); + gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*"); } removeMarkerFile(); // Any crashes from here on we'll just have to ignore @@ -3004,8 +3048,7 @@ void LLAppViewer::cleanupSavedSettings() void LLAppViewer::removeCacheFiles(const std::string& file_mask) { - std::string mask = gDirUtilp->getDirDelimiter() + file_mask; - gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), mask); + gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), file_mask); } void LLAppViewer::writeSystemInfo() @@ -3864,8 +3907,7 @@ void LLAppViewer::purgeCache() LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL; LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); LLVOCache::getInstance()->removeCache(LL_PATH_CACHE); - std::string mask = "*.*"; - gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), mask); + gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*.*"); } std::string LLAppViewer::getSecondLifeTitle() const @@ -4973,87 +5015,6 @@ void LLAppViewer::handleLoginComplete() writeDebugInfo(); } -// *TODO - generalize this and move DSO wrangling to a helper class -brad -void LLAppViewer::loadEventHostModule(S32 listen_port) -{ - std::string dso_name = -#if LL_WINDOWS - "lleventhost.dll"; -#elif LL_DARWIN - "liblleventhost.dylib"; -#else - "liblleventhost.so"; -#endif - - std::string dso_path = gDirUtilp->findFile(dso_name, - gDirUtilp->getAppRODataDir(), - gDirUtilp->getExecutableDir()); - - if(dso_path == "") - { - llerrs << "QAModeEventHost requested but module \"" << dso_name << "\" not found!" << llendl; - return; - } - - LL_INFOS("eventhost") << "Found lleventhost at '" << dso_path << "'" << LL_ENDL; -#if ! defined(LL_WINDOWS) - { - std::string outfile("/tmp/lleventhost.file.out"); - std::string command("file '" + dso_path + "' > '" + outfile + "' 2>&1"); - int rc = system(command.c_str()); - if (rc != 0) - { - LL_WARNS("eventhost") << command << " ==> " << rc << ':' << LL_ENDL; - } - else - { - LL_INFOS("eventhost") << command << ':' << LL_ENDL; - } - { - std::ifstream reader(outfile.c_str()); - std::string line; - while (std::getline(reader, line)) - { - size_t len = line.length(); - if (len && line[len-1] == '\n') - line.erase(len-1); - LL_INFOS("eventhost") << line << LL_ENDL; - } - } - remove(outfile.c_str()); - } -#endif // LL_WINDOWS - - apr_dso_handle_t * eventhost_dso_handle = NULL; - apr_pool_t * eventhost_dso_memory_pool = NULL; - - //attempt to load the shared library - apr_pool_create(&eventhost_dso_memory_pool, NULL); - apr_status_t rv = apr_dso_load(&eventhost_dso_handle, - dso_path.c_str(), - eventhost_dso_memory_pool); - llassert_always(! ll_apr_warn_status(rv, eventhost_dso_handle)); - llassert_always(eventhost_dso_handle != NULL); - - int (*ll_plugin_start_func)(LLSD const &) = NULL; - rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_start_func, eventhost_dso_handle, "ll_plugin_start"); - - llassert_always(! ll_apr_warn_status(rv, eventhost_dso_handle)); - llassert_always(ll_plugin_start_func != NULL); - - LLSD args; - args["listen_port"] = listen_port; - - int status = ll_plugin_start_func(args); - - if(status != 0) - { - llerrs << "problem loading eventhost plugin, status: " << status << llendl; - } - - mPlugins.insert(eventhost_dso_handle); -} - void LLAppViewer::launchUpdater() { LLSD query_map = LLSD::emptyMap(); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 71a7868191..f7d019ccba 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -41,8 +41,6 @@ class LLTextureFetch; class LLWatchdogTimeout; class LLUpdaterService; -struct apr_dso_handle_t; - class LLAppViewer : public LLApp { public: @@ -220,8 +218,6 @@ private: void sendLogoutRequest(); void disconnectViewer(); - - void loadEventHostModule(S32 listen_port); // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. @@ -270,8 +266,6 @@ private: LLAllocator mAlloc; - std::set<struct apr_dso_handle_t*> mPlugins; - LLFrameTimer mMemCheckTimer; boost::scoped_ptr<LLUpdaterService> mUpdater; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index f618af9536..fdd4565e50 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -594,7 +594,7 @@ namespace action_give_inventory } S32 count = LLShareInfo::instance().mAvatarNames.size(); - bool shared = false; + bool shared = count && !inventory_selected_uuids.empty(); // iterate through avatars for(S32 i = 0; i < count; ++i) @@ -616,8 +616,10 @@ namespace action_give_inventory LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); if (inv_cat) { - LLGiveInventory::doGiveInventoryCategory(avatar_uuid, inv_cat, session_id); - shared = true; + if (!LLGiveInventory::doGiveInventoryCategory(avatar_uuid, inv_cat, session_id, "ItemsShared")) + { + shared = false; + } break; } LLViewerInventoryItem* inv_item = gInventory.getItem(*it); @@ -632,8 +634,10 @@ namespace action_give_inventory } else { - LLGiveInventory::doGiveInventoryItem(avatar_uuid, inv_item, session_id); - shared = true; + if (!LLGiveInventory::doGiveInventoryItem(avatar_uuid, inv_item, session_id)) + { + shared = false; + } } } if (noncopy_items.beginArray() != noncopy_items.endArray()) @@ -643,8 +647,10 @@ namespace action_give_inventory LLSD payload; payload["agent_id"] = avatar_uuid; payload["items"] = noncopy_items; + payload["success_notification"] = "ItemsShared"; LLNotificationsUtil::add("CannotCopyWarning", substitutions, payload, &LLGiveInventory::handleCopyProtectedItem); + shared = false; break; } } diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 65c61c4a8b..17d403bbe1 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -342,6 +342,15 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv) return parseAndStoreResults(clp); } +// TODO: +// - Break out this funky parsing logic into separate method +// - Unit-test it with tests like LLStringUtil::getTokens() (the command-line +// overload that supports quoted tokens) +// - Unless this logic offers significant semantic benefits, replace it with +// LLStringUtil::getTokens(). This would fix a known bug: you cannot --set a +// string-valued variable to the empty string, because empty strings are +// eliminated below. + bool LLCommandLineParser::parseCommandLineString(const std::string& str) { // Split the string content into tokens diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index b58efe62ab..6f71e6ebc8 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -1341,8 +1341,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI // immediately assign bump to a global smart pointer in case some local smart pointer // accidentally releases it. LLPointer<LLViewerTexture> bump = LLViewerTextureManager::getLocalTexture( TRUE ); - - + if (!LLPipeline::sRenderDeferred) { LLFastTimer t(FTM_BUMP_SOURCE_CREATE); @@ -1351,6 +1350,10 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI } else { //convert to normal map + + //disable compression on normal maps to prevent errors below + bump->getGLTexture()->setAllowCompression(false); + { LLFastTimer t(FTM_BUMP_SOURCE_CREATE); bump->setExplicitFormat(GL_RGBA8, GL_ALPHA); diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index a93b2b71de..bf8338e5f2 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -216,12 +216,14 @@ BOOL LLViewerDynamicTexture::updateAllInstances() return TRUE; } +#if 0 //THIS CAUSES MAINT-1092 bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete(); if (use_fbo) { gPipeline.mWaterDis.bindTarget(); } +#endif LLGLSLShader::bindNoShader(); LLVertexBuffer::unbind(); @@ -256,10 +258,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances() } } +#if 0 if (use_fbo) { gPipeline.mWaterDis.flush(); } +#endif return ret; } diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index ed1d7e860a..9480e54809 100644 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -29,6 +29,9 @@ #include "lltrans.h" #include "llui.h" +#include "llprocess.h" +#include "llsdutil.h" +#include <boost/foreach.hpp> // static const std::string LLExternalEditor::sFilenameMarker = "%s"; @@ -45,19 +48,8 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env return EC_NOT_SPECIFIED; } - // Add the filename marker if missing. - if (cmd.find(sFilenameMarker) == std::string::npos) - { - cmd += " \"" + sFilenameMarker + "\""; - llinfos << "Adding the filename marker (" << sFilenameMarker << ")" << llendl; - } - string_vec_t tokens; - if (tokenize(tokens, cmd) < 2) // 2 = bin + at least one arg (%s) - { - llwarns << "Error parsing editor command" << llendl; - return EC_PARSE_ERROR; - } + tokenize(tokens, cmd); // Check executable for existence. std::string bin_path = tokens[0]; @@ -68,51 +60,48 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env } // Save command. - mProcess.setExecutable(bin_path); - mArgs.clear(); + mProcessParams = LLProcess::Params(); + mProcessParams.executable = bin_path; for (size_t i = 1; i < tokens.size(); ++i) { - if (i > 1) mArgs += " "; - mArgs += "\"" + tokens[i] + "\""; + mProcessParams.args.add(tokens[i]); } - llinfos << "Setting command [" << bin_path << " " << mArgs << "]" << llendl; + + // Add the filename marker if missing. + if (cmd.find(sFilenameMarker) == std::string::npos) + { + mProcessParams.args.add(sFilenameMarker); + llinfos << "Adding the filename marker (" << sFilenameMarker << ")" << llendl; + } + + llinfos << "Setting command [" << mProcessParams << "]" << llendl; return EC_SUCCESS; } LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path) { - std::string args = mArgs; - if (mProcess.getExecutable().empty() || args.empty()) + if (std::string(mProcessParams.executable).empty() || mProcessParams.args.empty()) { llwarns << "Editor command not set" << llendl; return EC_NOT_SPECIFIED; } - // Substitute the filename marker in the command with the actual passed file name. - LLStringUtil::replaceString(args, sFilenameMarker, file_path); - - // Split command into separate tokens. - string_vec_t tokens; - tokenize(tokens, args); + // Copy params block so we can replace sFilenameMarker + LLProcess::Params params; + params.executable = mProcessParams.executable; - // Set process arguments taken from the command. - mProcess.clearArguments(); - for (string_vec_t::const_iterator arg_it = tokens.begin(); arg_it != tokens.end(); ++arg_it) - { - mProcess.addArgument(*arg_it); - } - - // Run the editor. - llinfos << "Running editor command [" << mProcess.getExecutable() + " " + args << "]" << llendl; - int result = mProcess.launch(); - if (result == 0) + // Substitute the filename marker in the command with the actual passed file name. + BOOST_FOREACH(const std::string& arg, mProcessParams.args) { - // Prevent killing the process in destructor (will add it to the zombies list). - mProcess.orphan(); + std::string fixed(arg); + LLStringUtil::replaceString(fixed, sFilenameMarker, file_path); + params.args.add(fixed); } - return result == 0 ? EC_SUCCESS : EC_FAILED_TO_RUN; + // Run the editor. Prevent killing the process in destructor. + params.autokill = false; + return LLProcess::create(params) ? EC_SUCCESS : EC_FAILED_TO_RUN; } // static @@ -130,6 +119,12 @@ std::string LLExternalEditor::getErrorMessage(EErrorCode code) return LLTrans::getString("Unknown"); } +// TODO: +// - Unit-test this with tests like LLStringUtil::getTokens() (the +// command-line overload that supports quoted tokens) +// - Unless there are significant semantic differences, eliminate this method +// and use LLStringUtil::getTokens() instead. + // static size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str) { diff --git a/indra/newview/llexternaleditor.h b/indra/newview/llexternaleditor.h index ef5db56c6e..fd2c25020c 100644 --- a/indra/newview/llexternaleditor.h +++ b/indra/newview/llexternaleditor.h @@ -27,7 +27,7 @@ #ifndef LL_LLEXTERNALEDITOR_H #define LL_LLEXTERNALEDITOR_H -#include <llprocesslauncher.h> +#include "llprocess.h" /** * Usage: @@ -97,9 +97,7 @@ private: */ static const std::string sSetting; - - std::string mArgs; - LLProcessLauncher mProcess; + LLProcess::Params mProcessParams; }; #endif // LL_LLEXTERNALEDITOR_H diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 08f9d26705..ec2493dd2e 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -670,7 +670,14 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures) switch (level) { case 0: - maskFeatures("Low"); + if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel) + { //only use fixed function by default if GL version < 3.0 or this is an intel graphics chip + maskFeatures("LowFixedFunction"); + } + else + { //same as low, but with "Basic Shaders" enabled + maskFeatures("Low"); + } break; case 1: maskFeatures("Mid"); @@ -779,6 +786,10 @@ void LLFeatureManager::applyBaseMasks() { maskFeatures("MapBufferRange"); } + if (gGLManager.mVRAM > 512) + { + maskFeatures("VRAMGT512"); + } // now mask by gpu string // Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index b050a638dc..ac33a05f42 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -416,6 +416,9 @@ void LLFloaterBvhPreview::draw() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::resetMotion() { + if (!mAnimPreview) + return; + LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); BOOL paused = avatarp->areAnimationsPaused(); @@ -535,6 +538,9 @@ BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask) //----------------------------------------------------------------------------- BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks) { + if (!mAnimPreview) + return false; + mAnimPreview->zoom((F32)clicks * -0.2f); mAnimPreview->requestUpdate(); @@ -670,7 +676,7 @@ void LLFloaterBvhPreview::onCommitBaseAnim() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::onCommitLoop() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -689,7 +695,7 @@ void LLFloaterBvhPreview::onCommitLoop() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::onCommitLoopIn() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -709,7 +715,7 @@ void LLFloaterBvhPreview::onCommitLoopIn() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::onCommitLoopOut() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -729,7 +735,7 @@ void LLFloaterBvhPreview::onCommitLoopOut() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::onCommitName() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -770,7 +776,7 @@ void LLFloaterBvhPreview::onCommitEmote() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::onCommitPriority() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -784,7 +790,7 @@ void LLFloaterBvhPreview::onCommitPriority() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::onCommitEaseIn() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -799,7 +805,7 @@ void LLFloaterBvhPreview::onCommitEaseIn() //----------------------------------------------------------------------------- void LLFloaterBvhPreview::onCommitEaseOut() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -814,7 +820,7 @@ void LLFloaterBvhPreview::onCommitEaseOut() //----------------------------------------------------------------------------- bool LLFloaterBvhPreview::validateEaseIn(const LLSD& data) { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return false; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -834,7 +840,7 @@ bool LLFloaterBvhPreview::validateEaseIn(const LLSD& data) //----------------------------------------------------------------------------- bool LLFloaterBvhPreview::validateEaseOut(const LLSD& data) { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return false; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index f9a403cf9f..116bd241c4 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -37,6 +37,7 @@ #include "llspinctrl.h" #include "llstartup.h" #include "lltextbox.h" +#include "llcombobox.h" #include "pipeline.h" // Linden library includes @@ -99,6 +100,12 @@ void LLFloaterHardwareSettings::refreshEnabledState() getChildView("vbo")->setEnabled(FALSE); } + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures") || + !gGLManager.mHasVertexBufferObject) + { + getChildView("texture compression")->setEnabled(FALSE); + } + // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance LLSpinCtrl* gamma_ctrl = getChild<LLSpinCtrl>("gamma"); gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders()); @@ -142,6 +149,13 @@ BOOL LLFloaterHardwareSettings::postBuild() { childSetAction("OK", onBtnOK, this); + if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f) + { //remove FSAA settings above "4x" + LLComboBox* combo = getChild<LLComboBox>("fsaa"); + combo->remove("8x"); + combo->remove("16x"); + } + refresh(); center(); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index d2b4866987..515e544452 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2183,14 +2183,8 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) item->dirtyFilter(); - // Update the folder creation date if the folder has no creation date - bool setting_date = false; - const time_t item_creation_date = item->getCreationDate(); - if ((item_creation_date > 0) && (mCreationDate == 0)) - { - setCreationDate(item_creation_date); - setting_date = true; - } + // Update the folder creation date if the child is newer than our current date + setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate())); // Handle sorting requestArrange(); @@ -2200,11 +2194,8 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) LLFolderViewFolder* parentp = getParentFolder(); while (parentp) { - // Update the parent folder creation date - if (setting_date && (parentp->mCreationDate == 0)) - { - parentp->setCreationDate(item_creation_date); - } + // Update the folder creation date if the child is newer than our current date + parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate())); if (parentp->mSortFunction.isByDate()) { diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index 30858871ec..72bea8db10 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -220,17 +220,25 @@ bool LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent, return res; } -void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, +bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, const LLInventoryCategory* cat, - const LLUUID& im_session_id) + const LLUUID& im_session_id, + const std::string& notification_name) { - if (!cat) return; + if (!cat) + { + return false; + } llinfos << "LLGiveInventory::giveInventoryCategory() - " << cat->getUUID() << llendl; - if (!isAgentAvatarValid()) return; + if (!isAgentAvatarValid()) + { + return false; + } + bool give_successful = true; // Test out how many items are being given. LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; @@ -253,24 +261,24 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, if (!complete) { LLNotificationsUtil::add("IncompleteInventory"); - return; + give_successful = false; } count = items.count() + cats.count(); if (count > MAX_ITEMS) { LLNotificationsUtil::add("TooManyItems"); - return; + give_successful = false; } else if (count == 0) { LLNotificationsUtil::add("NoItems"); - return; + give_successful = false; } - else + else if (give_successful) { if (0 == giveable.countNoCopy()) { - LLGiveInventory::commitGiveInventoryCategory(to_agent, cat, im_session_id); + give_successful = LLGiveInventory::commitGiveInventoryCategory(to_agent, cat, im_session_id); } else { @@ -279,9 +287,16 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, LLSD payload; payload["agent_id"] = to_agent; payload["folder_id"] = cat->getUUID(); + if (!notification_name.empty()) + { + payload["success_notification"] = notification_name; + } LLNotificationsUtil::add("CannotCopyCountItems", args, payload, &LLGiveInventory::handleCopyProtectedCategory); + give_successful = false; } } + + return give_successful; } ////////////////////////////////////////////////////////////////////////// @@ -325,6 +340,7 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLSD itmes = notification["payload"]["items"]; LLInventoryItem* item = NULL; + bool give_successful = true; switch(option) { case 0: // "Yes" @@ -343,15 +359,21 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL else { LLNotificationsUtil::add("CannotGiveItem"); + give_successful = false; } } + if (give_successful && notification["payload"]["success_notification"].isDefined()) + { + LLNotificationsUtil::add(notification["payload"]["success_notification"].asString()); + } break; default: // no, cancel, whatever, who cares, not yes. LLNotificationsUtil::add("TransactionCancelled"); + give_successful = false; break; } - return false; + return give_successful; } // static @@ -408,13 +430,14 @@ bool LLGiveInventory::handleCopyProtectedCategory(const LLSD& notification, cons { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLInventoryCategory* cat = NULL; + bool give_successful = true; switch(option) { case 0: // "Yes" cat = gInventory.getCategory(notification["payload"]["folder_id"].asUUID()); if (cat) { - LLGiveInventory::commitGiveInventoryCategory(notification["payload"]["agent_id"].asUUID(), + give_successful = LLGiveInventory::commitGiveInventoryCategory(notification["payload"]["agent_id"].asUUID(), cat); LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; @@ -430,27 +453,37 @@ bool LLGiveInventory::handleCopyProtectedCategory(const LLSD& notification, cons gInventory.deleteObject(items.get(i)->getUUID()); } gInventory.notifyObservers(); + + if (give_successful && notification["payload"]["success_notification"].isDefined()) + { + LLNotificationsUtil::add(notification["payload"]["success_notification"].asString()); + } } else { LLNotificationsUtil::add("CannotGiveCategory"); + give_successful = false; } break; default: // no, cancel, whatever, who cares, not yes. LLNotificationsUtil::add("TransactionCancelled"); + give_successful = false; break; } - return false; + return give_successful; } // static -void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, +bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, const LLInventoryCategory* cat, const LLUUID& im_session_id) { - if (!cat) return; + if (!cat) + { + return false; + } llinfos << "LLGiveInventory::commitGiveInventoryCategory() - " << cat->getUUID() << llendl; @@ -467,6 +500,7 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, LLInventoryModel::EXCLUDE_TRASH, giveable); + bool give_successful = true; // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < // MTUBYTES or 18 * count < 1200 => count < 1200/18 => // 66. I've cut it down a bit from there to give some pad. @@ -474,12 +508,12 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, if (count > MAX_ITEMS) { LLNotificationsUtil::add("TooManyItems"); - return; + give_successful = false; } else if (count == 0) { LLNotificationsUtil::add("NoItems"); - return; + give_successful = false; } else { @@ -545,6 +579,8 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, logInventoryOffer(to_agent, im_session_id); } + + return give_successful; } // EOF diff --git a/indra/newview/llgiveinventory.h b/indra/newview/llgiveinventory.h index e1e221c75b..85bc1ed49c 100644 --- a/indra/newview/llgiveinventory.h +++ b/indra/newview/llgiveinventory.h @@ -62,9 +62,10 @@ public: /** * Gives passed inventory category to specified avatar in specified session. */ - static void doGiveInventoryCategory(const LLUUID& to_agent, + static bool doGiveInventoryCategory(const LLUUID& to_agent, const LLInventoryCategory* item, - const LLUUID &session_id = LLUUID::null); + const LLUUID &session_id = LLUUID::null, + const std::string& notification = std::string()); // give inventory item functionality static bool handleCopyProtectedItem(const LLSD& notification, const LLSD& response); @@ -85,7 +86,7 @@ private: // give inventory category functionality static bool handleCopyProtectedCategory(const LLSD& notification, const LLSD& response); - static void commitGiveInventoryCategory(const LLUUID& to_agent, + static bool commitGiveInventoryCategory(const LLUUID& to_agent, const LLInventoryCategory* cat, const LLUUID &im_session_id = LLUUID::null); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index c8e48b0d42..0f0ae896a2 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -119,6 +119,7 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, void LLIMFloaterContainer::onCloseFloater(LLUUID& id) { mSessions.erase(id); + setFocus(TRUE); } void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a7c4618fa4..4000570872 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3237,7 +3237,6 @@ public: //just like a normal IM //this is just replicated code from process_improved_im //and should really go in it's own function -jwolk - LLChat chat; std::string message = message_params["message"].asString(); std::string name = message_params["from_name"].asString(); @@ -3255,14 +3254,7 @@ public: name, LLMute::flagTextChat); - BOOL is_linden = LLMuteList::getInstance()->isLinden(name); - std::string separator_string(": "); - - chat.mMuted = is_muted && !is_linden; - chat.mFromID = from_id; - chat.mFromName = name; - - if (!is_linden && is_busy) + if (is_busy || is_muted) { return; } diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index acc139c569..a7b93b8030 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -111,6 +111,7 @@ private: private: LLUUID mObjectID; + LLUUID mPreviousObjectID; S32 mObjectFace; viewer_media_t mMediaImpl; LLMediaEntry* mMediaEntry; @@ -249,6 +250,7 @@ void LLInspectObject::onClose(bool app_quitting) { // Release selection to deselect mObjectSelection = NULL; + mPreviousObjectID = mObjectID; getChild<LLMenuButton>("gear_btn")->hideMenu(); } @@ -266,6 +268,13 @@ void LLInspectObject::update() LLSelectNode* nodep = selection->getFirstRootNode(); if (!nodep) return; + // If we don't have fresh object info yet and it's the object we inspected last time, + // keep showing the previously retrieved data until we get the update. + if (!nodep->mValid && nodep->getObject()->getID() == mPreviousObjectID) + { + return; + } + updateButtons(nodep); updateName(nodep); updateDescription(nodep); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 4d0af94f9f..4573074c73 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -654,7 +654,7 @@ void LLInventoryFilter::setHoursAgo(U32 hours) bool are_date_limits_valid = mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max(); bool is_increasing = hours > mFilterOps.mHoursAgo; - bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo; + bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo && !isSinceLogoff(); // *NOTE: need to cache last filter time, in case filter goes stale BOOL less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f461c7e46f..c899e8991e 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1620,7 +1620,7 @@ void LLMeshUploadThread::doWholeModelUpload() mCurlRequest->process(); //sleep for 10ms to prevent eating a whole core apr_sleep(10000); - } while (mCurlRequest->getQueued() > 0); + } while (!LLAppViewer::isQuitting() && mCurlRequest->getQueued() > 0); } delete mCurlRequest; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 2a08cb1845..95caa2731a 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -267,7 +267,6 @@ LLNavigationBar::LLNavigationBar() mBtnForward(NULL), mBtnHome(NULL), mCmbLocation(NULL), - mPurgeTPHistoryItems(false), mSaveToLocationHistory(false) { buildFromFile( "panel_navigation_bar.xml"); @@ -338,12 +337,6 @@ void LLNavigationBar::setVisible(BOOL visible) void LLNavigationBar::draw() { - if(mPurgeTPHistoryItems) - { - LLTeleportHistory::getInstance()->purgeItems(); - mPurgeTPHistoryItems = false; - } - if (isBackgroundVisible()) { static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0); @@ -687,7 +680,7 @@ void LLNavigationBar::clearHistoryCache() LLLocationHistory* lh = LLLocationHistory::getInstance(); lh->removeItems(); lh->save(); - mPurgeTPHistoryItems= true; + LLTeleportHistory::getInstance()->purgeItems(); } int LLNavigationBar::getDefNavBarHeight() diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index e4ce9e3998..7878bab24e 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -145,7 +145,6 @@ private: boost::signals2::connection mTeleportFailedConnection; boost::signals2::connection mTeleportFinishConnection; boost::signals2::connection mHistoryMenuConnection; - bool mPurgeTPHistoryItems; // if true, save location to location history when teleport finishes bool mSaveToLocationHistory; }; diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index c71ea48193..00ff81724c 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -105,15 +105,17 @@ BOOL LLNearbyChatBar::postBuild() mNearbyChat = getChildView("nearby_chat"); - LLUICtrl* show_btn = getChild<LLUICtrl>("show_nearby_chat"); + gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE); + BOOL show_nearby_chat = gSavedSettings.getBOOL("nearbychat_history_visibility"); + + LLButton* show_btn = getChild<LLButton>("show_nearby_chat"); show_btn->setCommitCallback(boost::bind(&LLNearbyChatBar::onToggleNearbyChatPanel, this)); + show_btn->setToggleState(show_nearby_chat); mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator"); mOutputMonitor->setVisible(FALSE); - gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE); - - mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility")); + showNearbyChatPanel(show_nearby_chat); // Register for font change notifications LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); @@ -394,26 +396,23 @@ void LLNearbyChatBar::sendChat( EChatType type ) } } - -void LLNearbyChatBar::onToggleNearbyChatPanel() +void LLNearbyChatBar::showNearbyChatPanel(bool show) { - LLView* nearby_chat = getChildView("nearby_chat"); - - if (nearby_chat->getVisible()) + if (!show) { - if (!isMinimized()) + if (mNearbyChat->getVisible() && !isMinimized()) { mExpandedHeight = getRect().getHeight(); } setResizeLimits(getMinWidth(), COLLAPSED_HEIGHT); - nearby_chat->setVisible(FALSE); + mNearbyChat->setVisible(FALSE); reshape(getRect().getWidth(), COLLAPSED_HEIGHT); enableResizeCtrls(true, true, false); storeRectControl(); } else { - nearby_chat->setVisible(TRUE); + mNearbyChat->setVisible(TRUE); setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); reshape(getRect().getWidth(), mExpandedHeight); enableResizeCtrls(true); @@ -423,6 +422,11 @@ void LLNearbyChatBar::onToggleNearbyChatPanel() gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible()); } +void LLNearbyChatBar::onToggleNearbyChatPanel() +{ + showNearbyChatPanel(!mNearbyChat->getVisible()); +} + void LLNearbyChatBar::setMinimized(BOOL b) { LLNearbyChat* nearby_chat = getChild<LLNearbyChat>("nearby_chat"); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index aa9c3a6a98..662496d338 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -39,6 +39,8 @@ class LLNearbyChatBarListener; class LLNearbyChatBar : public LLFloater { + LOG_CLASS(LLNearbyChatBar); + public: // constructor for inline chat-bars (e.g. hosted in chat history window) LLNearbyChatBar(const LLSD& key); @@ -78,6 +80,7 @@ protected: /* virtual */ bool applyRectControl(); + void showNearbyChatPanel(bool show); void onToggleNearbyChatPanel(); static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 995915206b..398f54c6f7 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -101,7 +101,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify) } else { - LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); + LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); LLToast::Params p; p.notif_id = notification->getID(); diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 5d7a5b1c59..f86e583b9e 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -40,6 +40,7 @@ #include "llagent.h" #include "llbutton.h" +#include "llcallbacklist.h" #include "llfocusmgr.h" #include "llnotifications.h" #include "llprogressbar.h" @@ -72,6 +73,8 @@ LLProgressView::LLProgressView() mStartupComplete(false) { mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1)); + mFadeToWorldTimer.stop(); + mFadeFromLoginTimer.stop(); } BOOL LLProgressView::postBuild() @@ -87,8 +90,6 @@ BOOL LLProgressView::postBuild() mCancelBtn = getChild<LLButton>("cancel_btn"); mCancelBtn->setClickedCallback( LLProgressView::onCancelButtonClicked, NULL ); - mFadeToWorldTimer.stop(); - mFadeFromLoginTimer.stop(); getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle())); @@ -106,6 +107,9 @@ BOOL LLProgressView::postBuild() LLProgressView::~LLProgressView() { + // Just in case something went wrong, make sure we deregister our idle callback. + gIdleCallbacks.deleteFunction(onIdle, this); + gFocusMgr.releaseFocusIfNeeded( this ); sInstance = NULL; @@ -154,6 +158,7 @@ void LLProgressView::revealIntroPanel() } mFadeFromLoginTimer.start(); + gIdleCallbacks.addFunction(onIdle, this); } void LLProgressView::setStartupComplete() @@ -236,13 +241,6 @@ void LLProgressView::draw() } LLPanel::draw(); - - if (mFadeFromLoginTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME ) - { - mFadeFromLoginTimer.stop(); - LLPanelLogin::closePanel(); - } - return; } @@ -424,3 +422,21 @@ void LLProgressView::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent even } } } + + +// static +void LLProgressView::onIdle(void* user_data) +{ + LLProgressView* self = (LLProgressView*) user_data; + + // Close login panel on mFadeToWorldTimer expiration. + if (self->mFadeFromLoginTimer.getStarted() && + self->mFadeFromLoginTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME) + { + self->mFadeFromLoginTimer.stop(); + LLPanelLogin::closePanel(); + + // Nothing to do anymore. + gIdleCallbacks.deleteFunction(onIdle, user_data); + } +} diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index fac00ad04d..813576b21d 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -41,6 +41,8 @@ class LLProgressView : public LLViewerMediaObserver { + LOG_CLASS(LLProgressView); + public: LLProgressView(); virtual ~LLProgressView(); @@ -74,10 +76,6 @@ public: static void onClickMessage(void*); bool onAlertModal(const LLSD& sd); - // note - this is not just hiding the intro panel - it also hides the parent panel - // and is used when the intro is finished and we want to show the world - void removeIntroPanel(); - protected: LLProgressBar* mProgressBar; LLMediaCtrl* mMediaCtrl; @@ -96,6 +94,7 @@ protected: LLEventStream mUpdateEvents; bool handleUpdate(const LLSD& event_data); + static void onIdle(void* user_data); }; #endif // LL_LLPROGRESSVIEW_H diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 6111255a66..eec2c0a521 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3051,11 +3051,11 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response, // TODO: Make sure you have delete permissions on all of them. const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); // attempt to derez into the trash. - LLDeRezInfo* info = new LLDeRezInfo(DRD_TRASH, trash_id); + LLDeRezInfo info(DRD_TRASH, trash_id); LLSelectMgr::getInstance()->sendListToRegions("DeRezObject", packDeRezHeader, packObjectLocalID, - (void*)info, + (void*) &info, SEND_ONLY_ROOTS); // VEFFECT: Delete Object - one effect for all deletes if (LLSelectMgr::getInstance()->mSelectedObjects->mSelectType != SELECT_TYPE_HUD) @@ -3745,13 +3745,15 @@ void LLSelectMgr::deselectAllIfTooFar() void LLSelectMgr::selectionSetObjectName(const std::string& name) { + std::string name_copy(name); + // we only work correctly if 1 object is selected. if(mSelectedObjects->getRootObjectCount() == 1) { sendListToRegions("ObjectName", packAgentAndSessionID, packObjectName, - (void*)(new std::string(name)), + (void*)(&name_copy), SEND_ONLY_ROOTS); } else if(mSelectedObjects->getObjectCount() == 1) @@ -3759,20 +3761,22 @@ void LLSelectMgr::selectionSetObjectName(const std::string& name) sendListToRegions("ObjectName", packAgentAndSessionID, packObjectName, - (void*)(new std::string(name)), + (void*)(&name_copy), SEND_INDIVIDUALS); } } void LLSelectMgr::selectionSetObjectDescription(const std::string& desc) { + std::string desc_copy(desc); + // we only work correctly if 1 object is selected. if(mSelectedObjects->getRootObjectCount() == 1) { sendListToRegions("ObjectDescription", packAgentAndSessionID, packObjectDescription, - (void*)(new std::string(desc)), + (void*)(&desc_copy), SEND_ONLY_ROOTS); } else if(mSelectedObjects->getObjectCount() == 1) @@ -3780,7 +3784,7 @@ void LLSelectMgr::selectionSetObjectDescription(const std::string& desc) sendListToRegions("ObjectDescription", packAgentAndSessionID, packObjectDescription, - (void*)(new std::string(desc)), + (void*)(&desc_copy), SEND_INDIVIDUALS); } } @@ -4298,15 +4302,14 @@ void LLSelectMgr::packObjectName(LLSelectNode* node, void* user_data) gMessageSystem->addU32Fast(_PREHASH_LocalID, node->getObject()->getLocalID()); gMessageSystem->addStringFast(_PREHASH_Name, *name); } - delete name; } // static void LLSelectMgr::packObjectDescription(LLSelectNode* node, void* user_data) { const std::string* desc = (const std::string*)user_data; - if(!desc->empty()) - { + if(desc) + { // Empty (non-null, but zero length) descriptions are OK gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_LocalID, node->getObject()->getLocalID()); gMessageSystem->addStringFast(_PREHASH_Description, *desc); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 24cb559fd0..64b82aa0bb 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -94,7 +94,7 @@ BOOL LLSidepanelTaskInfo::postBuild() mPayBtn = getChild<LLButton>("pay_btn"); mPayBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onPayButtonClicked, this)); mBuyBtn = getChild<LLButton>("buy_btn"); - mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this)); + mBuyBtn->setClickedCallback(boost::bind(&handle_buy)); mDetailsBtn = getChild<LLButton>("details_btn"); mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this)); @@ -1114,8 +1114,6 @@ void LLSidepanelTaskInfo::doClickAction(U8 click_action) // Set click action back to its old value U8 click_action = 0; LLSelectMgr::getInstance()->selectionGetClickAction(&click_action); -// box->setCurrentByIndex((S32)click_action); - return; } } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index b7a5eea27c..8e62b79d7f 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1186,6 +1186,7 @@ void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode) //====================================== LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : + mObjectBoxSize(1.f), mState(0), mGeometryBytes(0), mSurfaceArea(0.f), diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 6c14ecf452..1a93145cc5 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -378,6 +378,8 @@ public: LLVector4a mObjectBounds[2]; // bounding box (center, size) of objects in this node LLVector4a mViewAngle; LLVector4a mLastUpdateViewAngle; + + F32 mObjectBoxSize; //cached mObjectBounds[1].getLength3() private: U32 mCurUpdatingTime ; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 5a9cf4aeb6..4f635bf855 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -870,6 +870,8 @@ void LLTextureFetchWorker::startWork(S32 param) // Called from LLWorkerThread::processRequest() bool LLTextureFetchWorker::doWork(S32 param) { + static const F32 FETCHING_TIMEOUT = 120.f;//seconds + LLMutexLock lock(&mWorkMutex); if ((mFetcher->isQuitting() || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) @@ -929,7 +931,10 @@ bool LLTextureFetchWorker::doWork(S32 param) mCacheWriteHandle = LLTextureCache::nullHandle(); mState = LOAD_FROM_TEXTURE_CACHE; mInCache = FALSE; +<<<<<<< local mDelay = -1.f; +======= +>>>>>>> other mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE LL_DEBUGS("Texture") << mID << ": Priority: " << llformat("%8.0f",mImagePriority) << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; @@ -1381,10 +1386,20 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { +<<<<<<< local // //No need to timeout, the responder should be triggered automatically. // +======= + if(FETCHING_TIMEOUT < mRequestedTimer.getElapsedTimeF32()) + { + //timeout, abort. + mState = DONE; + return true; + } +>>>>>>> other +<<<<<<< local //if(FETCHING_TIMEOUT < mRequestedTimer.getElapsedTimeF32()) //{ // if(mFetcher->getCurlRequest().isWaiting(mHTTPHandle)) @@ -1405,6 +1420,8 @@ bool LLTextureFetchWorker::doWork(S32 param) // } //} +======= +>>>>>>> other setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return false; } @@ -1904,8 +1921,11 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mCurlGetRequest(NULL), mQAMode(qa_mode), mFetchDebugger(NULL), +<<<<<<< local mFetchSource(LLTextureFetch::FROM_ALL), mOriginFetchSource(LLTextureFetch::FROM_ALL), +======= +>>>>>>> other mFetcherLocked(FALSE) { mCurlPOSTRequestCount = 0; @@ -1916,6 +1936,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image if(LLTextureFetchDebugger::isEnabled()) { mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ; +<<<<<<< local mFetchSource = (e_tex_source)gSavedSettings.getS32("TextureFetchSource"); if(mFetchSource < 0 && mFetchSource >= INVALID_SOURCE) { @@ -1923,6 +1944,8 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image gSavedSettings.setS32("TextureFetchSource", 0); } mOriginFetchSource = mFetchSource; +======= +>>>>>>> other } } @@ -2305,7 +2328,11 @@ S32 LLTextureFetch::update(F32 max_time_ms) // won't work so don't bother trying if (LLStartUp::getStartupState() > STATE_AGENT_SEND) { +<<<<<<< local sendRequestListToSimulators(); +======= + sendRequestListToSimulators(); +>>>>>>> other } } @@ -2356,7 +2383,11 @@ void LLTextureFetch::shutDownImageDecodeThread() void LLTextureFetch::startThread() { // Construct mCurlGetRequest from Worker Thread +<<<<<<< local mCurlGetRequest = new LLCurlTextureRequest(8); +======= + mCurlGetRequest = new LLCurlRequest(); +>>>>>>> other if(mFetchDebugger) { @@ -3195,7 +3226,10 @@ public: llinfos << "Fetch Debugger : CURL GET FAILED, index = " << mIndex << ", status:" << status << " reason:" << reason << llendl; } mDebugger->callbackHTTP(mIndex, channels, buffer, partial, success); +<<<<<<< local mDebugger->getCurlGetRequest()->completeRequest(0); +======= +>>>>>>> other } virtual bool followRedir() { @@ -3218,8 +3252,12 @@ LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextur LLTextureFetchDebugger::~LLTextureFetchDebugger() { mFetchingHistory.clear(); +<<<<<<< local mStopDebug = TRUE; tryToStopDebug(); +======= + stopDebug(); +>>>>>>> other } void LLTextureFetchDebugger::init() @@ -3234,8 +3272,11 @@ void LLTextureFetchDebugger::init() mTotalFetchingTime = 0.f; mRefetchVisCacheTime = -1.f; mRefetchVisHTTPTime = -1.f; +<<<<<<< local mRefetchAllCacheTime = -1.f; mRefetchAllHTTPTime = -1.f; +======= +>>>>>>> other mNumFetchedTextures = 0; mNumCacheHits = 0; @@ -3249,12 +3290,18 @@ void LLTextureFetchDebugger::init() mRenderedDecodedData = 0; mFetchedPixels = 0; mRenderedPixels = 0; +<<<<<<< local mRefetchedVisData = 0; mRefetchedVisPixels = 0; mRefetchedAllData = 0; mRefetchedAllPixels = 0; +======= + mRefetchedData = 0; + mRefetchedPixels = 0; +>>>>>>> other mFreezeHistory = FALSE; +<<<<<<< local mStopDebug = FALSE; mClearHistory = FALSE; } @@ -3299,6 +3346,8 @@ void LLTextureFetchDebugger::startWork(e_debug_state state) break; } return; +======= +>>>>>>> other } void LLTextureFetchDebugger::startDebug() @@ -3306,11 +3355,15 @@ void LLTextureFetchDebugger::startDebug() //lock the fetcher mFetcher->lockFetcher(true); mFreezeHistory = TRUE; +<<<<<<< local mFetcher->resetLoadSource(); +======= +>>>>>>> other //clear the current fetching queue gTextureList.clearFetchingRequests(); +<<<<<<< local mState = START_DEBUG; } @@ -3318,6 +3371,8 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time) { mTimer.reset(); +======= +>>>>>>> other //wait for all works to be done while(1) { @@ -3329,11 +3384,14 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time) { break; } +<<<<<<< local if(mTimer.getElapsedTimeF32() > max_time) { return false; } +======= +>>>>>>> other } //collect statistics @@ -3372,17 +3430,27 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time) } mNumFetchedTextures = fetched_textures.size(); +<<<<<<< local return true; +======= +>>>>>>> other } +<<<<<<< local void LLTextureFetchDebugger::tryToStopDebug() +======= +void LLTextureFetchDebugger::stopDebug() +>>>>>>> other { +<<<<<<< local if(!mStopDebug) { return; } +======= +>>>>>>> other //clear the current debug work S32 size = mFetchingHistory.size(); switch(mState) @@ -3411,6 +3479,7 @@ void LLTextureFetchDebugger::tryToStopDebug() break; case GL_TEX: break; +<<<<<<< local case REFETCH_VIS_CACHE: break; case REFETCH_VIS_HTTP: @@ -3421,12 +3490,19 @@ void LLTextureFetchDebugger::tryToStopDebug() case REFETCH_ALL_HTTP: mRefetchList.clear(); break; +======= +>>>>>>> other default: break; } +<<<<<<< local if(update(0.005f)) +======= + while(1) +>>>>>>> other { +<<<<<<< local //unlock the fetcher mFetcher->lockFetcher(false); mFetcher->resetLoadSource(); @@ -3434,29 +3510,53 @@ void LLTextureFetchDebugger::tryToStopDebug() mStopDebug = FALSE; if(mClearHistory) +======= + if(update()) +>>>>>>> other { +<<<<<<< local mFetchingHistory.clear(); init(); mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset +======= + break; +>>>>>>> other } } +<<<<<<< local +======= + + //unlock the fetcher + mFetcher->lockFetcher(false); + mFreezeHistory = FALSE; + mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset +>>>>>>> other } //called in the main thread and when the fetching queue is empty void LLTextureFetchDebugger::clearHistory() { +<<<<<<< local mClearHistory = TRUE; +======= + mFetchingHistory.clear(); + init(); +>>>>>>> other } void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) { +<<<<<<< local if(worker->mRawImage.isNull() || worker->mFormattedImage.isNull()) { return; } +======= +>>>>>>> other if(mFreezeHistory) { +<<<<<<< local if(mState == REFETCH_VIS_CACHE || mState == REFETCH_VIS_HTTP) { mRefetchedVisPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); @@ -3476,6 +3576,10 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) } } } +======= + mRefetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); + mRefetchedData += worker->mFormattedImage->getDataSize(); +>>>>>>> other return; } @@ -3487,8 +3591,14 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) mDecodedData += worker->mRawImage->getDataSize(); mFetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); +<<<<<<< local mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); +======= + mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); + //mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mHaveAllData ? 0 : worker->mLoadedDiscard, worker->mFormattedImage->getComponents(), + //worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); +>>>>>>> other } void LLTextureFetchDebugger::lockCache() @@ -3505,7 +3615,10 @@ void LLTextureFetchDebugger::debugCacheRead() llassert_always(mState == IDLE); mTimer.reset(); mState = READ_CACHE; +<<<<<<< local mCacheReadTime = -1.f; +======= +>>>>>>> other S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3541,7 +3654,10 @@ void LLTextureFetchDebugger::debugCacheWrite() llassert_always(mState == IDLE); mTimer.reset(); mState = WRITE_CACHE; +<<<<<<< local mCacheWriteTime = -1.f; +======= +>>>>>>> other S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3551,7 +3667,11 @@ void LLTextureFetchDebugger::debugCacheWrite() mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize, mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1, +<<<<<<< local NULL, 0, new LLDebuggerCacheWriteResponder(this, i)); +======= + new LLDebuggerCacheWriteResponder(this, i)); +>>>>>>> other } } } @@ -3570,7 +3690,10 @@ void LLTextureFetchDebugger::debugDecoder() llassert_always(mState == IDLE); mTimer.reset(); mState = DECODING; +<<<<<<< local mDecodingTime = -1.f; +======= +>>>>>>> other S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3606,7 +3729,10 @@ void LLTextureFetchDebugger::debugHTTP() mTimer.reset(); mState = HTTP_FETCHING; +<<<<<<< local mHTTPTime = -1.f; +======= +>>>>>>> other S32 size = mFetchingHistory.size(); for (S32 i = 0 ; i < size ; i++) @@ -3623,12 +3749,19 @@ void LLTextureFetchDebugger::debugHTTP() S32 LLTextureFetchDebugger::fillCurlQueue() { +<<<<<<< local if(mStopDebug) //stop { mNbCurlCompleted = mFetchingHistory.size(); return 0; } +======= + if (mNbCurlRequests == 24) + return mNbCurlRequests; + +>>>>>>> other S32 size = mFetchingHistory.size(); +<<<<<<< local if (mNbCurlRequests == size) //all issued { @@ -3637,14 +3770,25 @@ S32 LLTextureFetchDebugger::fillCurlQueue() S32 counter = 8; mNbCurlRequests = 0; +======= +>>>>>>> other for (S32 i = 0 ; i < size ; i++) { +<<<<<<< local mNbCurlRequests++; +======= +>>>>>>> other if (mFetchingHistory[i].mCurlState != FetchEntry::CURL_NOT_DONE) +<<<<<<< local { +======= +>>>>>>> other continue; +<<<<<<< local } +======= +>>>>>>> other std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[i].mID.asString().c_str(); S32 requestedSize = mFetchingHistory[i].mRequestedSize; // We request the whole file if the size was not set. @@ -3653,11 +3797,24 @@ S32 LLTextureFetchDebugger::fillCurlQueue() requestedSize = (requestedSize == 33554432 ? 0 : requestedSize); std::vector<std::string> headers; headers.push_back("Accept: image/x-j2c"); +<<<<<<< local mCurlGetRequest->getByteRange(texture_url, headers, 0, requestedSize, 0x10000, new LLDebuggerHTTPResponder(this, i)); mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS; counter--; if(counter < 1) +======= + bool res = mCurlGetRequest->getByteRange(texture_url, headers, 0, requestedSize, new LLDebuggerHTTPResponder(this, i)); + if (res) + { + mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS; + mNbCurlRequests++; + // Hack + if (mNbCurlRequests == 24) + break; + } + else +>>>>>>> other { break; } @@ -3670,7 +3827,11 @@ void LLTextureFetchDebugger::debugGLTextureCreation() { llassert_always(mState == IDLE); mState = GL_TEX; +<<<<<<< local mTempTexList.clear(); +======= + std::vector<LLViewerFetchedTexture*> tex_list; +>>>>>>> other S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) @@ -3681,10 +3842,15 @@ void LLTextureFetchDebugger::debugGLTextureCreation() if(tex && !tex->isForSculptOnly()) { tex->destroyGLTexture() ; +<<<<<<< local mTempTexList.push_back(tex); +======= + tex_list.push_back(tex); +>>>>>>> other } } } +<<<<<<< local mGLCreationTime = -1.f; mTempIndex = 0; @@ -3692,33 +3858,61 @@ void LLTextureFetchDebugger::debugGLTextureCreation() return; } +======= +>>>>>>> other +<<<<<<< local bool LLTextureFetchDebugger::processGLCreation(F32 max_time) { +======= +>>>>>>> other mTimer.reset(); +<<<<<<< local bool done = true; S32 size = mFetchingHistory.size(); S32 size1 = mTempTexList.size(); for(; mHistoryListIndex < size && mTempIndex < size1; mHistoryListIndex++) +======= + S32 j = 0 ; + S32 size1 = tex_list.size(); + for(S32 i = 0 ; i < size && j < size1; i++) +>>>>>>> other { +<<<<<<< local if(mFetchingHistory[mHistoryListIndex].mRawImage.notNull()) +======= + if(mFetchingHistory[i].mRawImage.notNull()) +>>>>>>> other { +<<<<<<< local if(mFetchingHistory[mHistoryListIndex].mID == mTempTexList[mTempIndex]->getID()) +======= + if(mFetchingHistory[i].mID == tex_list[j]->getID()) +>>>>>>> other { +<<<<<<< local mTempTexList[mTempIndex]->createGLTexture(mFetchingHistory[mHistoryListIndex].mDecodedLevel, mFetchingHistory[mHistoryListIndex].mRawImage, 0, TRUE, mTempTexList[mTempIndex]->getBoostLevel()); mTempIndex++; +======= + tex_list[j]->createGLTexture(mFetchingHistory[i].mDecodedLevel, mFetchingHistory[i].mRawImage, 0, TRUE, tex_list[j]->getBoostLevel()); + j++; +>>>>>>> other } } +<<<<<<< local if(mTimer.getElapsedTimeF32() > max_time) { done = false; break; } +======= +>>>>>>> other } +<<<<<<< local if(mGLCreationTime < 0.f) { mGLCreationTime = mTimer.getElapsedTimeF32() ; @@ -3729,6 +3923,10 @@ bool LLTextureFetchDebugger::processGLCreation(F32 max_time) } return done; +======= + mGLCreationTime = mTimer.getElapsedTimeF32() ; + return; +>>>>>>> other } //clear fetching results of all textures. @@ -3745,6 +3943,7 @@ void LLTextureFetchDebugger::clearTextures() } } +<<<<<<< local void LLTextureFetchDebugger::makeRefetchList() { mRefetchList.clear(); @@ -3788,19 +3987,28 @@ void LLTextureFetchDebugger::scanRefetchList() } } +======= +>>>>>>> other void LLTextureFetchDebugger::debugRefetchVisibleFromCache() { llassert_always(mState == IDLE); mState = REFETCH_VIS_CACHE; clearTextures(); +<<<<<<< local mFetcher->setLoadSource(LLTextureFetch::FROM_ALL); +======= + +>>>>>>> other mTimer.reset(); mFetcher->lockFetcher(false); +<<<<<<< local mRefetchVisCacheTime = -1.f; mRefetchedVisData = 0; mRefetchedVisPixels = 0; +======= +>>>>>>> other } void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP() @@ -3808,16 +4016,27 @@ void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP() llassert_always(mState == IDLE); mState = REFETCH_VIS_HTTP; +<<<<<<< local +======= + clearCache(); +>>>>>>> other clearTextures(); +<<<<<<< local mFetcher->setLoadSource(LLTextureFetch::FROM_HTTP_ONLY); +======= +>>>>>>> other mTimer.reset(); mFetcher->lockFetcher(false); +<<<<<<< local mRefetchVisHTTPTime = -1.f; mRefetchedVisData = 0; mRefetchedVisPixels = 0; +======= +>>>>>>> other } +<<<<<<< local void LLTextureFetchDebugger::debugRefetchAllFromCache() { llassert_always(mState == IDLE); @@ -3853,15 +4072,21 @@ void LLTextureFetchDebugger::debugRefetchAllFromHTTP() } bool LLTextureFetchDebugger::update(F32 max_time) +======= +bool LLTextureFetchDebugger::update() +>>>>>>> other { switch(mState) { +<<<<<<< local case START_DEBUG: if(processStartDebug(max_time)) { mState = IDLE; } break; +======= +>>>>>>> other case READ_CACHE: if(!mTextureCache->update(1)) { @@ -3888,7 +4113,10 @@ bool LLTextureFetchDebugger::update(F32 max_time) break; case HTTP_FETCHING: mCurlGetRequest->process(); +<<<<<<< local mCurlGetRequest->nextRequests(); +======= +>>>>>>> other LLCurl::getCurlThread()->update(1); if (!fillCurlQueue() && mNbCurlCompleted == mFetchingHistory.size()) { @@ -3897,27 +4125,43 @@ bool LLTextureFetchDebugger::update(F32 max_time) } break; case GL_TEX: +<<<<<<< local if(processGLCreation(max_time)) { mState = IDLE; mTempTexList.clear(); } +======= + mState = IDLE; +>>>>>>> other break; case REFETCH_VIS_CACHE: if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) { +<<<<<<< local mRefetchVisCacheTime = mTimer.getElapsedTimeF32() ; +======= + mRefetchVisCacheTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; +>>>>>>> other mState = IDLE; mFetcher->lockFetcher(true); +<<<<<<< local mFetcher->resetLoadSource(); +======= +>>>>>>> other } break; case REFETCH_VIS_HTTP: if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) { +<<<<<<< local mRefetchVisHTTPTime = mTimer.getElapsedTimeF32() ; +======= + mRefetchVisHTTPTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; +>>>>>>> other mState = IDLE; mFetcher->lockFetcher(true); +<<<<<<< local mFetcher->resetLoadSource(); } break; @@ -3950,6 +4194,8 @@ bool LLTextureFetchDebugger::update(F32 max_time) mFetcher->resetLoadSource(); mRefetchList.clear(); mRefetchNonVis = FALSE; +======= +>>>>>>> other } break; default: @@ -3990,6 +4236,10 @@ void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& ch const LLIOPipe::buffer_ptr_t& buffer, bool partial, bool success) { +<<<<<<< local +======= + mNbCurlRequests--; +>>>>>>> other if (success) { mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE; @@ -4003,7 +4253,11 @@ void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& ch U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size); buffer->readAfter(channels.in(), NULL, d_buffer, data_size); +<<<<<<< local mFetchingHistory[id].mFormattedImage = NULL; +======= + llassert_always(mFetchingHistory[id].mFormattedImage.isNull()); +>>>>>>> other { // For now, create formatted image based on extension std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[id].mID.asString().c_str(); @@ -4025,7 +4279,10 @@ void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& ch { // Fetch will have to be redone mFetchingHistory[id].mCurlState = FetchEntry::CURL_NOT_DONE; +<<<<<<< local mNbCurlRequests--; +======= +>>>>>>> other } else //skip { diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index f5072a79f1..8c3d762319 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -209,6 +209,7 @@ public: // reporting due to either startup or a problem POSTing data. static volatile bool svMetricsDataBreak; +<<<<<<< local public: //debug use enum e_tex_source @@ -217,26 +218,37 @@ public: FROM_HTTP_ONLY, INVALID_SOURCE }; +======= +>>>>>>> other private: //debug use LLTextureFetchDebugger* mFetchDebugger; bool mFetcherLocked; +<<<<<<< local e_tex_source mFetchSource; e_tex_source mOriginFetchSource; +======= +>>>>>>> other public: //debug use LLTextureFetchDebugger* getFetchDebugger() { return mFetchDebugger;} void lockFetcher(bool lock) { mFetcherLocked = lock;} +<<<<<<< local void setLoadSource(e_tex_source source) {mFetchSource = source;} void resetLoadSource() {mFetchSource = mOriginFetchSource;} bool canLoadFromCache() { return mFetchSource != FROM_HTTP_ONLY;} +======= +>>>>>>> other }; //debug use +<<<<<<< local class LLViewerFetchedTexture; +======= +>>>>>>> other class LLTextureFetchDebugger { friend class LLTextureFetch; @@ -248,7 +260,10 @@ public: enum e_debug_state { IDLE = 0, +<<<<<<< local START_DEBUG, +======= +>>>>>>> other READ_CACHE, WRITE_CACHE, DECODING, @@ -311,15 +326,22 @@ private: F32 mTotalFetchingTime; F32 mRefetchVisCacheTime; F32 mRefetchVisHTTPTime; +<<<<<<< local F32 mRefetchAllCacheTime; F32 mRefetchAllHTTPTime; +======= +>>>>>>> other LLTimer mTimer; LLTextureFetch* mFetcher; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; +<<<<<<< local LLCurlTextureRequest* mCurlGetRequest; +======= + LLCurlRequest* mCurlGetRequest; +>>>>>>> other S32 mNumFetchedTextures; S32 mNumCacheHits; @@ -333,39 +355,71 @@ private: U32 mRenderedDecodedData; U32 mFetchedPixels; U32 mRenderedPixels; +<<<<<<< local U32 mRefetchedVisData; U32 mRefetchedVisPixels; U32 mRefetchedAllData; U32 mRefetchedAllPixels; +======= + U32 mRefetchedData; + U32 mRefetchedPixels; +>>>>>>> other BOOL mFreezeHistory; +<<<<<<< local BOOL mStopDebug; BOOL mClearHistory; BOOL mRefetchNonVis; +======= +>>>>>>> other std::string mHTTPUrl; S32 mNbCurlRequests; S32 mNbCurlCompleted; +<<<<<<< local std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> > mRefetchList; std::vector< LLPointer<LLViewerFetchedTexture> > mTempTexList; S32 mTempIndex; S32 mHistoryListIndex; +======= +>>>>>>> other public: +<<<<<<< local bool update(F32 max_time); //called in the main thread once per frame +======= + bool update(); //called in the main thread once per frame +>>>>>>> other //fetching history void clearHistory(); void addHistoryEntry(LLTextureFetchWorker* worker); +<<<<<<< local void setCurlGetRequest(LLCurlTextureRequest* request) { mCurlGetRequest = request;} LLCurlTextureRequest* getCurlGetRequest() { return mCurlGetRequest;} +======= + void setCurlGetRequest(LLCurlRequest* request) { mCurlGetRequest = request;} + + void startDebug(); + void stopDebug(); //stop everything + void debugCacheRead(); + void debugCacheWrite(); + void debugHTTP(); + void debugDecoder(); + void debugGLTextureCreation(); + void debugRefetchVisibleFromCache(); + void debugRefetchVisibleFromHTTP(); +>>>>>>> other +<<<<<<< local void startWork(e_debug_state state); void setStopDebug() {mStopDebug = TRUE;} void tryToStopDebug(); //stop everything +======= +>>>>>>> other void callbackCacheRead(S32 id, bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal); void callbackCacheWrite(S32 id, bool success); @@ -389,10 +443,15 @@ public: U32 getRenderedDecodedData() {return mRenderedDecodedData;} U32 getFetchedPixels() {return mFetchedPixels;} U32 getRenderedPixels() {return mRenderedPixels;} +<<<<<<< local U32 getRefetchedVisData() {return mRefetchedVisData;} U32 getRefetchedVisPixels() {return mRefetchedVisPixels;} U32 getRefetchedAllData() {return mRefetchedAllData;} U32 getRefetchedAllPixels() {return mRefetchedAllPixels;} +======= + U32 getRefetchedData() {return mRefetchedData;} + U32 getRefetchedPixels() {return mRefetchedPixels;} +>>>>>>> other F32 getCacheReadTime() {return mCacheReadTime;} F32 getCacheWriteTime() {return mCacheWriteTime;} @@ -402,15 +461,21 @@ public: F32 getTotalFetchingTime() {return mTotalFetchingTime;} F32 getRefetchVisCacheTime() {return mRefetchVisCacheTime;} F32 getRefetchVisHTTPTime() {return mRefetchVisHTTPTime;} +<<<<<<< local F32 getRefetchAllCacheTime() {return mRefetchAllCacheTime;} F32 getRefetchAllHTTPTime() {return mRefetchAllHTTPTime;} +======= +>>>>>>> other private: void init(); void clearTextures();//clear fetching results of all textures. void clearCache(); +<<<<<<< local void makeRefetchList(); void scanRefetchList(); +======= +>>>>>>> other void lockFetcher(); void unlockFetcher(); @@ -423,6 +488,7 @@ private: S32 fillCurlQueue(); +<<<<<<< local void startDebug(); void debugCacheRead(); void debugCacheWrite(); @@ -437,6 +503,8 @@ private: bool processStartDebug(F32 max_time); bool processGLCreation(F32 max_time); +======= +>>>>>>> other private: static bool sDebuggerEnabled; public: diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index a8060649ba..a473ee7ce0 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -52,7 +52,7 @@ const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL; LLToastNotifyPanel::button_click_signal_t LLToastNotifyPanel::sButtonClickSignal; -LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification, const LLRect& rect, bool show_images) : +LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, const LLRect& rect, bool show_images) : LLToastPanel(notification), mTextBox(NULL), mInfoPanel(NULL), @@ -536,7 +536,7 @@ void LLToastNotifyPanel::onToastPanelButtonClicked(const LLUUID& notification_id } } -void LLToastNotifyPanel::disableRespondedOptions(LLNotificationPtr& notification) +void LLToastNotifyPanel::disableRespondedOptions(const LLNotificationPtr& notification) { LLSD response = notification->getResponse(); for (LLSD::map_const_iterator response_it = response.beginMap(); diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index 57711b3d80..db517ec858 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -60,7 +60,7 @@ public: * @deprecated if you intend to instantiate LLToastNotifyPanel - it's point to * implement right class for desired toast panel. @see LLGenericTipPanel as example. */ - LLToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null, bool show_images = true); + LLToastNotifyPanel(const LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null, bool show_images = true); virtual ~LLToastNotifyPanel(); LLPanel * getControlPanel() { return mControlPanel; } @@ -118,7 +118,7 @@ protected: /** * Process response data. Will disable selected options */ - void disableRespondedOptions(LLNotificationPtr& notification); + void disableRespondedOptions(const LLNotificationPtr& notification); bool mIsTip; bool mAddedDefaultBtn; diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index d2a4ce8745..c33fde99c5 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -29,7 +29,9 @@ #include "llpanelgenerictip.h" #include "llpanelonlinestatus.h" #include "llnotifications.h" +#include "lltoastnotifypanel.h" #include "lltoastpanel.h" +#include "lltoastscriptquestion.h" //static const S32 LLToastPanel::MIN_PANEL_HEIGHT = 40; // VPAD(4)*2 + ICON_HEIGHT(32) @@ -106,6 +108,17 @@ LLToastPanel* LLToastPanel::buidPanelFromNotification( res = new LLPanelGenericTip(notification); } } + else if("notify" == notification->getType()) + { + if (notification->getPriority() == NOTIFICATION_PRIORITY_CRITICAL) + { + res = new LLToastScriptQuestion(notification); + } + else + { + res = new LLToastNotifyPanel(notification); + } + } /* else if(...) create all other specific non-public toast panel diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp new file mode 100644 index 0000000000..feeb8ca77b --- /dev/null +++ b/indra/newview/lltoastscriptquestion.cpp @@ -0,0 +1,130 @@ +/** + * @file lltoastscriptquestion.cpp + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, 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 "llbutton.h" +#include "llnotifications.h" +#include "lltoastscriptquestion.h" + +const int LEFT_PAD = 10; +const int BUTTON_HEIGHT = 27; +const int MAX_LINES_COUNT = 50; + +LLToastScriptQuestion::LLToastScriptQuestion(const LLNotificationPtr& notification) +: +LLToastPanel(notification) +{ + buildFromFile("panel_script_question_toast.xml"); +} + +BOOL LLToastScriptQuestion::postBuild() +{ + createButtons(); + + LLTextBox* mMessage = getChild<LLTextBox>("top_info_message"); + LLTextBox* mFooter = getChild<LLTextBox>("bottom_info_message"); + + mMessage->setValue(mNotification->getMessage()); + mFooter->setValue(mNotification->getFooter()); + + snapToMessageHeight(); + + return TRUE; +} +void LLToastScriptQuestion::snapToMessageHeight() +{ + LLTextBox* mMessage = getChild<LLTextBox>("top_info_message"); + LLTextBox* mFooter = getChild<LLTextBox>("bottom_info_message"); + if (!mMessage || !mFooter) + { + return; + } + + if (mMessage->getVisible() && mFooter->getVisible()) + { + S32 heightDelta = 0; + S32 maxTextHeight = (mMessage->getDefaultFont()->getLineHeight() * MAX_LINES_COUNT) + + (mFooter->getDefaultFont()->getLineHeight() * MAX_LINES_COUNT); + + LLRect messageRect = mMessage->getRect(); + LLRect footerRect = mFooter->getRect(); + + S32 oldTextHeight = messageRect.getHeight() + footerRect.getHeight(); + + S32 requiredTextHeight = mMessage->getTextBoundingRect().getHeight() + mFooter->getTextBoundingRect().getHeight(); + S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); + + heightDelta = newTextHeight - oldTextHeight - heightDelta; + + reshape( getRect().getWidth(), llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT)); + } +} + +void LLToastScriptQuestion::createButtons() +{ + LLNotificationFormPtr form = mNotification->getForm(); + int num_elements = form->getNumElements(); + int buttons_width = 0; + + for (int i = 0; i < num_elements; ++i) + { + LLSD form_element = form->getElement(i); + if ("button" == form_element["type"].asString()) + { + LLButton::Params p; + const LLFontGL* font = LLFontGL::getFontSansSerif(); + p.name(form_element["name"].asString()); + p.label(form_element["text"].asString()); + p.layout("topleft"); + p.font(font); + p.rect.height(BUTTON_HEIGHT); + p.click_callback.function(boost::bind(&LLToastScriptQuestion::onButtonClicked, this, form_element["name"].asString())); + p.rect.left = LEFT_PAD; + p.rect.width = font->getWidth(form_element["text"].asString()); + p.auto_resize = true; + p.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); + p.image_color(LLUIColorTable::instance().getColor("ButtonCautionImageColor")); + p.image_color_disabled(LLUIColorTable::instance().getColor("ButtonCautionImageColor")); + + LLButton* button = LLUICtrlFactory::create<LLButton>(p); + button->autoResize(); + getChild<LLPanel>("buttons_panel")->addChild(button); + + LLRect rect = button->getRect(); + rect.setLeftTopAndSize(buttons_width, rect.mTop, rect.getWidth(), rect.getHeight()); + button->setRect(rect); + + buttons_width += rect.getWidth() + LEFT_PAD; + } + } +} + +void LLToastScriptQuestion::onButtonClicked(std::string btn_name) +{ + LLSD response = mNotification->getResponseTemplate(); + response[btn_name] = true; + mNotification->respond(response); +} diff --git a/indra/newview/lltoastscriptquestion.h b/indra/newview/lltoastscriptquestion.h new file mode 100644 index 0000000000..3a557f60f6 --- /dev/null +++ b/indra/newview/lltoastscriptquestion.h @@ -0,0 +1,49 @@ +/** + * @file lltoastscriptquestion.h + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, 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 "lltoastpanel.h" + +#ifndef LLTOASTSCRIPTQUESTION_H_ +#define LLTOASTSCRIPTQUESTION_H_ + +class LLToastScriptQuestion : public LLToastPanel +{ + LOG_CLASS(LLToastScriptQuestion); + +public: + LLToastScriptQuestion(const LLNotificationPtr& notification); + virtual BOOL postBuild(); + virtual ~LLToastScriptQuestion(){}; + +private: + void snapToMessageHeight(); + + void createButtons(); + void onButtonClicked(std::string btn_name); +}; + +#endif /* LLTOASTSCRIPTQUESTION_H_ */ diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 48e4813205..34e916fec0 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -93,6 +93,7 @@ #include "lltoolpie.h" #include "lltoolselectland.h" #include "lltrans.h" +#include "llviewerdisplay.h" //for gWindowResized #include "llviewergenericmessage.h" #include "llviewerhelp.h" #include "llviewermenufile.h" // init_menu_file() @@ -205,7 +206,7 @@ BOOL enable_take(); void handle_take(); void handle_object_show_inspector(); void handle_avatar_show_inspector(); -bool confirm_take(const LLSD& notification, const LLSD& response); +bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle); void handle_buy_object(LLSaleInfo sale_info); void handle_buy_contents(LLSaleInfo sale_info); @@ -1173,6 +1174,7 @@ class LLAdvancedToggleWireframe : public view_listener_t bool handleEvent(const LLSD& userdata) { gUseWireframe = !(gUseWireframe); + gWindowResized = TRUE; LLPipeline::updateRenderDeferred(); gPipeline.resetVertexBuffers(); return true; @@ -4511,7 +4513,10 @@ void handle_take() LLNotification::Params params("ConfirmObjectTakeLock"); params.payload(payload); - params.functor.function(confirm_take); + // MAINT-290 + // Reason: Showing the confirmation dialog resets object selection, thus there is nothing to derez. + // Fix: pass selection to the confirm_take, so that selection doesn't "die" after confirmation dialog is opened + params.functor.function(boost::bind(confirm_take, _1, _2, LLSelectMgr::instance().getSelection())); if(locked_but_takeable_object || !you_own_everything) @@ -4564,7 +4569,7 @@ void handle_avatar_show_inspector() -bool confirm_take(const LLSD& notification, const LLSD& response) +bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(enable_take() && (option == 0)) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 854e2bea52..a9bff67f40 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2706,7 +2706,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_SESSION_SEND: { - if (!is_linden && is_busy) + if (is_busy) { return; } @@ -5976,16 +5976,21 @@ void process_script_question(LLMessageSystem *msg, void **user_data) args["OBJECTNAME"] = object_name; args["NAME"] = LLCacheName::cleanFullName(owner_name); + BOOL has_not_only_debit = questions ^ LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_DEBIT]; // check the received permission flags against each permission for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++) { if (questions & LSCRIPTRunTimePermissionBits[i]) { count++; - script_question += " " + LLTrans::getString(SCRIPT_QUESTIONS[i]) + "\n"; // check whether permission question should cause special caution dialog caution |= (SCRIPT_QUESTION_IS_CAUTION[i]); + + if (("ScriptTakeMoney" == SCRIPT_QUESTIONS[i]) && has_not_only_debit) + continue; + + script_question += " " + LLTrans::getString(SCRIPT_QUESTIONS[i]) + "\n"; } } args["QUESTIONS"] = script_question; @@ -6001,6 +6006,10 @@ void process_script_question(LLMessageSystem *msg, void **user_data) // check whether cautions are even enabled or not if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) { + if (caution) + { + args["FOOTERTEXT"] = (count > 1) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n\n" + script_question : ""; + } // display the caution permissions prompt LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload); } diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index f738b84bb9..6c8a827ba3 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -57,6 +57,8 @@ #include "lldeleteutils.h" #include "imageids.h" #include "indra_constants.h" +#include "llinitparam.h" + //#include "linden_common.h" //#include "llpreprocessor.h" #include "llallocator.h" @@ -124,7 +126,5 @@ // Library includes from llmessage project #include "llcachename.h" -// Library includes from llxuixml -#include "llinitparam.h" #endif diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 1226c98f1c..73f7d0d7ee 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -410,11 +410,15 @@ void LLViewerTextureManager::cleanup() void LLViewerTexture::initClass() { LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ; +<<<<<<< local if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled")) { sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio"); } +======= + sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio"); +>>>>>>> other } // static @@ -1315,6 +1319,7 @@ void LLViewerFetchedTexture::cleanup() mCachedRawDiscardLevel = -1 ; mCachedRawImageReady = FALSE ; mSavedRawImage = NULL ; + mSavedRawDiscardLevel = -1; } //access the fast cache @@ -2216,10 +2221,14 @@ bool LLViewerFetchedTexture::updateFetch() void LLViewerFetchedTexture::clearFetchedResults() { +<<<<<<< local if(mNeedsCreateTexture || mIsFetching) { return ; } +======= + llassert_always(!mNeedsCreateTexture && !mIsFetching); +>>>>>>> other cleanup(); destroyGLTexture(); @@ -2234,13 +2243,24 @@ void LLViewerFetchedTexture::forceToDeleteRequest() { if (mHasFetcher) { +<<<<<<< local +======= + LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); +>>>>>>> other mHasFetcher = FALSE; mIsFetching = FALSE ; +<<<<<<< local +======= + resetTextureStats(); +>>>>>>> other } +<<<<<<< local resetTextureStats(); mDesiredDiscardLevel = getMaxDiscardLevel() + 1; +======= +>>>>>>> other } void LLViewerFetchedTexture::setIsMissingAsset() @@ -3420,10 +3440,14 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL sMediaMap.insert(std::make_pair(id, this)); mGLTexturep = gl_image ; + if(mGLTexturep.isNull()) { generateGLTexture() ; } + + mGLTexturep->setAllowCompression(false); + mGLTexturep->setNeedsAlphaAndPickMask(FALSE) ; mIsPlaying = FALSE ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index c2747c980e..2ea9a07e9a 100644..100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -264,6 +264,9 @@ protected: void reorganizeVolumeList() ; void setTexelsPerImage(); private: + friend class LLBumpImageList; + friend class LLUIImageList; + //note: do not make this function public. /*virtual*/ LLImageGL* getGLTexture() const ; virtual void switchToCachedImage(); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 385c61f6c7..ddfb89b03b 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -58,7 +58,11 @@ #include "pipeline.h" #include "llappviewer.h" #include "llxuiparser.h" +<<<<<<< local #include "llviewerdisplay.h" +======= +#include "llagent.h" +>>>>>>> other //////////////////////////////////////////////////////////////////////////// @@ -609,15 +613,25 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats"); void LLViewerTextureList::updateImages(F32 max_time) { +<<<<<<< local static BOOL cleared = FALSE; if(gTeleportDisplay && !cleared) +======= + if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) +>>>>>>> other { clearFetchingRequests(); +<<<<<<< local gPipeline.clearRebuildGroups(); cleared = TRUE; +======= +>>>>>>> other return; } +<<<<<<< local cleared = FALSE; +======= +>>>>>>> other LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec()); @@ -693,13 +707,24 @@ void LLViewerTextureList::clearFetchingRequests() return; } +<<<<<<< local LLAppViewer::getTextureFetch()->deleteAllRequests(); +======= +>>>>>>> other for (image_priority_list_t::iterator iter = mImageList.begin(); iter != mImageList.end(); ++iter) { +<<<<<<< local LLViewerFetchedTexture* imagep = *iter; imagep->forceToDeleteRequest() ; +======= + LLViewerFetchedTexture* image = *iter; + if(image->hasFetcher()) + { + image->forceToDeleteRequest() ; + } +>>>>>>> other } } @@ -1556,6 +1581,9 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st imagep->setAddressMode(LLTexUnit::TAM_CLAMP); + //don't compress UI images + imagep->getGLTexture()->setAllowCompression(false); + //all UI images are non-deletable imagep->setNoDelete(); diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 3dda973d3f..96a3346376 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -111,7 +111,10 @@ public: void doPrefetchImages(); void clearFetchingRequests(); +<<<<<<< local void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level); +======= +>>>>>>> other static S32 getMinVideoRamSetting(); static S32 getMaxVideoRamSetting(bool get_recommended = false); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ecd76f5495..39e330ad66 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -534,7 +534,10 @@ public: } - addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024))); + addText(xpos, ypos, llformat("%d MB Index Data (%d MB Pooled, %d KIndices)", LLVertexBuffer::sAllocatedIndexBytes/(1024*1024), LLVBOPool::sIndexBytesPooled/(1024*1024), LLVertexBuffer::sIndexCount/1024)); + ypos += y_inc; + + addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled, %d KVerts)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024), LLVertexBuffer::sVertexCount/1024)); ypos += y_inc; addText(xpos, ypos, llformat("%d Vertex Buffers", LLVertexBuffer::sGLCount)); @@ -742,40 +745,41 @@ public: if (gSavedSettings.getBOOL("DebugShowTextureInfo")) { LLViewerObject* objectp = NULL ; - //objectp = = gAgentCamera.getFocusObject(); LLSelectNode* nodep = LLSelectMgr::instance().getHoverNode(); if (nodep) { - objectp = nodep->getObject(); + objectp = nodep->getObject(); } + if (objectp && !objectp->isDead()) { S32 num_faces = objectp->mDrawable->getNumFaces() ; - + std::set<LLViewerFetchedTexture*> tex_list; + for(S32 i = 0 ; i < num_faces; i++) { LLFace* facep = objectp->mDrawable->getFace(i) ; if(facep) - { - //addText(xpos, ypos, llformat("ts_min: %.3f ts_max: %.3f tt_min: %.3f tt_max: %.3f", facep->mTexExtents[0].mV[0], facep->mTexExtents[1].mV[0], - // facep->mTexExtents[0].mV[1], facep->mTexExtents[1].mV[1])); - //ypos += y_inc; - - addText(xpos, ypos, llformat("v_size: %.3f: p_size: %.3f", facep->getVirtualSize(), facep->getPixelArea())); - ypos += y_inc; - - //const LLTextureEntry *tep = facep->getTextureEntry(); - //if(tep) - //{ - // addText(xpos, ypos, llformat("scale_s: %.3f: scale_t: %.3f", tep->mScaleS, tep->mScaleT)) ; - // ypos += y_inc; - //} - - LLViewerTexture* tex = facep->getTexture() ; + { + LLViewerFetchedTexture* tex = dynamic_cast<LLViewerFetchedTexture*>(facep->getTexture()) ; if(tex) { - addText(xpos, ypos, llformat("ID: %s v_size: %.3f", tex->getID().asString().c_str(), tex->getMaxVirtualSize())); + if(tex_list.find(tex) != tex_list.end()) + { + continue ; //already displayed. + } + tex_list.insert(tex); + + std::string uuid_str; + tex->getID().toString(uuid_str); + uuid_str = uuid_str.substr(0,7); + + addText(xpos, ypos, llformat("ID: %s v_size: %.3f", uuid_str.c_str(), tex->getMaxVirtualSize())); + ypos += y_inc; + + addText(xpos, ypos, llformat("discard level: %d desired level: %d Missing: %s", tex->getDiscardLevel(), + tex->getDesiredDiscardLevel(), tex->isMissingAsset() ? "Y" : "N")); ypos += y_inc; } } diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index df1d3f2955..820d1d73e1 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -27,8 +27,6 @@ #include "llviewerprecompiledheaders.h" #include "llvoicevivox.h" -#include <boost/tokenizer.hpp> - #include "llsdutil.h" // Linden library includes @@ -47,6 +45,7 @@ #include "llbase64.h" #include "llviewercontrol.h" #include "llappviewer.h" // for gDisconnected, gDisableVoice +#include "llprocess.h" // Viewer includes #include "llmutelist.h" // to check for muted avatars @@ -242,59 +241,21 @@ void LLVivoxVoiceClientCapResponder::result(const LLSD& content) } } - - -#if LL_WINDOWS -static HANDLE sGatewayHandle = 0; +static LLProcessPtr sGatewayPtr; static bool isGatewayRunning() { - bool result = false; - if(sGatewayHandle != 0) - { - DWORD waitresult = WaitForSingleObject(sGatewayHandle, 0); - if(waitresult != WAIT_OBJECT_0) - { - result = true; - } - } - return result; -} -static void killGateway() -{ - if(sGatewayHandle != 0) - { - TerminateProcess(sGatewayHandle,0); - } -} - -#else // Mac and linux - -static pid_t sGatewayPID = 0; -static bool isGatewayRunning() -{ - bool result = false; - if(sGatewayPID != 0) - { - // A kill with signal number 0 has no effect, just does error checking. It should return an error if the process no longer exists. - if(kill(sGatewayPID, 0) == 0) - { - result = true; - } - } - return result; + return sGatewayPtr && sGatewayPtr->isRunning(); } static void killGateway() { - if(sGatewayPID != 0) + if (sGatewayPtr) { - kill(sGatewayPID, SIGTERM); + sGatewayPtr->kill(); } } -#endif - /////////////////////////////////////////////////////////////////////////////////////////////// LLVivoxVoiceClient::LLVivoxVoiceClient() : @@ -790,7 +751,7 @@ void LLVivoxVoiceClient::stateMachine() } else if(!isGatewayRunning()) { - if(true) + if (true) // production build, not test { // Launch the voice daemon @@ -809,102 +770,33 @@ void LLVivoxVoiceClient::stateMachine() #endif // See if the vivox executable exists llstat s; - if(!LLFile::stat(exe_path, &s)) + if (!LLFile::stat(exe_path, &s)) { // vivox executable exists. Build the command line and launch the daemon. + LLProcess::Params params; + params.executable = exe_path; // SLIM SDK: these arguments are no longer necessary. // std::string args = " -p tcp -h -c"; - std::string args; - std::string cmd; std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); - if(loglevel.empty()) { loglevel = "-1"; // turn logging off completely } - - args += " -ll "; - args += loglevel; - - LL_DEBUGS("Voice") << "Args for SLVoice: " << args << LL_ENDL; - -#if LL_WINDOWS - PROCESS_INFORMATION pinfo; - STARTUPINFOA sinfo; - - memset(&sinfo, 0, sizeof(sinfo)); - - std::string exe_dir = gDirUtilp->getAppRODataDir(); - cmd = "SLVoice.exe"; - cmd += args; - - // So retarded. Windows requires that the second parameter to CreateProcessA be writable (non-const) string... - char *args2 = new char[args.size() + 1]; - strcpy(args2, args.c_str()); - if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo)) - { -// DWORD dwErr = GetLastError(); - } - else - { - // foo = pinfo.dwProcessId; // get your pid here if you want to use it later on - // CloseHandle(pinfo.hProcess); // stops leaks - nothing else - sGatewayHandle = pinfo.hProcess; - CloseHandle(pinfo.hThread); // stops leaks - nothing else - } - - delete[] args2; -#else // LL_WINDOWS - // This should be the same for mac and linux - { - std::vector<std::string> arglist; - arglist.push_back(exe_path); - - // Split the argument string into separate strings for each argument - typedef boost::tokenizer<boost::char_separator<char> > tokenizer; - boost::char_separator<char> sep(" "); - tokenizer tokens(args, sep); - tokenizer::iterator token_iter; - for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) - { - arglist.push_back(*token_iter); - } - - // create an argv vector for the child process - char **fakeargv = new char*[arglist.size() + 1]; - int i; - for(i=0; i < arglist.size(); i++) - fakeargv[i] = const_cast<char*>(arglist[i].c_str()); + params.args.add("-ll"); + params.args.add(loglevel); + params.cwd = gDirUtilp->getAppRODataDir(); + sGatewayPtr = LLProcess::create(params); - fakeargv[i] = NULL; - - fflush(NULL); // flush all buffers before the child inherits them - pid_t id = vfork(); - if(id == 0) - { - // child - execv(exe_path.c_str(), fakeargv); - - // If we reach this point, the exec failed. - // Use _exit() instead of exit() per the vfork man page. - _exit(0); - } - - // parent - delete[] fakeargv; - sGatewayPID = id; - } -#endif // LL_WINDOWS mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort")); - } + } else { LL_INFOS("Voice") << exe_path << " not found." << LL_ENDL; - } + } } else - { + { // SLIM SDK: port changed from 44124 to 44125. // We can connect to a client gateway running on another host. This is useful for testing. // To do this, launch the gateway on a nearby host like this: diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4ebe23fd92..b5d173346e 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4123,6 +4123,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) group->mGeometryBytes = 0; group->mSurfaceArea = 0; + //cache object box size since it might be used for determining visibility + group->mObjectBoxSize = group->mObjectBounds[1].getLength3().getF32(); + group->clearDrawMap(); mFaceList.clear(); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 3d971e738e..b061c90d98 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -839,7 +839,6 @@ void LLWorld::updateWaterObjects() // Now, get a list of the holes S32 x, y; - F32 water_height = gAgent.getRegion()->getWaterHeight() + 256.f; for (x = min_x; x <= max_x; x += rwidth) { for (y = min_y; y <= max_y; y += rwidth) @@ -851,7 +850,7 @@ void LLWorld::updateWaterObjects() waterp->setUseTexture(FALSE); waterp->setPositionGlobal(LLVector3d(x + rwidth/2, y + rwidth/2, - water_height)); + 256.f+DEFAULT_WATER_HEIGHT)); waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f)); gPipeline.createObject(waterp); mHoleWaterObjects.push_back(waterp); @@ -908,7 +907,7 @@ void LLWorld::updateWaterObjects() } waterp->setRegion(gAgent.getRegion()); - LLVector3d water_pos(water_center_x, water_center_y, water_height) ; + LLVector3d water_pos(water_center_x, water_center_y, 256.f+DEFAULT_WATER_HEIGHT) ; LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f); //stretch out to horizon diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index cf7ca1a218..09cb31d11f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -187,6 +187,7 @@ F32 LLPipeline::RenderShadowFOVCutoff; BOOL LLPipeline::CameraOffset; F32 LLPipeline::CameraMaxCoF; F32 LLPipeline::CameraDoFResScale; +F32 LLPipeline::RenderAutoHideSurfaceAreaLimit; const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f; @@ -592,6 +593,7 @@ void LLPipeline::init() gSavedSettings.getControl("CameraOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); gSavedSettings.getControl("CameraMaxCoF")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); gSavedSettings.getControl("CameraDoFResScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); + gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); } LLPipeline::~LLPipeline() @@ -846,9 +848,10 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (shadow_detail > 0) { //allocate 4 sun shadow maps + U32 sun_shadow_map_width = ((U32(resX*scale)+1)&~1); // must be even to avoid a stripe in the horizontal shadow blur for (U32 i = 0; i < 4; i++) { - if (!mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false; + if (!mShadow[i].allocate(sun_shadow_map_width,U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false; } } else @@ -864,9 +867,10 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (shadow_detail > 1) { //allocate two spot shadow maps + U32 spot_shadow_map_width = width; for (U32 i = 4; i < 6; i++) { - if (!mShadow[i].allocate(width, height, 0, TRUE, FALSE)) return false; + if (!mShadow[i].allocate(spot_shadow_map_width, height, 0, TRUE, FALSE)) return false; } } else @@ -1015,6 +1019,7 @@ void LLPipeline::refreshCachedSettings() CameraOffset = gSavedSettings.getBOOL("CameraOffset"); CameraMaxCoF = gSavedSettings.getF32("CameraMaxCoF"); CameraDoFResScale = gSavedSettings.getF32("CameraDoFResScale"); + RenderAutoHideSurfaceAreaLimit = gSavedSettings.getF32("RenderAutoHideSurfaceAreaLimit"); updateRenderDeferred(); } @@ -1136,7 +1141,7 @@ void LLPipeline::createGLBuffers() LLImageGL::generateTextures(1, &mNoiseMap); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } @@ -1151,7 +1156,7 @@ void LLPipeline::createGLBuffers() LLImageGL::generateTextures(1, &mTrueNoiseMap); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTrueNoiseMap); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } @@ -1207,7 +1212,7 @@ void LLPipeline::createLUTBuffers() LLImageGL::generateTextures(1, &mLightFunc); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R8, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R8, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); @@ -3390,7 +3395,9 @@ void LLPipeline::postSort(LLCamera& camera) { LLSpatialGroup* group = *i; if (sUseOcclusion && - group->isOcclusionState(LLSpatialGroup::OCCLUDED)) + group->isOcclusionState(LLSpatialGroup::OCCLUDED) || + (RenderAutoHideSurfaceAreaLimit > 0.f && + group->mSurfaceArea > RenderAutoHideSurfaceAreaLimit*llmax(group->mObjectBoxSize, 10.f))) { continue; } @@ -8318,7 +8325,7 @@ static LLFastTimer::DeclareTimer FTM_SHADOW_RENDER("Render Shadows"); static LLFastTimer::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow"); static LLFastTimer::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow"); -void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion) +void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width) { LLFastTimer t(FTM_SHADOW_RENDER); @@ -8409,7 +8416,8 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera LLFastTimer ftm(FTM_SHADOW_ALPHA); gDeferredShadowAlphaMaskProgram.bind(); gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f); - + gDeferredShadowAlphaMaskProgram.uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width); + U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | @@ -9262,11 +9270,13 @@ void LLPipeline::generateSunShadow(LLCamera& camera) mShadow[j].getViewport(gGLViewport); mShadow[j].clear(); + U32 target_width = mShadow[j].getWidth(); + { static LLCullResult result[4]; //LLGLEnable enable(GL_DEPTH_CLAMP_NV); - renderShadow(view[j], proj[j], shadow_cam, result[j], TRUE); + renderShadow(view[j], proj[j], shadow_cam, result[j], TRUE, TRUE, target_width); } mShadow[j].flush(); @@ -9405,11 +9415,13 @@ void LLPipeline::generateSunShadow(LLCamera& camera) mShadow[i+4].getViewport(gGLViewport); mShadow[i+4].clear(); + U32 target_width = mShadow[i+4].getWidth(); + static LLCullResult result[2]; LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW0+i+4; - renderShadow(view[i+4], proj[i+4], shadow_cam, result[i], FALSE, FALSE); + renderShadow(view[i+4], proj[i+4], shadow_cam, result[i], FALSE, FALSE, target_width); mShadow[i+4].flush(); } diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index c11c63c244..f7dd581519 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -265,7 +265,7 @@ public: void setHighlightObject(LLDrawable* obj) { mHighlightObject = obj; } - void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader = TRUE, BOOL use_occlusion = TRUE); + void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader, BOOL use_occlusion, U32 target_width); void renderHighlights(); void renderDebug(); void renderPhysicsDisplay(); @@ -853,6 +853,7 @@ public: static BOOL CameraOffset; static F32 CameraMaxCoF; static F32 CameraDoFResScale; + static F32 RenderAutoHideSurfaceAreaLimit; }; void render_bbox(const LLVector3 &min, const LLVector3 &max); diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 66bb9d3cea..9deb0d2030 100644 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -132,6 +132,28 @@ name="vbo" tool_tip="Enabling this on modern hardware gives a performance gain. However, older hardware often has poor implementations of VBOs and you may get crashes when this is enabled." width="315" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="10" + name="tc label" + top_pad="10" + width="188"> + Enable S3TC: + </text> + <check_box + control_name="RenderCompressTextures" + height="16" + initial_value="true" + label="Enable Texture Compression (requires restart)" + layout="topleft" + left_pad="10" + name="texture compression" + tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality." + width="315" /> <slider control_name="TextureMemory" decimal_digits="0" diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml index e6d749a3f0..9561f67941 100644 --- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml @@ -155,6 +155,7 @@ name="object_name" top_delta="0" translate="false" + parse_urls="false" use_ellipses="true" width="185"> Consetetur Sadipscing diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index afc5b916e7..a26c5bb344 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1245,6 +1245,25 @@ Visit [_URL] for more information? <notification icon="alertmodal.tga" + name="IntelOldDriver" + type="alertmodal"> + There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance. + + Visit [_URL] to check for driver updates? + <tag>confirm</tag> + <url option="0" name="url"> + http://www.intel.com/p/en_US/support/detect/graphics + </url> + <usetemplate + ignoretext="My graphics driver is out of date" + name="okcancelignore" + notext="No" + yestext="Yes"/> + <tag>fail</tag> + </notification> + + <notification + icon="alertmodal.tga" name="UnknownGPU" type="alertmodal"> Your system contains a graphics card that [APP_NAME] doesn't recognize. @@ -6373,31 +6392,28 @@ Is this OK? <notification icon="notify.tga" name="ScriptQuestionCaution" - priority="high" + priority="critical" persist="true" type="notify"> -An object named '<nolink>[OBJECTNAME]</nolink>', owned by '[NAME]' would like to: - -[QUESTIONS] -If you do not trust this object and its creator, you should deny the request. +Warning: The object '<nolink>[OBJECTNAME]</nolink>' wants total access to your Linden Dollars account. If you allow access, it can remove funds from your account at any time, or empty your account completely, on an ongoing basis with no additional warnings. + +It is rare that such a request is legitimate. Do not allow access if you do not fully understand why it wants access to your account. -Grant this request? <tag>confirm</tag> <form name="form"> <button index="0" name="Grant" - text="Grant"/> + text="Allow total access"/> <button default="true" index="1" name="Deny" text="Deny"/> - <button - index="2" - name="Details" - text="Details..."/> </form> + <footer> +[FOOTERTEXT] + </footer> </notification> <notification diff --git a/indra/newview/skins/default/xui/en/panel_script_question_toast.xml b/indra/newview/skins/default/xui/en/panel_script_question_toast.xml new file mode 100644 index 0000000000..b0436bb6dc --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_script_question_toast.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<panel + background_opaque="false" + border_visible="false" + background_visible="true" + bg_alpha_color="PanelNotificationBackground" + bg_opaque_color="PanelNotificationBackground" + chrome="true" + height="270" + label="script_question_panel" + layout="topleft" + left="0" + name="panel_script_question_toast" + top="0" + width="305"> + <text + follows="left|right|top" + font="SansSerifBold" + height="160" + layout="topleft" + left="10" + mouse_opaque="false" + name="top_info_message" + parse_highlights="true" + parse_urls="true" + text_color="NotifyCautionBoxColor" + top="10" + value="" + width="285" + wrap="true"/> + <panel + background_visible="false" + follows="left|right|top" + height="30" + label="buttons_panel" + layout="topleft" + name="buttons_panel" + top_pad="10" + width="285"> + </panel> + <text + follows="all" + font="SansSerifBold" + height="55" + layout="topleft" + mouse_opaque="false" + name="bottom_info_message" + parse_highlights="true" + parse_urls="true" + text_color="NotifyCautionBoxColor" + top_pad="5" + value="" + width="285" + wrap="true"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 6600339ad7..bf2e6bc2d9 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -267,19 +267,19 @@ <combo_box.item label="Touch (default)" name="Touch/grab(default)" - value="Touch/grab (default)" /> + value="Touch" /> <combo_box.item label="Sit on object" name="Sitonobject" - value="Sit on object" /> + value="Sit" /> <combo_box.item label="Buy object" name="Buyobject" - value="Buy object" /> + value="Buy" /> <combo_box.item label="Pay object" name="Payobject" - value="Pay object" /> + value="Pay" /> <combo_box.item label="Open" name="Open" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 4ccec4838a..866ea296c3 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -393,6 +393,7 @@ Please try logging in again in a minute.</string> <string name="reconnect_nearby">You will now be reconnected to Nearby Voice Chat</string> <string name="ScriptQuestionCautionChatGranted">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS].</string> <string name="ScriptQuestionCautionChatDenied">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS].</string> + <string name="AdditionalPermissionsRequestHeader">If you allow access to your account, you will also be allowing the object to:</string> <string name="ScriptTakeMoney">Take Linden dollars (L$) from you</string> <string name="ActOnControlInputs">Act on your control inputs</string> <string name="RemapControlInputs">Remap your control inputs</string> diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml index 6f8885487a..49af1a87e1 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -439,7 +439,7 @@ musique : <text name="Sound:"> Son : </text> - <check_box label="Limiter les gestes et sons d'objet à cette parcelle" name="check sound local"/> + <check_box label="Limiter les sons des gestes et des objets à cette parcelle" name="check sound local"/> <text name="Avatar Sounds:"> Sons d'avatar : </text> diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 3eebed450f..8b410128da 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -4509,7 +4509,7 @@ Essayez avec le chemin d'accès à l'éditeur entre guillemets doubles Backsp </string> <string name="Shift"> - Shift + Maj </string> <string name="Ctrl"> Ctrl diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index 54031ccf12..7bf8a7b8be 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -2895,6 +2895,18 @@ M キーを押して変更します。 [RESIDENTS] <usetemplate name="okcancelbuttons" notext="取り消し" yestext="Ok"/> </notification> + <notification name="ShareFolderConfirmation"> + フォルダは一度に 1 つしか共有できません。 + +次のアイテムを共有しますか? + +<nolink>[ITEMS]</nolink> + +次の住人と共有: + +[RESIDENTS] + <usetemplate name="okcancelbuttons" notext="取り消し" yestext="Ok"/> + </notification> <notification name="ItemsShared"> アイテムが共有されました。 </notification> diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index d7d5d59a33..fd973bf3c2 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -118,7 +118,7 @@ <menu_item_call label="Devolver objeto" name="Return Object back to Owner"/> </menu> <menu label="Scripts" name="Scripts"> - <menu_item_call label="Recompilar scripts (LSL)" name="Mono"/> + <menu_item_call label="Recompilar scripts (Mono)" name="Mono"/> <menu_item_call label="Recompilar scripts (LSL)" name="LSL"/> <menu_item_call label="Resetar scripts" name="Reset Scripts"/> <menu_item_call label="Scripts em modo execução" name="Set Scripts to Running"/> @@ -163,7 +163,7 @@ <menu_item_check label="Limitar distância da seleção" name="Limit Select Distance"/> <menu_item_check label="Disable Camera Constraints" name="Disable Camera Distance"/> <menu_item_check label="Foto de alta resolução" name="HighResSnapshot"/> - <menu_item_check label="Compactar fotos para HD" name="QuietSnapshotsToDisk"/> + <menu_item_check label="Fotos sem barulho para HD" name="QuietSnapshotsToDisk"/> <menu label="Ferramentas de desempenho" name="Performance Tools"> <menu_item_call label="Medidor de lag" name="Lag Meter"/> <menu_item_check label="Barra de estatísticas" name="Statistics Bar"/> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 9bf755c8f8..36267803e3 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1025,45 +1025,47 @@ class Linux_i686Manifest(LinuxManifest): super(Linux_i686Manifest, self).construct() if self.prefix("../packages/lib/release", dst="lib"): - self.path("libapr-1.so") - self.path("libapr-1.so.0") - self.path("libapr-1.so.0.4.2") - self.path("libaprutil-1.so") - self.path("libaprutil-1.so.0") - self.path("libaprutil-1.so.0.3.10") - self.path("libbreakpad_client.so.0.0.0") - self.path("libbreakpad_client.so.0") - self.path("libbreakpad_client.so") + self.path("libapr-1.so*") + self.path("libaprutil-1.so*") + self.path("libbreakpad_client.so*") self.path("libcollada14dom.so") - self.path("libdb-5.1.so") - self.path("libdb-5.so") - self.path("libdb.so") - self.path("libcrypto.so.1.0.0") - self.path("libexpat.so.1.5.2") + self.path("libdb*.so") + self.path("libcrypto.so.*") + self.path("libexpat.so.*") self.path("libssl.so.1.0.0") self.path("libglod.so") self.path("libminizip.so") - self.path("libuuid.so") - self.path("libuuid.so.16") - self.path("libuuid.so.16.0.22") - self.path("libSDL-1.2.so.0.11.3") - self.path("libSDL-1.2.so.0") - self.path("libdirectfb-1.4.so.5.0.4") + self.path("libuuid.so*") + self.path("libSDL-1.2.so.*") + self.path("libdirectfb-1.*.so.*") + self.path("libfusion-1.*.so.*") + self.path("libdirect-1.*.so.*") + self.path("libopenjpeg.so*") self.path("libdirectfb-1.4.so.5") - self.path("libfusion-1.4.so.5.0.4") self.path("libfusion-1.4.so.5") - self.path("libdirect-1.4.so.5.0.4") self.path("libdirect-1.4.so.5") - self.path("libopenjpeg.so.1.4.0") - self.path("libopenjpeg.so.1") - self.path("libopenjpeg.so") self.path("libalut.so") self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname - self.path("libfontconfig.so.1.4.4") - self.path("libtcmalloc.so", "libtcmalloc.so") #formerly called google perf tools - self.path("libtcmalloc.so.0", "libtcmalloc.so.0") #formerly called google perf tools - self.path("libtcmalloc.so.0.1.0", "libtcmalloc.so.0.1.0") #formerly called google perf tools + # KLUDGE: As of 2012-04-11, the 'fontconfig' package installs + # libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1 + # and libfontconfig.so. Before we added support for library-file + # wildcards, though, this self.path() call specifically named + # libfontconfig.so.1.4.4 WITHOUT also copying the symlinks. When I + # (nat) changed the call to self.path("libfontconfig.so.*"), we + # ended up with the libfontconfig.so.1 symlink in the target + # directory as well. But guess what! At least on Ubuntu 10.04, + # certain viewer fonts look terrible with libfontconfig.so.1 + # present in the target directory. Removing that symlink suffices + # to improve them. I suspect that means we actually do better when + # the viewer fails to find our packaged libfontconfig.so*, falling + # back on the system one instead -- but diagnosing and fixing that + # is a bit out of scope for the present project. Meanwhile, this + # particular wildcard specification gets us exactly what the + # previous call did, without having to explicitly state the + # version number. + self.path("libfontconfig.so.*.*") + self.path("libtcmalloc.so*") #formerly called google perf tools try: self.path("libfmod-3.75.so") pass |