summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt2
-rwxr-xr-xindra/newview/app_settings/keywords.ini35
-rwxr-xr-xindra/newview/app_settings/settings.xml74
-rwxr-xr-xindra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl28
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/avatarF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/giF.glsl190
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/waterF.glsl6
-rwxr-xr-xindra/newview/app_settings/shaders/class1/environment/underWaterF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/environment/waterF.glsl2
-rwxr-xr-xindra/newview/gpu_table.txt576
-rwxr-xr-xindra/newview/llagent.cpp33
-rwxr-xr-xindra/newview/llagent.h2
-rwxr-xr-xindra/newview/llappviewer.cpp11
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp371
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.h56
-rw-r--r--[-rwxr-xr-x]indra/newview/llconversationmodel.h0
-rw-r--r--[-rwxr-xr-x]indra/newview/llconversationview.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llconversationview.h0
-rwxr-xr-xindra/newview/lldrawable.cpp2
-rwxr-xr-xindra/newview/lldrawpool.cpp1
-rwxr-xr-xindra/newview/lldrawpoolalpha.cpp41
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp161
-rwxr-xr-xindra/newview/lldrawpoolavatar.h2
-rwxr-xr-xindra/newview/lldrawpoolbump.cpp13
-rwxr-xr-xindra/newview/lldrawpoolterrain.cpp8
-rwxr-xr-xindra/newview/lldrawpoolwater.cpp62
-rwxr-xr-xindra/newview/lldrawpoolwlsky.cpp6
-rwxr-xr-xindra/newview/llface.cpp259
-rwxr-xr-xindra/newview/llface.h2
-rwxr-xr-xindra/newview/llfasttimerview.cpp2
-rwxr-xr-xindra/newview/llflexibleobject.cpp23
-rwxr-xr-xindra/newview/llfloaterhardwaresettings.cpp4
-rwxr-xr-xindra/newview/llfloaterimnearbychathandler.cpp13
-rwxr-xr-xindra/newview/llfloaterland.cpp11
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp21
-rwxr-xr-xindra/newview/llfloaterpreference.cpp29
-rwxr-xr-xindra/newview/llfloaterpreference.h3
-rwxr-xr-xindra/newview/llfloaterwebcontent.h1
-rwxr-xr-xindra/newview/llmaniptranslate.cpp3
-rwxr-xr-xindra/newview/llmediactrl.h1
-rwxr-xr-xindra/newview/llmenuoptionpathfindingrebakenavmesh.cpp2
-rwxr-xr-xindra/newview/llmeshrepository.cpp62
-rwxr-xr-xindra/newview/llmeshrepository.h2
-rwxr-xr-xindra/newview/llnamelistctrl.cpp4
-rwxr-xr-xindra/newview/llnamelistctrl.h3
-rwxr-xr-xindra/newview/llpanelgroupinvite.cpp35
-rwxr-xr-xindra/newview/llspatialpartition.cpp120
-rwxr-xr-xindra/newview/llspatialpartition.h9
-rwxr-xr-xindra/newview/lltexturecache.cpp15
-rw-r--r--[-rwxr-xr-x]indra/newview/lltexturefetch.cpp0
-rwxr-xr-xindra/newview/lltoast.cpp42
-rwxr-xr-xindra/newview/lltoast.h2
-rwxr-xr-xindra/newview/lltoastnotifypanel.cpp2
-rwxr-xr-xindra/newview/lltoolpie.cpp9
-rwxr-xr-xindra/newview/lltoolselect.h2
-rwxr-xr-xindra/newview/llviewerdisplay.cpp4
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerfoldertype.cpp0
-rwxr-xr-xindra/newview/llviewermenu.cpp104
-rwxr-xr-xindra/newview/llviewermenu.h1
-rwxr-xr-xindra/newview/llviewermessage.cpp69
-rwxr-xr-xindra/newview/llviewerobject.cpp21
-rwxr-xr-xindra/newview/llviewerobject.h26
-rwxr-xr-xindra/newview/llviewerobjectlist.cpp1
-rwxr-xr-xindra/newview/llviewerobjectlist.h1
-rwxr-xr-xindra/newview/llviewerpartsim.cpp38
-rwxr-xr-xindra/newview/llviewerpartsim.h9
-rwxr-xr-xindra/newview/llviewerpartsource.cpp75
-rwxr-xr-xindra/newview/llviewerpartsource.h4
-rwxr-xr-xindra/newview/llviewerregion.cpp15
-rwxr-xr-xindra/newview/llviewerregion.h4
-rwxr-xr-xindra/newview/llviewershadermgr.cpp137
-rwxr-xr-xindra/newview/llviewershadermgr.h68
-rwxr-xr-xindra/newview/llviewertexture.cpp23
-rwxr-xr-xindra/newview/llviewertexture.h1
-rwxr-xr-xindra/newview/llviewertexturelist.cpp74
-rwxr-xr-xindra/newview/llviewertexturelist.h2
-rwxr-xr-xindra/newview/llviewerwindow.cpp106
-rwxr-xr-xindra/newview/llviewerwindow.h11
-rwxr-xr-xindra/newview/llvoavatar.cpp333
-rwxr-xr-xindra/newview/llvoavatar.h47
-rwxr-xr-xindra/newview/llvograss.cpp7
-rwxr-xr-xindra/newview/llvograss.h1
-rwxr-xr-xindra/newview/llvoicevivox.cpp29
-rwxr-xr-xindra/newview/llvopartgroup.cpp473
-rwxr-xr-xindra/newview/llvopartgroup.h21
-rwxr-xr-xindra/newview/llvovolume.cpp294
-rwxr-xr-xindra/newview/llwaterparammanager.cpp12
-rwxr-xr-xindra/newview/llwaterparamset.h15
-rwxr-xr-xindra/newview/llwlanimator.h1
-rwxr-xr-xindra/newview/llwlparammanager.cpp4
-rwxr-xr-xindra/newview/llwlparammanager.h1
-rwxr-xr-xindra/newview/llwlparamset.cpp56
-rwxr-xr-xindra/newview/llwlparamset.h10
-rwxr-xr-xindra/newview/llworldmapview.cpp2
-rwxr-xr-xindra/newview/noise.h5
-rwxr-xr-xindra/newview/pipeline.cpp223
-rwxr-xr-xindra/newview/pipeline.h8
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.pngbin373 -> 373 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.pngbin215 -> 215 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.pngbin211 -> 211 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.pngbin546 -> 546 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_close.pngbin275 -> 275 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.pngbin345 -> 345 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_expand.pngbin342 -> 342 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.pngbin459 -> 459 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.pngbin366 -> 366 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_plus.pngbin144 -> 144 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/textures/icons/Conv_toolbar_sort.pngbin230 -> 230 bytes
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_attachment_other.xml46
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_attachment_self.xml11
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_avatar_other.xml50
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_avatar_self.xml12
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_land.xml11
-rw-r--r--indra/newview/skins/default/xui/en/menu_mute_particle.xml15
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_object.xml11
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_viewer.xml10
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_graphics1.xml111
-rwxr-xr-xindra/newview/skins/default/xui/en/role_actions.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml9
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml0
-rwxr-xr-xindra/newview/tests/llagentaccess_test.cpp2
122 files changed, 3422 insertions, 1579 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index d06cee5ee6..c4ceb80260 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -124,6 +124,7 @@ set(viewer_SOURCE_FILES
llavatariconctrl.cpp
llavatarlist.cpp
llavatarlistitem.cpp
+ llavatarrenderinfoaccountant.cpp
llavatarpropertiesprocessor.cpp
llblockedlistitem.cpp
llblocklist.cpp
@@ -708,6 +709,7 @@ set(viewer_HEADER_FILES
llavatarlist.h
llavatarlistitem.h
llavatarpropertiesprocessor.h
+ llavatarrenderinfoaccountant.h
llblockedlistitem.h
llblocklist.h
llbox.h
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index f0d8b77afd..766c9a4604 100755
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -132,6 +132,7 @@ PSYS_PART_FOLLOW_VELOCITY_MASK
PSYS_PART_TARGET_POS_MASK
PSYS_PART_EMISSIVE_MASK
PSYS_PART_TARGET_LINEAR_MASK
+PSYS_PART_RIBBON_MASK
PSYS_SRC_PATTERN
PSYS_SRC_INNERANGLE Deprecated -- Use PSYS_SRC_ANGLE_BEGIN
@@ -148,12 +149,24 @@ PSYS_SRC_ACCEL
PSYS_SRC_TEXTURE
PSYS_SRC_TARGET_KEY
PSYS_SRC_OMEGA
+PSYS_PART_BLEND_FUNC_SOURCE
+PSYS_PART_BLEND_FUNC_DEST
+PSYS_PART_START_GLOW
+PSYS_PART_END_GLOW
PSYS_SRC_PATTERN_DROP
PSYS_SRC_PATTERN_EXPLODE
PSYS_SRC_PATTERN_ANGLE
PSYS_SRC_PATTERN_ANGLE_CONE
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
+PSYS_PART_BF_ONE
+PSYS_PART_BF_ZERO
+PSYS_PART_BF_DEST_COLOR
+PSYS_PART_BF_SOURCE_COLOR
+PSYS_PART_BF_ONE_MINUS_DEST_COLOR
+PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
+PSYS_PART_BF_SOURCE_ALPHA
+PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type
OBJECT_NAME Used with llGetObjectDetails to get an object's name
@@ -164,6 +177,25 @@ OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity
OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned
OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key
OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key
+OBJECT_RUNNING_SCRIPT_COUNT Used with llGetObjectDetails to get the number of running scripts in an object
+OBJECT_TOTAL_SCRIPT_COUNT Used with llGetObjectDetails to get the total number of scripts in an object
+OBJECT_SCRIPT_MEMORY Used with llGetObjectDetails to get the total amount of script memory in an object
+OBJECT_SCRIPT_TIME Used with llGetObjectDetails to get the average script time used by an object
+OBJECT_PRIM_EQUIVALENCE Used with llGetObjectDetails to get the prim equivalence of an object
+OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost of an object
+OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost of an object
+OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost of an object
+OBJECT_CHARACTER_TIME Used with llGetObjectDetails to get the pathfinding time (seconds) for an object
+OBJECT_ROOT Used with llGetObjectDetails to get root ID of an object
+OBJECT_ATTACHED_POINT Used with llGetObjectDetails to get attachent point where an object is attached
+OBJECT_PATHFINDING_TYPE Used with llGetObjectDetails to get the pathfinding setting of an object
+OBJECT_PHYSICS Used with llGetObjectDetails to determine if the object is physical or not
+OBJECT_PHANTOM Used with llGetObjectDetails to determine if the object is phantom or not
+OBJECT_TEMP_ON_REZ Used with llGetObjectDetails to determine if the object is temporary or not
+OBJECT_RENDER_WEIGHT Used with llGetObjectDetails to return an avatar's rendering weight
+OBJECT_ATTACHMENT_GEOMETRY_BYTES Used with llGetObjectDetails to return an avatar's attachment rendering geometry bytes
+OBJECT_ATTACHMENT_SURFACE_AREA Used with llGetObjectDetails to return an avatar's attachment surface area
+
# some vehicle params
VEHICLE_TYPE_NONE
@@ -274,7 +306,8 @@ ATTACH_LLLEG Passed to llAttachToAvatar to attach task to left lower leg
ATTACH_BELLY Passed to llAttachToAvatar to attach task to belly
ATTACH_LEFT_PEC Passed to llAttachToAvatar to attach task to left pectoral
ATTACH_RIGHT_PEC Passed to llAttachToAvatar to attach task to right pectoral
-
+ATTACH_NECK Passed to llAttachToAvatar to attach task to neck
+ATTACH_AVATAR_CENTER Passed to llAttachToAvatar to attach task to avatar center
LAND_LEVEL Passed to llModifyLand to level terrain
LAND_RAISE Passed to llModifyLand to raise terrain
LAND_LOWER Passed to llModifyLand to lower terrain
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 344079b640..29ad355f75 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -2158,6 +2158,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>DebugShowAvatarRenderInfo</key>
+ <map>
+ <key>Comment</key>
+ <string>Show avatar render cost information</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DebugShowColor</key>
<map>
<key>Comment</key>
@@ -8446,6 +8457,18 @@
<integer>0</integer>
</map>
+ <key>RenderDepthOfFieldInEditMode</key>
+ <map>
+ <key>Comment</key>
+ <string>Whether to use depth of field effect when in edit mode</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+
<key>CameraDoFResScale</key>
<map>
<key>Comment</key>
@@ -9488,7 +9511,18 @@
<key>RenderAutoMuteByteLimit</key>
<map>
<key>Comment</key>
- <string>Maximum bytes of attachments before an avatar is automatically visually muted (0 for no limit).</string>
+ <string>Maximum bytes of attachments before an avatar is rendered as a simple imposter (0 for no limit).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>RenderAutoMuteRenderCostLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum render weight before an avatar is rendered as a simple imposter (0 to not use this limit).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9499,7 +9533,7 @@
<key>RenderAutoMuteSurfaceAreaLimit</key>
<map>
<key>Comment</key>
- <string>Maximum surface area of attachments before an avatar is automatically visually muted (0 for no limit).</string>
+ <string>Maximum surface area of attachments before an avatar is rendered as a simple imposter (0 to not use this limit).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9507,7 +9541,28 @@
<key>Value</key>
<integer>0</integer>
</map>
-
+ <key>RenderAutoMuteThreshold</key>
+ <map>
+ <key>Comment</key>
+ <string>Threshold on the Avatar Detail slider where simple imposter mode is enabled. (less than 0 is always on, greather than 1 always off)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.25</real>
+ </map>
+ <key>RenderAutoMuteLogging</key>
+ <map>
+ <key>Comment</key>
+ <string>Show extra information in viewer logs about avatar rendering costs</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>
@@ -14543,5 +14598,18 @@
<key>Value</key>
<integer>0</integer>
</map>
+
+ <key>VersionChannelName</key>
+ <map>
+ <key>Comment</key>
+ <string>Version information generated by running the viewer</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
</map>
</llsd>
+
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 43ed41a205..ff30560adc 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -26,22 +26,28 @@
ATTRIBUTE vec4 weight4;
-uniform mat4 matrixPalette[32];
+uniform mat4 matrixPalette[64];
mat4 getObjectSkinnedTransform()
{
- int i;
- vec4 w = fract(weight4);
- vec4 index = floor(weight4);
-
- float scale = 1.0/(w.x+w.y+w.z+w.w);
- w *= scale;
+ float w0 = fract(weight4.x);
+ float w1 = fract(weight4.y);
+ float w2 = fract(weight4.z);
+ float w3 = fract(weight4.w);
+
+ int i0 = int(floor(weight4.x));
+ int i1 = int(floor(weight4.y));
+ int i2 = int(floor(weight4.z));
+ int i3 = int(floor(weight4.w));
+
+ //float scale = 1.0/(w.x+w.y+w.z+w.w);
+ //w *= scale;
- mat4 mat = matrixPalette[int(index.x)]*w.x;
- mat += matrixPalette[int(index.y)]*w.y;
- mat += matrixPalette[int(index.z)]*w.z;
- mat += matrixPalette[int(index.w)]*w.w;
+ mat4 mat = matrixPalette[i0]*w0;
+ mat += matrixPalette[i1]*w1;
+ mat += matrixPalette[i2]*w2;
+ mat += matrixPalette[i3]*w3;
return mat;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
index bcccbf77d2..662c762bca 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
@@ -31,6 +31,8 @@ out vec4 frag_data[3];
uniform sampler2D diffuseMap;
+uniform float minimum_alpha;
+
VARYING vec3 vary_normal;
VARYING vec2 vary_texcoord0;
@@ -44,7 +46,7 @@ void main()
{
vec4 diff = texture2D(diffuseMap, vary_texcoord0.xy);
- if (diff.a < 0.2)
+ if (diff.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
deleted file mode 100755
index da1b234240..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * @file giF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, 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$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 frag_color;
-#else
-#define frag_color gl_FragColor
-#endif
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2D noiseMap;
-
-uniform sampler2D diffuseGIMap;
-uniform sampler2D normalGIMap;
-uniform sampler2D depthGIMap;
-
-uniform sampler2D lightFunc;
-
-// Inputs
-VARYING vec2 vary_fragcoord;
-
-uniform vec2 screen_res;
-
-uniform mat4 inv_proj;
-uniform mat4 gi_mat; //gPipeline.mGIMatrix - eye space to sun space
-uniform mat4 gi_mat_proj; //gPipeline.mGIMatrixProj - eye space to projected sun space
-uniform mat4 gi_norm_mat; //gPipeline.mGINormalMatrix - eye space normal to sun space normal matrix
-uniform mat4 gi_inv_proj; //gPipeline.mGIInvProj - projected sun space to sun space
-uniform float gi_radius;
-uniform float gi_intensity;
-uniform int gi_samples;
-uniform vec2 gi_kern[25];
-uniform vec2 gi_scale;
-uniform vec3 gi_quad;
-uniform vec3 gi_spec;
-uniform float gi_direction_weight;
-uniform float gi_light_offset;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec4 getGIPosition(vec2 gi_tc)
-{
- float depth = texture2D(depthGIMap, gi_tc).a;
- vec2 sc = gi_tc*2.0;
- sc -= vec2(1.0, 1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = gi_inv_proj*ndc;
- pos.xyz /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec3 giAmbient(vec3 pos, vec3 norm)
-{
- vec4 gi_c = gi_mat_proj * vec4(pos, 1.0);
- gi_c.xyz /= gi_c.w;
-
- vec4 gi_pos = gi_mat*vec4(pos,1.0);
- vec3 gi_norm = (gi_norm_mat*vec4(norm,1.0)).xyz;
- gi_norm = normalize(gi_norm);
-
- vec2 tcx = gi_norm.xy;
- vec2 tcy = gi_norm.yx;
-
- vec4 eye_pos = gi_mat*vec4(0,0,0,1.0);
-
- vec3 eye_dir = normalize(gi_pos.xyz-eye_pos.xyz/eye_pos.w);
-
- //vec3 eye_dir = vec3(0,0,-1);
- //eye_dir = (gi_norm_mat*vec4(eye_dir, 1.0)).xyz;
- //eye_dir = normalize(eye_dir);
-
- //float round_x = gi_scale.x;
- //float round_y = gi_scale.y;
-
- vec3 debug = texture2D(normalGIMap, gi_c.xy).rgb*0.5+0.5;
- debug.xz = vec2(0.0,0.0);
- //debug = fract(debug);
-
- float round_x = 1.0/64.0;
- float round_y = 1.0/64.0;
-
- //gi_c.x = floor(gi_c.x/round_x+0.5)*round_x;
- //gi_c.y = floor(gi_c.y/round_y+0.5)*round_y;
-
- float fda = 0.0;
- vec3 fdiff = vec3(0,0,0);
-
- vec3 rcol = vec3(0,0,0);
-
- float fsa = 0.0;
-
- for (int i = -1; i < 2; i+=2 )
- {
- for (int j = -1; j < 2; j+=2)
- {
- vec2 tc = vec2(i, j)*0.75;
- vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0+tc*0.5).xyz;
- //tc += gi_norm.xy*nz.z;
- tc += nz.xy*2.0;
- tc /= gi_samples;
- tc += gi_c.xy;
-
- vec3 lnorm = -normalize(texture2D(normalGIMap, tc.xy).xyz*2.0-1.0);
- vec3 lpos = getGIPosition(tc.xy).xyz;
-
- vec3 at = lpos-gi_pos.xyz;
- float dist = dot(at,at);
- float da = clamp(1.0/(gi_spec.x*dist), 0.0, 1.0);
-
- if (da > 0.0)
- {
- //add angular attenuation
- vec3 ldir = at;
- float ang_atten = clamp(dot(ldir, gi_norm), 0.0, 1.0);
-
- float ld = -dot(ldir, lnorm);
-
- if (ang_atten > 0.0 && ld < 0.0)
- {
- vec3 diff = texture2D(diffuseGIMap, tc.xy).xyz;
- da = da*ang_atten;
- fda += da;
- fdiff += diff*da;
- }
- }
- }
- }
-
- fdiff /= max(gi_spec.y*fda, gi_quad.z);
- fdiff = clamp(fdiff, vec3(0), vec3(1));
-
- vec3 ret = fda*fdiff;
- //ret = ret*ret*gi_quad.x+ret*gi_quad.y+gi_quad.z;
-
- //fda *= nz.z;
-
- //rcol.rgb *= gi_intensity;
- //return rcol.rgb+vary_AmblitColor.rgb*0.25;
- //return vec4(debug, 0.0);
- //return vec4(fda*fdiff, 0.0);
- return clamp(ret,vec3(0.0), vec3(1.0));
- //return debug.xyz;
-}
-
-void main()
-{
- vec2 pos_screen = vary_fragcoord.xy;
- vec4 pos = getPosition(pos_screen);
- vec3 norm = texture2DRect(normalMap, pos_screen).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
-
- frag_color.xyz = giAmbient(pos, norm);
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index daa2fb390a..8de8ba1dd8 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -53,13 +53,11 @@ uniform vec3 specular;
uniform float lightExp;
uniform float refScale;
uniform float kd;
-uniform vec2 screenRes;
uniform vec3 normScale;
uniform float fresnelScale;
uniform float fresnelOffset;
uniform float blurMultiplier;
-uniform vec2 screen_res;
-uniform mat4 norm_mat; //region space to screen space
+uniform mat3 normal_matrix;
//bigWave is (refCoord.w, view.w);
VARYING vec4 refCoord;
@@ -163,7 +161,7 @@ void main()
//wavef.z *= 0.1f;
//wavef = normalize(wavef);
- vec3 screenspacewavef = (norm_mat*vec4(wavef, 1.0)).xyz;
+ vec3 screenspacewavef = normal_matrix*wavef;
frag_data[0] = vec4(color.rgb, 0.5); // diffuse
frag_data[1] = vec4(0.5,0.5,0.5, 0.95); // speccolor*spec, spec
diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
index 0d8dab0a41..485e48537c 100755
--- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
@@ -43,13 +43,11 @@ uniform vec2 fbScale;
uniform float refScale;
uniform float znear;
uniform float zfar;
-uniform float kd;
uniform vec4 waterPlane;
uniform vec3 eyeVec;
uniform vec4 waterFogColor;
uniform float waterFogDensity;
uniform float waterFogKS;
-uniform vec2 screenRes;
//bigWave is (refCoord.w, view.w);
VARYING vec4 refCoord;
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 79bffab745..1fd7bdaa5c 100755
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -42,8 +42,6 @@ uniform vec3 lightDir;
uniform vec3 specular;
uniform float lightExp;
uniform float refScale;
-uniform float kd;
-uniform vec2 screenRes;
uniform vec3 normScale;
uniform float fresnelScale;
uniform float fresnelOffset;
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index c64e11929d..122577b132 100755
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -38,7 +38,7 @@ ATI 3D-Analyze .*ATI.*3D-Analyze.* 0 0 0 0
ATI All-in-Wonder 7500 .*ATI.*All-in-Wonder 75.* 0 1 0 0
ATI All-in-Wonder 8500 .*ATI.*All-in-Wonder 85.* 0 1 0 0
ATI All-in-Wonder 9200 .*ATI.*All-in-Wonder 92.* 0 1 0 0
-ATI All-in-Wonder 9xxx .*ATI.*All-in-Wonder 9.* 1 1 0 0
+ATI All-in-Wonder 9xxx .*ATI.*All-in-Wonder 9.* 1 1 0 2.1
ATI All-in-Wonder HD .*ATI.*All-in-Wonder HD.* 1 1 1 3.3
ATI All-in-Wonder X600 .*ATI.*All-in-Wonder X6.* 1 1 0 0
ATI All-in-Wonder X800 .*ATI.*All-in-Wonder X8.* 1 1 1 2.1
@@ -46,162 +46,132 @@ ATI All-in-Wonder X1800 .*ATI.*All-in-Wonder X18.* 3 1 0 0
ATI All-in-Wonder X1900 .*ATI.*All-in-Wonder X19.* 3 1 0 0
ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1 0 0
ATI All-in-Wonder Radeon .*ATI.*All-in-Wonder Radeon.* 0 1 0 0
-ATI ASUS ARES .*ATI.*ASUS.*ARES.* 3 1 0 0
-ATI ASUS A9xxx .*ATI.*ASUS.*A9.* 1 1 0 0
-ATI ASUS AH24xx .*ATI.*ASUS.*AH24.* 1 1 1 3.3
-ATI ASUS AH26xx .*ATI.*ASUS.*AH26.* 1 1 1 3.3
-ATI ASUS AH34xx .*ATI.*ASUS.*AH34.* 1 1 1 3.3
-ATI ASUS AH36xx .*ATI.*ASUS.*AH36.* 1 1 1 3.3
-ATI ASUS AH46xx .*ATI.*ASUS.*AH46.* 2 1 1 3.3
-ATI ASUS AX3xx .*ATI.*ASUS.*AX3.* 1 1 0 0
-ATI ASUS AX5xx .*ATI.*ASUS.*AX5.* 1 1 0 0
-ATI ASUS AX8xx .*ATI.*ASUS.*AX8.* 2 1 0 0
-ATI ASUS EAH24xx .*ATI.*ASUS.*EAH24.* 2 1 0 0
-ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1 0 0
-ATI ASUS EAH29xx .*ATI.*ASUS.*EAH29.* 3 1 0 0
-ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1 0 0
-ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 2 1 0 0
-ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 2 1 1 3.3
-ATI ASUS EAH43xx .*ATI.*ASUS.*EAH43.* 2 1 1 3.3
-ATI ASUS EAH45xx .*ATI.*ASUS.*EAH45.* 2 1 0 0
-ATI ASUS EAH48xx .*ATI.*ASUS.*EAH48.* 3 1 1 3.3
-ATI ASUS EAH57xx .*ATI.*ASUS.*EAH57.* 3 1 1 4.1
-ATI ASUS EAH58xx .*ATI.*ASUS.*EAH58.* 5 1 1 4.1
-ATI ASUS EAH62xx .*ATI.*ASUS.*EAH62.* 2 1 0 0
-ATI ASUS EAH63xx .*ATI.*ASUS.*EAH63.* 2 1 0 0
-ATI ASUS EAH64xx .*ATI.*ASUS.*EAH64.* 2 1 0 0
-ATI ASUS EAH65xx .*ATI.*ASUS.*EAH65.* 2 1 0 4.1
-ATI ASUS EAH66xx .*ATI.*ASUS.*EAH66.* 3 1 0 4.1
-ATI ASUS EAH67xx .*ATI.*ASUS.*EAH67.* 3 1 0 0
-ATI ASUS EAH68xx .*ATI.*ASUS.*EAH68.* 5 1 0 4
-ATI ASUS EAH69xx .*ATI.*ASUS.*EAH69.* 5 1 0 4.1
-ATI ASUS Radeon X1xxx .*ATI.*ASUS.*X1.* 2 1 1 2.1
-ATI Radeon X7xx .*ATI.*ASUS.*X7.* 1 1 0 0
-ATI Radeon X19xx .*ATI.*(Radeon|Diamond) X19.* ?.* 2 1 1 2.1
-ATI Radeon X18xx .*ATI.*(Radeon|Diamond) X18.* ?.* 3 1 1 2.1
+ATI Radeon X1300 .*ATI.*(ASUS|Radeon).*X13.* 2 1 1 2.1
+ATI Radeon X1500 .*ATI.*(ASUS|Radeon).*X15.* 2 1 1 2.1
+ATI Radeon X1600 .*ATI.*(ASUS|Radeon).*X16.* 2 1 1 2.1
+ATI Radeon X1700 .*ATI.*(ASUS|Radeon).*X17.* 2 1 1 2.1
+ATI Radeon X1800 .*ATI.*(Radeon|Diamond) X18.* ?.* 3 1 1 2.1
+ATI Radeon X1900 .*ATI.*(Radeon|Diamond|ASUS) X19.* ?.* 2 1 1 2.1
ATI Radeon X17xx .*ATI.*(Radeon|Diamond) X17.* ?.* 1 1 1 2.1
-ATI Radeon X16xx .*ATI.*(Radeon|Diamond) X16.* ?.* 1 1 1 2.1
-ATI Radeon X15xx .*ATI.*(Radeon|Diamond) X15.* ?.* 1 1 1 2.1
-ATI Radeon X13xx .*ATI.*(Radeon|Diamond) X13.* ?.* 1 1 1 2.1
-ATI Radeon X1xxx .*ATI.*(Radeon|Diamond) X1.. ?.* 0 1 1 2.1
-ATI Radeon X2xxx .*ATI.*(Radeon|Diamond) X2.. ?.* 1 1 1 2.1
+ATI Radeon X16xx .*ATI.*(Radeon|Diamond) X17.* ?.* 1 1 1 2.1
+ATI Radeon X28xx .*ATI.*(Radeon|Diamond) X28.. ?.* 1 1 1 2.1
ATI Display Adapter .*ATI.*display adapter.* 1 1 1 4.1
ATI FireGL 5200 .*ATI.*FireGL V52.* 1 1 1 2.1
ATI FireGL 5xxx .*ATI.*FireGL V5.* 2 1 1 3.3
ATI FireGL .*ATI.*Fire.*GL.* 4 1 1 4.2
-ATI FirePro M3900 .*ATI.*FirePro.*M39.* 2 1 0 0
+ATI FirePro M3900 .*ATI.*FirePro.*M39.* 2 1 0 4.1
ATI FirePro M5800 .*ATI.*FirePro.*M58.* 3 1 0 0
ATI FirePro M7740 .*ATI.*FirePro.*M77.* 3 1 0 0
ATI FirePro M7820 .*ATI.*FirePro.*M78.* 5 1 1 4.2
-ATI FireMV .*ATI.*FireMV.* 0 1 1 1.3
+ATI FireMV .*ATI.*FireMV.* 0 1 1 3.2
ATI Generic .*ATI.*Generic.* 0 0 0 0
ATI Hercules 9800 .*ATI.*Hercules.* 9800.* 1 1 0 0
-ATI IGP 340M .*ATI.*IGP.*340M.* 0 0 0 0
+ATI IGP 340M .*ATI.*IGP.* 34[0-9]M.* 0 0 0 1.3
ATI M52 .*ATI.*M52.* 1 1 0 0
ATI M54 .*ATI.*M54.* 1 1 0 0
ATI M56 .*ATI.*M56.* 1 1 0 0
ATI M71 .*ATI.*M71.* 1 1 0 0
ATI M72 .*ATI.*M72.* 1 1 0 0
ATI M76 .*ATI.*M76.* 3 1 0 0
-ATI Radeon HD 64xx .*ATI.*AMD Radeon.* HD [67]4..[MG] 2 1 1 4.2
-ATI Radeon HD 65xx .*ATI.*AMD Radeon.* HD [67]5..[MG] 2 1 1 4.2
-ATI Radeon HD 66xx .*ATI.*AMD Radeon.* HD [67]6..[MG] 3 1 1 4.2
-ATI Radeon HD 7100 .*ATI.*AMD Radeon.* HD 71.* 2 1 0 0
-ATI Radeon HD 7200 .*ATI.*AMD Radeon.* HD 72.* 2 1 0 0
-ATI Radeon HD 7300 .*ATI.*AMD Radeon.* HD 73.* 2 1 0 4.2
-ATI Radeon HD 7400 .*ATI.*AMD Radeon.* HD 74.* 2 1 0 4.2
-ATI Radeon HD 7500 .*ATI.*AMD Radeon.* HD 75.* 3 1 1 4.2
-ATI Radeon HD 7600 .*ATI.*AMD Radeon.* HD 76.* 3 1 0 4.2
-ATI Radeon HD 7700 .*ATI.*AMD Radeon.* HD 77.* 4 1 1 4.2
-ATI Radeon HD 7800 .*ATI.*AMD Radeon.* HD 78.* 5 1 1 4.2
-ATI Radeon HD 7900 .*ATI.*AMD Radeon.* HD 79.* 5 1 1 4.2
-ATI ASUS HD7100 .*ATI.*ASUS.* HD71.* 2 1 0 0
-ATI ASUS HD7200 .*ATI.*ASUS.* HD72.* 2 1 0 0
-ATI ASUS HD7300 .*ATI.*ASUS.* HD73.* 2 1 0 0
-ATI ASUS HD7400 .*ATI.*ASUS.* HD74.* 2 1 0 0
-ATI ASUS HD7500 .*ATI.*ASUS.* HD75.* 3 1 1 4.2
-ATI ASUS HD7600 .*ATI.*ASUS.* HD76.* 3 1 0 0
-ATI ASUS HD7700 .*ATI.*ASUS.* HD77.* 4 1 1 4.2
-ATI ASUS HD7800 .*ATI.*ASUS.* HD78.* 5 1 1 4.2
-ATI ASUS HD7900 .*ATI.*ASUS.* HD79.* 5 1 1 4.2
+ATI Radeon HD 6300M .*ATI.*AMD Radeon.* (HD|HD )63..M 2 1 1 4.2
+ATI Radeon HD 6400M .*ATI.*AMD Radeon.* (HD|HD )64..M 2 1 1 4.2
+ATI Radeon HD 6500M .*ATI.*AMD Radeon.* (HD|HD )65..M 2 1 1 4.2
+ATI Radeon HD 6600M .*ATI.*AMD Radeon.* (HD 6|6)6..M 3 1 1 4.2
+ATI Radeon HD 6700M .*ATI.*AMD Radeon.* (HD|HD )67..M 3 1 1 4.2
+ATI Radeon HD 6800M .*ATI.*AMD Radeon.* (HD|HD )68..M 3 1 1 4.2
+ATI Radeon HD 6300G .*ATI.*AMD Radeon.* (HD|HD )63..G 2 1 1 4.2
+ATI Radeon HD 6400G .*ATI.*AMD Radeon.* (HD|HD )64..G 2 1 1 4.2
+ATI Radeon HD 6500G .*ATI.*AMD Radeon.* (HD|HD )65..G 2 1 1 4.2
+ATI Radeon HD 6600G .*ATI.*AMD Radeon.* (HD|HD )66..G 3 1 1 4.2
+ATI Radeon HD 7100 .*ATI.*(Radeon|ASUS).* (HD|HD )71.* 2 1 0 0
+ATI Radeon HD 7200 .*ATI.*(Radeon|ASUS).* (HD|HD )72.* 2 1 0 4.2
+ATI Radeon HD 7300 .*ATI.*(Radeon|ASUS).* (HD|HD )73.* 2 1 0 4.2
+ATI Radeon HD 7400 .*ATI.*(Radeon|ASUS).* (HD|HD )74.* 2 1 0 4.2
+ATI Radeon HD 7500 .*ATI.*(Radeon|ASUS).* (HD|HD )75.* 3 1 1 4.2
+ATI Radeon HD 7600 .*ATI.*(Radeon|ASUS).* (HD|HD )76.* 3 1 0 4.2
+ATI Radeon HD 7700 .*ATI.*(Radeon|ASUS).* (HD|HD )77.* 4 1 1 4.2
+ATI Radeon HD 7800 .*ATI.*(Radeon|ASUS).* (HD|HD )78.* 5 1 1 4.2
+ATI Radeon HD 7900 .*ATI.*(Radeon|ASUS).* (HD|HD )79.* 5 1 1 4.2
+ATI Radeon HD 7000 Series .*ATI.*(Radeon|ASUS).* (HD|HD )7000 Series.* 3 1 1 4.2
ATI Mobility Radeon 4100 .*ATI.*Mobility.* 41.. 1 1 1 3.3
+ATI Mobility Radeon 5000 .*ATI.*Mobility.* 50.. 1 1 1 4.2
ATI Mobility Radeon 7xxx .*ATI.*Mobility.*Radeon 7.* 0 1 1 1.3
ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1 0 0
ATI Mobility Radeon 9800 .*ATI.*Mobility.* 98.* 1 1 0 0
ATI Mobility Radeon 9700 .*ATI.*Mobility.* 97.* 0 1 1 2.1
ATI Mobility Radeon 9600 .*ATI.*Mobility.* 96.* 1 1 1 2.1
-ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1 1 3.3
-ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 1 1 1 3.3
-ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1 1 4
-ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 3 1 1 4
-ATI Mobility Radeon HD 560v .*ATI.*Mobility.*HD *560v.* 3 1 1 3.2
-ATI Mobility Radeon HD 565v .*ATI.*Mobility.*HD *565v.* 3 1 1 3.3
-ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 0 1 1 2.1
-ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 1 1 1 3.3
-ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 1 1 1 3.3
-ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1 0 0
-ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1 0 0
-ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1 0 0
-ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 1 1 1 3.3
-ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD *36.* 1 1 1 4
-ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD *38.* 3 1 1 3.3
-ATI Mobility Radeon HD 4200 .*ATI.*Mobility.*HD *42.* 1 1 1 4
-ATI Mobility Radeon HD 4300 .*ATI.*Mobility.*HD *43.* 1 1 1 4
-ATI Mobility Radeon HD 4500 .*ATI.*Mobility.*HD *45.* 1 1 1 4
-ATI Mobility Radeon HD 4600 .*ATI.*Mobility.*HD *46.* 2 1 1 3.3
-ATI Mobility Radeon HD 4800 .*ATI.*Mobility.*HD *48.* 3 1 1 3.3
-ATI Mobility Radeon HD 5100 .*ATI.*Mobility.*HD *51.* 3 1 1 3.2
-ATI Mobility Radeon HD 5300 .*ATI.*Mobility.*HD *53.* 3 1 0 0
-ATI Mobility Radeon HD 5400 .*ATI.*Mobility.*HD *54.* 2 1 1 4.2
-ATI Mobility Radeon HD 5500 .*ATI.*Mobility.*HD *55.* 3 1 0 0
-ATI Mobility Radeon HD 5600 .*ATI.*Mobility.*HD *56.* 3 1 1 4.2
-ATI Mobility Radeon HD 5700 .*ATI.*Mobility.*HD *57.* 3 1 1 4.1
-ATI Mobility Radeon HD 6200 .*ATI.*Mobility.*HD *62.* 3 1 0 0
-ATI Mobility Radeon HD 6300 .*ATI.*Mobility.*HD *63.* 3 1 1 4.2
-ATI Mobility Radeon HD 6400M .*ATI.*Mobility.*HD *64.* 3 1 0 0
-ATI Mobility Radeon HD 6500M .*ATI.*Mobility.*HD *65.* 5 1 1 4.2
-ATI Mobility Radeon HD 6600M .*ATI.*Mobility.*HD *66.* 5 1 0 0
-ATI Mobility Radeon HD 6700M .*ATI.*Mobility.*HD *67.* 5 1 0 0
-ATI Mobility Radeon HD 6800M .*ATI.*Mobility.*HD *68.* 5 1 0 0
-ATI Mobility Radeon HD 6900M .*ATI.*Mobility.*HD *69.* 5 1 0 0
-ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 0 1 1 3.3
-ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 1 1 1 4
-ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1 1 3.3
-ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1 1 3.3
-ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1 0 0
-ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1 0 0
-ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1 1 4
-ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 1 1 1 3.3
-ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 1 1 1 4
-ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1 0 0
-ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1 1 3.3
-ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1 0 0
+ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD 530v.* 1 1 1 3.3
+ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD 540v.* 1 1 1 3.3
+ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD 545v.* 2 1 1 4
+ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD 550v.* 3 1 1 4
+ATI Mobility Radeon HD 560v .*ATI.*Mobility.*HD 560v.* 3 1 1 3.2
+ATI Mobility Radeon HD 565v .*ATI.*Mobility.*HD 565v.* 3 1 1 3.3
+ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD 23.* 0 1 1 2.1
+ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD 24.* 1 1 1 3.3
+ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD 26.* 1 1 1 3.3
+ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD 27.* 3 1 0 0
+ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD 31.* 0 1 0 0
+ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD 32.* 0 1 0 0
+ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD 34.* 1 1 1 4
+ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD 36.* 1 1 1 4
+ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD 38.* 3 1 1 3.3
+ATI Mobility Radeon HD 4200 .*ATI.*Mobility.*HD 42.* 1 1 1 4
+ATI Mobility Radeon HD 4300 .*ATI.*Mobility.*(HD |HD)43.* 1 1 1 4
+ATI Mobility Radeon HD 4500 .*ATI.*Mobility.*HD 45.* 1 1 1 4
+ATI Mobility Radeon HD 4600 .*ATI.*Mobility.*HD 46.* 2 1 1 3.3
+ATI Mobility Radeon HD 4800 .*ATI.*Mobility.*HD 48.* 3 1 1 3.3
+ATI Mobility Radeon HD 5000 Series .*ATI.*Mobility.*HD 50.* 3 1 1 3.2
+ATI Mobility Radeon HD 5100 .*ATI.*Mobility.*HD 51.* 3 1 1 3.2
+ATI Mobility Radeon HD 5300 .*ATI.*Mobility.*HD 53.* 3 1 0 0
+ATI Mobility Radeon HD 5400 .*ATI.*Mobility.*HD 54.* 2 1 1 4.2
+ATI Mobility Radeon HD 5500 .*ATI.*Mobility.*HD 55.* 3 1 0 4.2
+ATI Mobility Radeon HD 5600 .*ATI.*Mobility.*HD 56.* 3 1 1 4.2
+ATI Mobility Radeon HD 5700 .*ATI.*Mobility.*HD 57.* 3 1 1 4.1
+ATI Mobility Radeon HD 6200 .*ATI.*Mobility.*HD 62.* 3 1 0 0
+ATI Mobility Radeon HD 6300 .*ATI.*Mobility.*HD 63.* 3 1 1 4.2
+ATI Mobility Radeon HD 6400M .*ATI.*Mobility.*HD 64.* 3 1 0 0
+ATI Mobility Radeon HD 6500M .*ATI.*Mobility.*HD 65.* 5 1 1 4.2
+ATI Mobility Radeon HD 6600M .*ATI.*Mobility.*HD 66.* 5 1 0 0
+ATI Mobility Radeon HD 6700M .*ATI.*Mobility.*HD 67.* 5 1 0 0
+ATI Mobility Radeon HD 6800M .*ATI.*Mobility.*HD 68.* 5 1 0 0
+ATI Mobility Radeon HD 6900M .*ATI.*Mobility.*HD 69.* 5 1 0 0
+ATI Mobility Radeon Graphics .*ATI Mobility Radeon Graphics.* 1 1 0 4
+ATI Radeon HD 2300 .*ATI.*Radeon.* (HD|HD )23.. 0 1 1 3.3
+ATI Radeon HD 2400 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)24.. 1 1 1 4
+ATI Radeon HD 2600 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)26.. 2 1 1 4
+ATI Radeon HD 2900 .*ATI.*Radeon.* (HD|HD )29.. 3 1 1 3.3
+ATI Radeon HD 3000 .*ATI.*Radeon.* (HD|HD )30.. 0 1 0 0
+ATI Radeon HD 3100 .*ATI.*Radeon.* (HD|HD )31.. 1 1 0 0
+ATI Radeon HD 3200 .*ATI.*Radeon.* (HD|HD )32.. 1 1 1 4
+ATI Radeon HD 3300 .*ATI.*Radeon.* (HD|HD )33.. 1 1 1 3.3
+ATI Radeon HD 3400 .*ATI.*(Radeon|ASUS).* (HD|HD |AH|EAH)34.. 1 1 1 4
+ATI Radeon HD 3500 .*ATI.*Radeon.* (HD|HD )35.. 2 1 0 0
+ATI Radeon HD 3600 .*ATI.*(Radeon|ASUS).* (HD|HD |AH|EAH)36.. 3 1 1 4
+ATI Radeon HD 3700 .*ATI.*Radeon.* (HD|HD )37.. 3 1 0 3.3
ATI HD3700 .*ATI.* HD37.. 3 1 0 3.3
-ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1 1 4
-ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1 0 0
-ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1 1 4
-ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1 1 4
-ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 1 0 0
-ATI Radeon HD 4500 .*ATI.*Radeon HD *45.. 2 1 1 3.3
-ATI Radeon HD 4600 .*ATI.*Radeon HD *46.. 3 1 1 4
-ATI Radeon HD 4700 .*ATI.*Radeon HD *47.. 3 1 1 3.3
-ATI Radeon HD 4800 .*ATI.*Radeon HD *48.. 3 1 1 4
-ATI ASUS EAH5400 .*ATI.*ASUS EAH54.. 3 1 1 4.2
-ATI Radeon HD 5400 .*ATI.*Radeon HD *54.. 3 1 1 4.2
-ATI Radeon HD 5500 .*ATI.*Radeon HD *55.. 3 1 1 4.2
-ATI ASUS EAH5500 .*ATI.*ASUS EAH55.. 3 1 1 4.2
-ATI Radeon HD 5600 .*ATI.*Radeon HD *56.. 3 1 1 4.2
-ATI Radeon HD 5700 .*ATI.*Radeon HD *57.. 3 1 1 4.2
-ATI Radeon HD 5800 .*ATI.*Radeon HD *58.. 4 1 1 4.2
-ATI Radeon HD 5900 .*ATI.*Radeon HD *59.. 4 1 1 4.2
-ATI Radeon HD 6200 .*ATI.*Radeon HD *62.. 0 1 1 4.2
-ATI Radeon HD 6300 .*ATI.*Radeon HD *63.. 1 1 1 4.2
-ATI Radeon HD 6400 .*ATI.*Radeon HD *64.. 3 1 1 4.2
-ATI Radeon HD 6500 .*ATI.*Radeon HD *65.. 3 1 1 4.2
-ATI Radeon HD 6600 .*ATI.*Radeon HD *66.. 3 1 1 4.2
-ATI Radeon HD 6700 .*ATI.*Radeon HD *67.. 3 1 1 4.2
-ATI Radeon HD 6800 .*ATI.*Radeon HD *68.. 4 1 1 4.2
-ATI Radeon HD 6900 .*ATI.*Radeon HD *69.. 5 1 1 4.2
+ATI Radeon HD 3800 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)38.. 3 1 1 4
+ATI Radeon HD 4100 .*ATI.*Radeon.* (HD|HD )41.. 1 1 0 0
+ATI Radeon HD 4200 .*ATI.*Radeon.* (HD|HD )42.. 1 1 1 4
+ATI Radeon HD 4300 .*ATI.*(Radeon|ASUS).* (HD4|HD 4|EAH4|4)3.. 2 1 1 4
+ATI Radeon HD 4400 .*ATI.*Radeon.* (HD|HD )44.. 2 1 0 0
+ATI Radeon HD 4500 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)45.. 2 1 1 3.3
+ATI Radeon HD 4600 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)46.. 3 1 1 4
+ATI Radeon HD 4700 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)47.. 3 1 1 3.3
+ATI Radeon HD 4800 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)48.. 3 1 1 4
+ATI Radeon HD 5400 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)54.. 3 1 1 4.2
+ATI Radeon HD 5500 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)55.. 3 1 1 4.2
+ATI Radeon HD 5600 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)56.. 3 1 1 4.2
+ATI Radeon HD 5700 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)57.. 3 1 1 4.2
+ATI Radeon HD 5800 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)58.. 4 1 1 4.2
+ATI Radeon HD 5900 .*ATI.*Radeon.* (HD|HD )59.. 4 1 1 4.2
+ATI Radeon HD 6200 .*ATI.*Radeon.* (HD|HD )62.. 0 1 1 4.2
+ATI Radeon HD 6300 .*ATI.*Radeon.* (HD|HD )63.. 1 1 1 4.2
+ATI Radeon HD 6400 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)64.. 3 1 1 4.2
+ATI Radeon HD 6500 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)65.. 3 1 1 4.2
+ATI Radeon HD 6600 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)66.. 3 1 1 4.2
+ATI Radeon HD 6700 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)67.. 3 1 1 4.2
+ATI Radeon HD 6800 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)68.. 4 1 1 4.2
+ATI Radeon HD 6900 .*ATI.*(Radeon|ASUS).* (HD|HD |EAH)69.. 5 1 1 4.2
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0 0 0
ATI Radeon 2100 .*ATI.*Radeon 21.. 0 1 1 2.1
ATI Radeon 3000 .*ATI.*Radeon 30.. 1 1 1 4
@@ -219,17 +189,21 @@ ATI Radeon 9800 .*ATI.*Radeon 98.. 1 1 1 2.1
ATI Radeon RV250 .*ATI.*RV250.* 0 1 0 0
ATI Radeon RV600 .*ATI.*RV6.* 1 1 0 0
ATI Radeon RX700 .*ATI.*RX70.* 1 1 0 0
-ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1 0 0
+ATI Radeon RX800 .*ATI.*Radeon RX80.* 2 1 0 0
ATI RS880M .*ATI.*RS880M 1 1 0 0
ATI Radeon RX9550 .*ATI.*RX9550.* 1 1 0 0
ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0 0 0
-ATI Radeon X300 .*ATI.*Radeon *X3.* 1 1 1 2.1
+ATI Radeon X300 .*ATI.*Radeon X3.* 1 1 1 2.1
ATI Radeon X400 .*ATI.*Radeon ?X4.* 0 1 0 0
ATI Radeon X500 .*ATI.*Radeon ?X5.* 1 1 1 2.1
-ATI Radeon X600 .*ATI.*Radeon ?X6.* 1 1 1 2.1
+ATI Radeon X600 .*ATI.*(Radeon |ASUS Extreme A)X6.* 1 1 1 2.1
ATI Radeon X700 .*ATI.*Radeon ?X7.* 2 1 1 2.1
ATI Radeon X800 .*ATI.*Radeon ?X8.* 1 1 1 2.1
ATI Radeon X900 .*ATI.*Radeon ?X9.* 2 1 0 0
+ATI Radeon X1000 .*ATI.*Radeon ?X10.* 2 1 0 2.1
+ATI Radeon X1200 .*ATI.*Radeon ?X12.* 2 1 0 2.1
+ATI Radeon X1400 .*ATI.*Radeon ?X14.* 2 1 0 2.1
+ATI Radeon X2300 .*ATI.*Radeon ?X23.* 2 1 0 2.1
ATI Radeon Xpress .*ATI.*Radeon Xpress.* 0 1 1 2.1
ATI Rage 128 .*ATI.*Rage 128.* 0 1 0 0
ATI R300 (9700) .*R300.* 0 1 1 2.1
@@ -248,41 +222,43 @@ ATI RV530 .*RV530.* 1 1 0 0
ATI RX480 (Xpress 200P) .*RX480.* 0 1 0 0
ATI RX700 .*RX700.* 1 1 0 0
AMD ANTILLES (HD 6990) .*(AMD|ATI).*Antilles.* 3 1 0 0
+ATI ROBSON .*(AMD|ATI).*ROBSON.* 3 1 0 4
AMD BARTS (HD 6800) .*(AMD|ATI).*Barts.* 3 1 1 2.1
+AMD WRESTLER .*(AMD|ATI).*WRESTLER.* 3 1 1 4
+AMD SUMO .*(AMD|ATI).*SUMO.* 3 1 1 4.1
AMD CAICOS (HD 6400) .*(AMD|ATI).*Caicos.* 3 1 0 0
AMD CAYMAN (HD 6900) .*(AMD|ATI).*(Cayman|CAYMAM).* 3 1 0 0
-AMD CEDAR (HD 5450) .*(AMD|ATI).*Cedar.* 2 1 0 0
+AMD CEDAR (HD 5450) .*(AMD|ATI).*Cedar.* 2 1 0 2.1
AMD CYPRESS (HD 5800) .*(AMD|ATI).*Cypress.* 3 1 0 0
AMD HEMLOCK (HD 5970) .*(AMD|ATI).*Hemlock.* 3 1 0 0
AMD JUNIPER (HD 5700) .*(AMD|ATI).*Juniper.* 3 1 0 0
AMD PARK .*(AMD|ATI).*Park.* 3 1 0 0
-AMD REDWOOD (HD 5500/5600) .*(AMD|ATI).*Redwood.* 3 1 0 0
-AMD TURKS (HD 6500/6600) .*(AMD|ATI).*Turks.* 3 1 0 0
+AMD REDWOOD (HD 5500/5600) .*(AMD|ATI).*Redwood.* 3 1 0 1.4
+AMD TURKS (HD 6500/6600) .*(AMD|ATI).*Turks.* 3 1 0 2.1
AMD RS780 (HD 3200) .*RS780.* 0 1 1 2.1
AMD RS880 (HD 4200) .*RS880.* 0 1 1 3.2
AMD RV610 (HD 2400) .*RV610.* 1 1 0 0
AMD RV620 (HD 3400) .*RV620.* 1 1 0 0
AMD RV630 (HD 2600) .*RV630.* 2 1 0 0
-AMD RV635 (HD 3600) .*RV635.* 3 1 0 0
+AMD RV635 (HD 3600) .*RV635.* 3 1 0 1.4
AMD RV670 (HD 3800) .*RV670.* 3 1 0 0
AMD R680 (HD 3870 X2) .*R680.* 3 1 0 0
AMD R700 (HD 4800 X2) .*R700.* 3 1 0 0
AMD RV710 (HD 4300) .*RV710.* 0 1 1 1.4
-AMD RV730 (HD 4600) .*RV730.* 3 1 0 0
+AMD RV730 (HD 4600) .*RV730.* 3 1 0 1.4
AMD RV740 (HD 4700) .*RV740.* 3 1 0 0
AMD RV770 (HD 4800) .*RV770.* 3 1 0 0
AMD RV790 (HD 4800) .*RV790.* 3 1 0 0
ATI 760G/Radeon 3000 .*ATI.*AMD 760G.* 1 1 1 3.3
ATI 780L/Radeon 3000 .*ATI.*AMD 780L.* 1 1 0 0
ATI Radeon DDR .*ATI.*Radeon ?DDR.* 0 1 0 0
-ATI FirePro 2000 .*ATI.*FirePro 2.* 2 1 1 4.1
+ATI FirePro 2000 .*ATI.*FirePro 2.* 2 1 1 4.2
ATI FirePro 3000 .*ATI.*FirePro V3.* 2 1 0 0
-ATI FirePro 4000 .*ATI.*FirePro V4.* 2 1 0 0
+ATI FirePro 4000 .*ATI.*FirePro V4.* 2 1 0 4.1
ATI FirePro 5000 .*ATI.*FirePro V5.* 3 1 0 0
ATI FirePro 7000 .*ATI.*FirePro V7.* 3 1 0 0
ATI FirePro M .*ATI.*FirePro M.* 3 1 1 4.2
ATI R300 (9700) .*R300.* 0 1 1 2.1
-ATI Radeon .*ATI.*(Diamond|Radeon).* 0 1 0 4.2
Intel X3100 .*Intel.*X3100.* 1 1 1 2.1
Intel GMA 3600 .*Intel.* 3600.* 0 1 1 3
Intel 830M .*Intel.*830M 0 0 0 0
@@ -308,8 +284,6 @@ Intel Graphics Media HD .*Intel.*Graphics Media.*HD.* 1 1 1 2.1
Intel HD Graphics 2000 .*Intel.*HD Graphics 2.* 2 1 0 4
Intel HD Graphics 3000 .*Intel.*HD Graphics 3.* 3 1 1 3.1
Intel HD Graphics 4000 .*Intel.*HD Graphics 4.* 3 1 1 4
-Intel HD2000 .*Intel.*HD2000.* 2 1 0 0
-Intel HD3000 .*Intel.*HD3000.* 3 1 0 0
Intel HD Graphics .*Intel.*HD Graphics.* 2 1 1 4
Intel Mobile 4 Series .*Intel.*Mobile.* 4 Series.* 0 1 1 2.1
Intel 4 Series Internal .*Intel.* 4 Series Internal.* 1 1 1 2.1
@@ -322,113 +296,109 @@ Intel Q45/Q43 .*Intel.*Q4.* 1 1 1 2.1
Intel B45/B43 .*Intel.*B4.* 1 1 1 2.1
Intel 3D-Analyze .*Intel.*3D-Analyze.* 2 1 0 0
Matrox .*Matrox.* 0 0 0 0
-Mesa .*Mesa.* 1 0 1 2.1
+Mesa .*Mesa.* 1 0 1 3
Gallium .*Gallium.* 1 1 1 2.1
-NVIDIA G100M .*NVIDIA .*100M.* 4 1 1 3.3
-NVIDIA G102M .*NVIDIA .*102M.* 1 1 1 3.3
-NVIDIA G103M .*NVIDIA .*103M.* 2 1 1 3.3
-NVIDIA G105M .*NVIDIA .*105M.* 2 1 1 3.3
-NVIDIA G 110M .*NVIDIA .*110M.* 1 1 1 3.3
-NVIDIA G 120M .*NVIDIA .*120M.* 1 1 1 3.3
-NVIDIA G 205M .*NVIDIA .*205M.* 1 1 0 0
-NVIDIA G 410M .*NVIDIA .*410M.* 3 1 1 4.2
-NVIDIA GT 120M .*NVIDIA .*GT *12*M.* 3 1 1 3.3
-NVIDIA GT 130M .*NVIDIA .*GT *13*M.* 3 1 1 3.3
-NVIDIA GT 140M .*NVIDIA .*GT *14*M.* 3 1 1 3.3
-NVIDIA GT 150M .*NVIDIA .*GTS *15*M.* 2 1 0 0
-NVIDIA GTS 160M .*NVIDIA .*GTS *16*M.* 2 1 0 0
-NVIDIA G210M .*NVIDIA .*G21*M.* 3 1 0 0
-NVIDIA GT 220M .*NVIDIA .*GT *22*M.* 3 1 1 3.3
-NVIDIA GT 230M .*NVIDIA .*GT *23*M.* 3 1 1 3.3
-NVIDIA GT 240M .*NVIDIA .*GT *24*M.* 3 1 1 3.3
-NVIDIA GTS 250M .*NVIDIA .*GTS *25*M.* 3 1 0 0
-NVIDIA GTS 260M .*NVIDIA .*GTS *26*M.* 3 1 0 0
-NVIDIA GTX 260M .*NVIDIA .*GTX *26*M.* 3 1 0 0
-NVIDIA GTX 270M .*NVIDIA .*GTX *27*M.* 3 1 0 0
-NVIDIA GTX 280M .*NVIDIA .*GTX *28*M.* 3 1 0 0
-NVIDIA 300M .*NVIDIA .*30*M.* 3 1 1 4.2
-NVIDIA G 310M .*NVIDIA .*31*M.* 2 1 0 0
-NVIDIA GT 320M .*NVIDIA .*GT *32*M.* 3 1 0 0
-NVIDIA GT 325M .*NVIDIA .*GT *32*M.* 3 1 1 3.3
-NVIDIA GT 330M .*NVIDIA .*GT *33*M.* 3 1 1 3.3
-NVIDIA GT 340M .*NVIDIA .*GT *34*M.* 4 1 1 3.3
-NVIDIA GTS 350M .*NVIDIA .*GTS *35*M.* 4 1 1 3.3
-NVIDIA GTS 360M .*NVIDIA .*GTS *360M.* 5 1 1 3.3
-NVIDIA 405M .*NVIDIA .* 40*M.* 2 1 0 4.2
-NVIDIA 410M .*NVIDIA .* 41*M.* 3 1 0 0
-NVIDIA GT 415M .*NVIDIA .*GT *41*M.* 3 1 1 4.2
-NVIDIA GT 420M .*NVIDIA .*GT *42*M.* 3 1 1 4.2
-NVIDIA GT 430M .*NVIDIA .*GT *43*M.* 3 1 1 4.2
-NVIDIA GT 440M .*NVIDIA .*GT *44*M.* 3 1 1 4.2
-NVIDIA GT 450M .*NVIDIA .*GT *45*M.* 3 1 0 0
-NVIDIA GTX 460M .*NVIDIA .*GTX *46*M.* 4 1 1 4.2
-NVIDIA GTX 470M .*NVIDIA .*GTX *47*M.* 3 1 0 0
-NVIDIA GTX 480M .*NVIDIA .*GTX *48*M.* 3 1 1 4.2
-NVIDIA GT 520M .*NVIDIA .*GT *52*M.* 3 1 1 4.2
-NVIDIA GT 530M .*NVIDIA .*GT *53*M.* 3 1 1 4.2
-NVIDIA GT 540M .*NVIDIA .*GT *54*M.* 3 1 1 4.2
-NVIDIA GT 550M .*NVIDIA .*GT *55*M.* 3 1 1 4.2
-NVIDIA GTX 560M .*NVIDIA .*GTX *56*M.* 3 1 0 0
-NVIDIA GTX 570M .*NVIDIA .*GTX *57*M.* 5 1 0 0
-NVIDIA GTX 580M .*NVIDIA .*GTX *58*M.* 5 1 1 4.2
-NVIDIA 610M .*NVIDIA.* 61*M.* 3 1 1 4.2
-NVIDIA GT 620M .*NVIDIA .*GT *62*M.* 3 1 0 0
-NVIDIA GT 630M .*NVIDIA .*GT *63*M.* 3 1 0 0
-NVIDIA GT 640M .*NVIDIA .*GT *64*M.* 3 1 0 0
-NVIDIA GT 650M .*NVIDIA .*GT *65*M.* 3 1 0 0
-NVIDIA GTX 660M .*NVIDIA .*GTX *66*M.* 5 1 0 0
-NVIDIA GTX 670M .*NVIDIA .*GTX *67*M.* 5 1 1 4.2
-NVIDIA GTX 680M .*NVIDIA .*GTX *68*M.* 5 1 0 0
-NVIDIA GTX 690M .*NVIDIA .*GTX *69*M.* 5 1 0 0
+NVIDIA G100M .*NVIDIA .* 10[0-9]M.* 4 1 1 3.3
+NVIDIA G 110M .*NVIDIA .* 11[0-9]M.* 1 1 1 3.3
+NVIDIA G 120M .*NVIDIA .* 12[0-9]M.* 1 1 1 3.3
+NVIDIA G 200M .*NVIDIA .* 20[0-9]M.* 1 1 0 0
+NVIDIA G 410M .*NVIDIA .* 41[0-9]M.* 3 1 1 4.2
+NVIDIA GT 130M .*NVIDIA .*GT 13[0-9]M.* 3 1 1 3.3
+NVIDIA GT 140M .*NVIDIA .*GT 14[0-9]M.* 3 1 1 3.3
+NVIDIA GT 150M .*NVIDIA .*GTS 15[0-9]M.* 2 1 0 0
+NVIDIA GTS 160M .*NVIDIA .*GTS 16[0-9]M.* 2 1 0 0
+NVIDIA G210M .*NVIDIA .*G21[0-9]M.* 3 1 0 3.3
+NVIDIA GT 220M .*NVIDIA .*GT 22[0-9]M.* 3 1 1 3.3
+NVIDIA GT 230M .*NVIDIA .*GT 23[0-9]M.* 3 1 1 3.3
+NVIDIA GT 240M .*NVIDIA .*GT 24[0-9]M.* 3 1 1 3.3
+NVIDIA GTS 250M .*NVIDIA .*GTS 25[0-9]M.* 3 1 0 3.3
+NVIDIA GTS 260M .*NVIDIA .*GTS 26[0-9]M.* 3 1 0 0
+NVIDIA GTX 260M .*NVIDIA .*GTX 26[0-9]M.* 3 1 0 3.3
+NVIDIA GTX 270M .*NVIDIA .*GTX 27[0-9]M.* 3 1 0 0
+NVIDIA GTX 280M .*NVIDIA .*GTX 28[0-9]M.* 3 1 0 3.3
+NVIDIA 300M .*NVIDIA .*GT 30[0-9]M.* 3 1 1 4.2
+NVIDIA G 310M .*NVIDIA .* 31[0-9]M.* 2 1 0 3.3
+NVIDIA GT 320M .*NVIDIA .* 32[0-9]M.* 3 1 0 3.3
+NVIDIA GT 330M .*NVIDIA .*GT 33[0-9]M.* 3 1 1 3.3
+NVIDIA GT 340M .*NVIDIA .*GT 34[0-9]M.* 4 1 1 3.3
+NVIDIA GTS 350M .*NVIDIA .*GTS 35[0-9]M.* 4 1 1 3.3
+NVIDIA GTS 360M .*NVIDIA .*GTS 36[0-9]M.* 5 1 1 3.3
+NVIDIA 400M .*NVIDIA .* 40[0-9]M.* 2 1 0 0
+NVIDIA 410M .*NVIDIA .* 41[0-9]M.* 3 1 0 0
+NVIDIA GT 420M .*NVIDIA .*GT 42[0-9]M.* 3 1 1 4.2
+NVIDIA GT 430M .*NVIDIA .*GT 43[0-9]M.* 3 1 1 4.2
+NVIDIA GT 440M .*NVIDIA .*GT 44[0-9]M.* 3 1 1 4.2
+NVIDIA GT 450M .*NVIDIA .*GT 45[0-9]M.* 3 1 0 0
+NVIDIA GTX 460M .*NVIDIA .*GTX 46[0-9]M.* 4 1 1 4.3
+NVIDIA GTX 470M .*NVIDIA .*GTX 47[0-9]M.* 3 1 0 4.2
+NVIDIA GTX 480M .*NVIDIA .*GTX 48[0-9]M.* 3 1 1 4.2
+NVIDIA GT 520M .*NVIDIA .*GT 52[0-9]M.* 3 1 1 4.2
+NVIDIA GT 530M .*NVIDIA .*GT 53[0-9]M.* 3 1 1 4.2
+NVIDIA GT 540M .*NVIDIA .*GT 54[0-9]M.* 3 1 1 4.2
+NVIDIA GT 550M .*GeForce GT 55[0-9]M.* 3 1 1 4.2
+NVIDIA GTX 560M .*NVIDIA .*GTX 56[0-9]M.* 3 1 0 4.2
+NVIDIA GTX 570M .*NVIDIA .*GTX 57[0-9]M.* 5 1 0 4.2
+NVIDIA GTX 580M .*NVIDIA .*GTX 58[0-9]M.* 5 1 1 4.2
+NVIDIA 610M .*NVIDIA.* 61[0-9]M.* 3 1 1 4.2
+NVIDIA GT 620M .*NVIDIA .*GT 62[0-9]M.* 3 1 0 4.2
+NVIDIA GT 630M .*NVIDIA .*GT 63[0-9]M.* 3 1 0 4.2
+NVIDIA GT 640M .*NVIDIA .*GT 64[0-9]M.* 3 1 0 4.2
+NVIDIA GT 650M .*NVIDIA .*GT 65[0-9]M.* 3 1 0 4.2
+NVIDIA GTX 660M .*NVIDIA .*GTX 66[0-9]M.* 5 1 0 4.3
+NVIDIA GTX 670M .*NVIDIA .*GTX 67[0-9]M.* 5 1 1 4.2
+NVIDIA GTX 680M .*NVIDIA .*GTX 68[0-9]M.* 5 1 0 4.2
+NVIDIA GTX 690M .*NVIDIA .*GTX 69[0-9]M.* 5 1 0 0
NVIDIA G100 .*NVIDIA .*G10.* 3 1 1 4.2
-NVIDIA GT 120 .*NVIDIA .*GT *12.* 2 1 0 3
-NVIDIA GT 130 .*NVIDIA .*GT *13.* 2 1 0 3.3
-NVIDIA GTS 150 .*NVIDIA .*GTS *15.* 2 1 0 0
+NVIDIA GT 120 .*NVIDIA .*GT 12.* 2 1 0 3.3
+NVIDIA GT 130 .*NVIDIA .*GT 13.* 2 1 0 3.3
+NVIDIA GT 140 .*NVIDIA .*GT 14.* 2 1 0 3.3
+NVIDIA GTS 150 .*NVIDIA .*GTS 15.* 2 1 0 0
NVIDIA 200 .*NVIDIA .*GeForce 20.* 2 1 1 3.3
NVIDIA G200 .*NVIDIA .*GeForce G20.* 2 1 1 3.3
NVIDIA G210 .*NVIDIA .*GeForce G210.* 3 1 1 3.3
NVIDIA 210 .*NVIDIA .*GeForce 210.* 3 1 1 3.3
-NVIDIA GT 220 .*NVIDIA .*GT *22.* 2 1 1 3.3
-NVIDIA GT 230 .*NVIDIA .*GT *23.* 2 1 1 3.3
-NVIDIA GT 240 .*NVIDIA .*GT *24.* 4 1 1 3.3
-NVIDIA GTS 240 .*NVIDIA .*GTS *24.* 4 1 1 3.3
-NVIDIA GTS 250 .*NVIDIA .*GTS *25.* 4 1 1 3.3
-NVIDIA GTX 260 .*NVIDIA .*GTX *26.* 4 1 1 3.3
-NVIDIA GTX 270 .*NVIDIA .*GTX *27.* 4 1 0 3.3
-NVIDIA GTX 280 .*NVIDIA .*GTX *28.* 4 1 1 3.3
-NVIDIA GTX 290 .*NVIDIA .*GTX *29.* 5 1 0 3.3
+NVIDIA GT 220 .*NVIDIA .*GT 22.* 2 1 1 3.3
+NVIDIA GT 230 .*NVIDIA .*GT 23.* 2 1 1 3.3
+NVIDIA GT 240 .*NVIDIA .*GT 24.* 4 1 1 3.3
+NVIDIA GTS 240 .*NVIDIA .*GTS 24.* 4 1 1 3.3
+NVIDIA GTS 250 .*NVIDIA .*GTS 25.* 4 1 1 3.3
+NVIDIA GTX 260 .*NVIDIA .*GTX 26.* 4 1 1 3.3
+NVIDIA GTX 270 .*NVIDIA .*GTX 27.* 4 1 0 3.3
+NVIDIA GTX 280 .*NVIDIA .*GTX 28.* 4 1 1 3.3
+NVIDIA GTX 290 .*NVIDIA .*GTX 29.* 5 1 0 3.3
NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1 1 3.3
NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1 1 3.3
-NVIDIA GT 320 .*NVIDIA .*GT *32.* 3 1 0 3.3
-NVIDIA GT 330 .*NVIDIA .*GT *33.* 3 1 0 3.3
-NVIDIA GT 340 .*NVIDIA .*GT *34.* 3 1 0 0
+NVIDIA GT 320 .*NVIDIA .*GT 32.* 3 1 0 3.3
+NVIDIA GT 330 .*NVIDIA .*GT 33.* 3 1 0 3.3
+NVIDIA GT 340 .*NVIDIA .*GT 34.* 3 1 0 3.3
NVIDIA 405 .*NVIDIA .* 405.* 3 1 0 3.3
-NVIDIA GT 420 .*NVIDIA .*GT *42.* 3 1 1 4.2
-NVIDIA GT 430 .*NVIDIA .*GT *43.* 3 1 1 4.2
-NVIDIA GT 440 .*NVIDIA .*GT *44.* 4 1 0 4.2
-NVIDIA GTS 450 .*NVIDIA .*GTS *45.* 4 1 1 4.2
-NVIDIA GTX 460 .*NVIDIA .*GTX *46.* 5 1 1 4.3
-NVIDIA GTX 470 .*NVIDIA .*GTX *47.* 5 1 1 4.2
-NVIDIA GTX 480 .*NVIDIA .*GTX *48.* 5 1 1 4.2
-NVIDIA 510 .*NVIDIA .* 510.* 3 1 0 0
-NVIDIA GT 520 .*NVIDIA .*GT *52.* 3 1 1 4.2
-NVIDIA GT 530 .*NVIDIA .*GT *53.* 3 1 1 4.2
-NVIDIA GT 540 .*NVIDIA .*GT *54.* 3 1 1 4.2
-NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 5 1 1 4.3
-NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 5 1 1 4.2
-NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 5 1 1 4.2
-NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 5 1 1 4.3
-NVIDIA GTX 590 .*NVIDIA .*GTX *59.* 5 1 1 4.2
-NVIDIA GT 610 .*NVIDIA .*GT *61.* 3 1 1 4.2
-NVIDIA GT 620 .*NVIDIA .*GT *62.* 3 1 0 4.2
-NVIDIA GT 630 .*NVIDIA .*GT *63.* 3 1 0 4.2
-NVIDIA GT 640 .*NVIDIA .*GT *64.* 3 1 0 4.3
-NVIDIA GT 650 .*NVIDIA .*GT *65.* 3 1 1 4.2
-NVIDIA GTX 650 .*NVIDIA .*GTX *65.* 3 1 1 4.2
-NVIDIA GTX 660 .*NVIDIA .*GTX *66.* 5 1 0 4.3
-NVIDIA GTX 670 .*NVIDIA .*GTX *67.* 5 1 1 4.2
-NVIDIA GTX 680 .*NVIDIA .*GTX *68.* 5 1 1 4.2
-NVIDIA GTX 690 .*NVIDIA .*GTX *69.* 5 1 1 4.2
+NVIDIA GT 420 .*NVIDIA .*GT 42.* 3 1 1 4.2
+NVIDIA GT 430 .*NVIDIA .*GT 43.* 3 1 1 4.3
+NVIDIA GT 440 .*NVIDIA .*GT 44.* 4 1 0 4.3
+NVIDIA GTS 450 .*NVIDIA .*GTS 45.* 4 1 1 4.2
+NVIDIA GTX 460 .*NVIDIA .*GTX 46.* 5 1 1 4.3
+NVIDIA GTX 470 .*NVIDIA .*GTX 47.* 5 1 1 4.2
+NVIDIA GTX 480 .*NVIDIA .*GTX 48.* 5 1 1 4.2
+NVIDIA 510 .*NVIDIA .* 510.* 3 1 0 4.2
+NVIDIA GT 520 .*NVIDIA .*GT 52.* 3 1 1 4.2
+NVIDIA GT 530 .*NVIDIA .*GT 53.* 3 1 1 4.2
+NVIDIA GT 540 .*NVIDIA .*GT 54.* 3 1 1 4.2
+NVIDIA GTX 550 .*NVIDIA .*GTX 55.* 5 1 1 4.3
+NVIDIA GTX 560 .*NVIDIA .*GTX 56.* 5 1 1 4.3
+NVIDIA GTX 570 .*NVIDIA .*GTX 57.* 5 1 1 4.2
+NVIDIA GTX 580 .*NVIDIA .*GTX 58.* 5 1 1 4.3
+NVIDIA GTX 590 .*NVIDIA .*GTX 59.* 5 1 1 4.2
+NVIDIA 605 .*NVIDIA .* 605.* 3 1 1 4.2
+NVIDIA GT 610 .*NVIDIA .*GT 61.* 3 1 1 4.2
+NVIDIA GT 620 .*NVIDIA .*GT 62.* 3 1 0 4.2
+NVIDIA GT 630 .*NVIDIA .*GT 63.* 3 1 0 4.2
+NVIDIA GT 640 .*NVIDIA .*GT 64.* 3 1 0 4.2
+NVIDIA GT 650 .*NVIDIA .*GT 65.* 3 1 1 4.2
+NVIDIA GTX 650 .*NVIDIA .*GTX 65.* 3 1 1 4.2
+NVIDIA GTX 660 .*NVIDIA .*GTX 66.* 5 1 0 4.3
+NVIDIA GTX 670 .*NVIDIA .*GTX 67.* 5 1 1 4.2
+NVIDIA GTX 680 .*NVIDIA .*GTX 68.* 5 1 1 4.2
+NVIDIA GTX 690 .*NVIDIA .*GTX 69.* 5 1 1 4.2
NVIDIA C51 .*NVIDIA .*C51.* 0 1 1 2
NVIDIA G72 .*NVIDIA .*G72.* 1 1 0 0
NVIDIA G73 .*NVIDIA .*G73.* 1 1 0 0
@@ -437,13 +407,7 @@ NVIDIA G86 .*NVIDIA .*G86.* 3 1 0 0
NVIDIA G92 .*NVIDIA .*G92.* 3 1 0 0
NVIDIA GeForce .*GeForce 256.* 0 0 0 0
NVIDIA GeForce 2 .*GeForce ?2 ?.* 0 1 1 1.5
-NVIDIA GeForce 3 .*GeForce ?3 ?.* 2 1 1 2.1
-NVIDIA GeForce 3 Ti .*GeForce ?3 Ti.* 0 1 0 0
NVIDIA GeForce 4 .*NVIDIA .*GeForce ?4.* 0 1 1 1.5
-NVIDIA GeForce 4 Go .*NVIDIA .*GeForce ?4.*Go.* 0 1 0 0
-NVIDIA GeForce 4 MX .*NVIDIA .*GeForce ?4 MX.* 0 1 0 0
-NVIDIA GeForce 4 PCX .*NVIDIA .*GeForce ?4 PCX.* 0 1 0 0
-NVIDIA GeForce 4 Ti .*NVIDIA .*GeForce ?4 Ti.* 0 1 0 0
NVIDIA GeForce 6100 .*NVIDIA .*GeForce 61.* 3 1 1 4.2
NVIDIA GeForce 6200 .*NVIDIA .*GeForce 62.* 0 1 1 2.1
NVIDIA GeForce 6500 .*NVIDIA .*GeForce 65.* 1 1 1 2.1
@@ -458,33 +422,33 @@ NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 2 1 1 2.1
NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1 1 2.1
NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1 1 2.1
NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 3 1 1 2.1
-NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1 0 0
-NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1 0 3.3
-NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1 0 2.1
+NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1 0 3.3
+NVIDIA GeForce 8200M .*NVIDIA .*GeForce 820[0-9]M.* 1 1 0 3.3
+NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1 0 3.3
NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 3 1 1 3.3
-NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 1 1 1 3.3
+NVIDIA GeForce 8400M .*NVIDIA .*GeForce 840[0-9]M.* 1 1 1 3.3
NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1 1 3.3
NVIDIA GeForce 8500 .*NVIDIA .*GeForce 85.* 2 1 1 3.3
-NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 2 1 1 3.3
+NVIDIA GeForce 8600M .*NVIDIA .*GeForce 860[0-9]M.* 2 1 1 3.3
NVIDIA GeForce 8600 .*NVIDIA .*GeForce 86.* 3 1 1 3.3
-NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 2 1 1 3.3
+NVIDIA GeForce 8700M .*NVIDIA .*GeForce 870[0-9]M.* 2 1 1 3.3
NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1 0 0
-NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 2 1 1 3.3
+NVIDIA GeForce 8800M .*NVIDIA .*GeForce 880[0-9]M.* 2 1 1 3.3
NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1 1 3.3
-NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1 0 0
+NVIDIA GeForce 9100M .*NVIDIA .*GeForce 910[0-9]M.* 0 1 0 3.3
NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1 0 3.3
-NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1 0 3.1
+NVIDIA GeForce 9200M .*NVIDIA .*GeForce 920[0-9]M.* 1 1 0 3.3
NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1 0 3.3
-NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 1 1 1 3.3
+NVIDIA GeForce 9300M .*NVIDIA .*GeForce 930[0-9]M.* 1 1 1 3.3
NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 1 1 1 3.3
-NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1 1 3.3
+NVIDIA GeForce 9400M .*NVIDIA .*GeForce 940[0-9]M.* 2 1 1 3.3
NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 3 1 1 3.3
-NVIDIA GeForce 9500M .*NVIDIA .*GeForce 9500M.* 1 1 1 3.3
+NVIDIA GeForce 9500M .*NVIDIA .*GeForce 950[0-9]M.* 1 1 1 3.3
NVIDIA GeForce 9500 .*NVIDIA .*GeForce 95.* 3 1 1 3.3
-NVIDIA GeForce 9600M .*NVIDIA .*GeForce 9600M.* 2 1 1 3.3
+NVIDIA GeForce 9600M .*NVIDIA .*GeForce 960[0-9]M.* 2 1 1 3.3
NVIDIA GeForce 9600 .*NVIDIA .*GeForce 96.* 3 1 1 3.3
-NVIDIA GeForce 9700M .*NVIDIA .*GeForce 9700M.* 0 1 1 3.3
-NVIDIA GeForce 9800M .*NVIDIA .*GeForce 9800M.* 2 1 1 3.3
+NVIDIA GeForce 9700M .*NVIDIA .*GeForce 970[0-9]M.* 0 1 1 3.3
+NVIDIA GeForce 9800M .*NVIDIA .*GeForce 980[0-9]M.* 2 1 1 3.3
NVIDIA GeForce 9800 .*NVIDIA .*GeForce 98.* 3 1 1 3.3
NVIDIA GeForce FX 5100 .*NVIDIA .*GeForce FX 51.* 0 1 0 0
NVIDIA GeForce FX 5200 .*NVIDIA .*GeForce FX 52.* 0 1 0 2.1
@@ -495,7 +459,7 @@ NVIDIA GeForce FX 5700 .*NVIDIA .*GeForce FX 57.* 0 1 1 2.1
NVIDIA GeForce FX 5800 .*NVIDIA .*GeForce FX 58.* 1 1 0 0
NVIDIA GeForce FX 5900 .*NVIDIA .*GeForce FX 59.* 1 1 1 2.1
NVIDIA GeForce FX Go5100 .*NVIDIA .*GeForce FX Go51.* 0 1 0 0
-NVIDIA GeForce FX Go5200 .*NVIDIA .*GeForce FX Go52.* 0 1 0 0
+NVIDIA GeForce FX Go5200 .*NVIDIA .*GeForce FX Go52.* 0 1 0 1.5
NVIDIA GeForce FX Go5300 .*NVIDIA .*GeForce FX Go53.* 0 1 0 0
NVIDIA GeForce FX Go5500 .*NVIDIA .*GeForce FX Go55.* 0 1 0 0
NVIDIA GeForce FX Go5600 .*NVIDIA .*GeForce FX Go56.* 0 1 1 2.1
@@ -504,13 +468,13 @@ NVIDIA GeForce FX Go5800 .*NVIDIA .*GeForce FX Go58.* 1 1 0 0
NVIDIA GeForce FX Go5900 .*NVIDIA .*GeForce FX Go59.* 1 1 0 0
NVIDIA GeForce FX Go5xxx .*NVIDIA .*GeForce FX Go.* 0 1 0 0
NVIDIA GeForce Go 6100 .*NVIDIA .*GeForce Go 61.* 0 1 1 2.1
-NVIDIA GeForce Go 6200 .*NVIDIA .*GeForce Go 62.* 0 1 0 0
-NVIDIA GeForce Go 6400 .*NVIDIA .*GeForce Go 64.* 1 1 1 2
+NVIDIA GeForce Go 6200 .*NVIDIA .*GeForce Go 62.* 0 1 0 1.5
+NVIDIA GeForce Go 6400 .*NVIDIA .*GeForce Go 64.* 1 1 1 2.1
NVIDIA GeForce Go 6500 .*NVIDIA .*GeForce Go 65.* 1 1 0 0
NVIDIA GeForce Go 6600 .*NVIDIA .*GeForce Go 66.* 0 1 1 2.1
NVIDIA GeForce Go 6700 .*NVIDIA .*GeForce Go 67.* 1 1 0 0
NVIDIA GeForce Go 6800 .*NVIDIA .*GeForce Go 68.* 0 1 1 2.1
-NVIDIA GeForce Go 7200 .*NVIDIA .*GeForce Go 72.* 1 1 0 0
+NVIDIA GeForce Go 7200 .*NVIDIA .*GeForce Go 72.* 1 1 0 2.1
NVIDIA GeForce Go 7300 LE .*NVIDIA .*GeForce Go 73.*LE.* 1 1 0 0
NVIDIA GeForce Go 7300 .*NVIDIA .*GeForce Go 73.* 1 1 1 2.1
NVIDIA GeForce Go 7400 .*NVIDIA .*GeForce Go 74.* 1 1 1 2.1
@@ -528,9 +492,9 @@ NVIDIA NB8P .*NVIDIA .*NB8P.* 2 1 0 0
NVIDIA NB9E .*NVIDIA .*NB9E.* 3 1 0 0
NVIDIA NB9M .*NVIDIA .*NB9M.* 1 1 0 0
NVIDIA NB9P .*NVIDIA .*NB9P.* 2 1 0 0
-NVIDIA N10 .*NVIDIA .*N10.* 1 1 0 0
-NVIDIA GeForce PCX .*GeForce PCX.* 0 1 0 0
-NVIDIA Generic .*NVIDIA .*Unknown.* 0 0 0 3
+NVIDIA N10 .*NVIDIA .*N10.* 1 1 0 2.1
+NVIDIA GeForce PCX .*GeForce PCX.* 0 1 0 1.5
+NVIDIA Generic .*NVIDIA .*Unknown.* 0 0 0 2.1
NVIDIA NV17 .*NVIDIA .*NV17.* 0 1 0 0
NVIDIA NV34 .*NVIDIA .*NV34.* 0 1 0 0
NVIDIA NV35 .*NVIDIA .*NV35.* 0 1 0 0
@@ -540,7 +504,7 @@ NVIDIA NV43 .*NVIDIA .*NV43.* 1 1 0 0
NVIDIA NV44 .*NVIDIA .*NV44.* 1 1 0 0
NVIDIA nForce .*NVIDIA .*nForce.* 0 0 0 3.3
NVIDIA MCP51 .*NVIDIA .*MCP51.* 1 1 0 0
-NVIDIA MCP61 .*NVIDIA .*MCP61.* 1 1 0 0
+NVIDIA MCP61 .*NVIDIA .*MCP61.* 1 1 0 2.1
NVIDIA MCP67 .*NVIDIA .*MCP67.* 1 1 0 0
NVIDIA MCP68 .*NVIDIA .*MCP68.* 1 1 0 0
NVIDIA MCP73 .*NVIDIA .*MCP73.* 1 1 0 0
@@ -548,44 +512,44 @@ NVIDIA MCP77 .*NVIDIA .*MCP77.* 1 1 0 0
NVIDIA MCP78 .*NVIDIA .*MCP78.* 1 1 0 0
NVIDIA MCP79 .*NVIDIA .*MCP79.* 1 1 0 0
NVIDIA MCP7A .*NVIDIA .*MCP7A.* 1 1 0 0
-NVIDIA Quadro2 .*Quadro2.* 0 1 0 0
-NVIDIA Quadro 1000M .*Quadro.*1000M.* 2 1 0 4.2
-NVIDIA Quadro 2000 M/D .*Quadro.*2000.* 3 1 0 4.2
-NVIDIA Quadro 3000M .*Quadro.*3000M.* 3 1 0 0
-NVIDIA Quadro 4000M .*Quadro.*4000M.* 3 1 0 0
-NVIDIA Quadro 4000 .*Quadro *4000.* 3 1 0 4.2
-NVIDIA Quadro 50x0 M .*Quadro.*50.0.* 3 1 0 0
+NVIDIA Quadro2 .*Quadro2.* 0 1 0 1.5
+NVIDIA Quadro 1000M .*Quadro.* (K1|1)00[0-9]M.* 2 1 0 4.2
+NVIDIA Quadro 2000 M/D .*Quadro.* (K2|2)000.* 3 1 0 4.2
+NVIDIA Quadro 3000M .*Quadro.* (K3|3)00[0-9]M.* 3 1 0 4.2
+NVIDIA Quadro 4000M .*Quadro.* (K4|4)00[0-9]M.* 3 1 0 4.2
+NVIDIA Quadro 4000 .*Quadro 4000.* 3 1 0 4.2
+NVIDIA Quadro 50x0 M .*Quadro.* 50.0.* 3 1 0 4.2
NVIDIA Quadro 6000 .*Quadro.* 6000.* 3 1 0 0
NVIDIA Quadro 400 .*Quadro.* 400.* 2 1 0 3.3
-NVIDIA Quadro 600 .*Quadro.*600.* 2 1 0 3.3
-NVIDIA Quadro4 .*Quadro4.* 0 1 0 0
+NVIDIA Quadro 600 .*Quadro.* 600.* 2 1 0 4.2
+NVIDIA Quadro4 .*Quadro4.* 0 1 0 1.5
NVIDIA Quadro DCC .*Quadro DCC.* 0 1 0 0
NVIDIA Quadro CX .*Quadro.*CX.* 3 1 0 0
-NVIDIA Quadro FX 770M .*Quadro.*FX *770M.* 2 1 0 0
-NVIDIA Quadro FX 1500M .*Quadro.*FX *1500M.* 1 1 0 2.1
-NVIDIA Quadro FX 1600M .*Quadro.*FX *1600M.* 2 1 0 0
-NVIDIA Quadro FX 2500M .*Quadro.*FX *2500M.* 2 1 0 0
-NVIDIA Quadro FX 2700M .*Quadro.*FX *2700M.* 3 1 0 0
-NVIDIA Quadro FX 2800M .*Quadro.*FX *2800M.* 3 1 0 3.3
-NVIDIA Quadro FX 3500 .*Quadro.*FX *3500.* 2 1 0 2.1
-NVIDIA Quadro FX 3600 .*Quadro.*FX *3600.* 3 1 0 0
-NVIDIA Quadro FX 3700 .*Quadro.*FX *3700.* 3 1 0 3.3
-NVIDIA Quadro FX 3800 .*Quadro.*FX *3800.* 3 1 0 3.2
-NVIDIA Quadro FX 4500 .*Quadro.*FX *45.* 3 1 0 0
-NVIDIA Quadro FX 880M .*Quadro.*FX *880M.* 3 1 0 3.3
-NVIDIA Quadro FX 4800 .*NVIDIA .*Quadro *FX *4800.* 3 1 0 0
+NVIDIA Quadro FX 770M .*Quadro.*FX 77[0-9]M.* 2 1 0 3.3
+NVIDIA Quadro FX 1500M .*Quadro.*FX 150[0-9]M.* 1 1 0 2.1
+NVIDIA Quadro FX 1600M .*Quadro.*FX 160[0-9]M.* 2 1 0 3.3
+NVIDIA Quadro FX 2500M .*Quadro.*FX 250[0-9]M.* 2 1 0 2.1
+NVIDIA Quadro FX 2700M .*Quadro.*FX 270[0-9]M.* 3 1 0 3.3
+NVIDIA Quadro FX 2800M .*Quadro.*FX 280[0-9]M.* 3 1 0 3.3
+NVIDIA Quadro FX 3500 .*Quadro.*FX 3500.* 2 1 0 2.1
+NVIDIA Quadro FX 3600 .*Quadro.*FX 3600.* 3 1 0 3.3
+NVIDIA Quadro FX 3700 .*Quadro.*FX 3700.* 3 1 0 3.3
+NVIDIA Quadro FX 3800 .*Quadro.*FX 3800.* 3 1 0 3.3
+NVIDIA Quadro FX 4500 .*Quadro.*FX 45.* 3 1 0 2.1
+NVIDIA Quadro FX 880M .*Quadro.*FX 88[0-9]M.* 3 1 0 3.3
+NVIDIA Quadro FX 4800 .*NVIDIA .*Quadro FX 4800.* 3 1 0 3.1
NVIDIA Quadro FX .*Quadro FX.* 1 1 0 3.3
-NVIDIA Quadro NVS 1xxM .*Quadro NVS *1.[05]M.* 0 1 1 3.3
-NVIDIA Quadro NVS 300M .*NVIDIA .*NVS *300M.* 2 1 0 0
-NVIDIA Quadro NVS 320M .*NVIDIA .*NVS *320M.* 2 1 0 0
-NVIDIA Quadro NVS 2100M .*NVIDIA .*NVS *2100M.* 2 1 0 0
-NVIDIA Quadro NVS 3100M .*NVIDIA .*NVS *3100M.* 2 1 0 0
-NVIDIA Quadro NVS 4200M .*NVIDIA .*NVS *4200M.* 2 1 0 4.1
-NVIDIA Quadro NVS 5100M .*NVIDIA .*NVS *5100M.* 2 1 0 0
-NVIDIA Quadro NVS .*NVIDIA .*NVS 0 1 0 3.2
+NVIDIA Quadro NVS 1xxM .*Quadro NVS 1.[05]M.* 0 1 1 3.3
+NVIDIA Quadro NVS 300M .*NVIDIA .*NVS 30[0-9]M.* 2 1 0 0
+NVIDIA Quadro NVS 320M .*NVIDIA .*NVS 32[0-9]M.* 2 1 0 0
+NVIDIA Quadro NVS 2100M .*NVIDIA .*NVS 210[0-9]M.* 2 1 0 3.3
+NVIDIA Quadro NVS 3100M .*NVIDIA .*NVS 310[0-9]M.* 2 1 0 3.3
+NVIDIA Quadro NVS 4200M .*NVIDIA .*NVS 420[0-9]M.* 2 1 0 4.2
+NVIDIA Quadro NVS 5100M .*NVIDIA .*NVS 510[0-9]M.* 2 1 0 0
+NVIDIA Quadro NVS .*NVIDIA .*NVS 0 1 0 4.2
NVIDIA Corporation N12P .*NVIDIA .*N12P.* 1 1 1 4.1
-NVIDIA Corporation N11M .*NVIDIA .*N11M.* 2 1 0 0
-NVIDIA RIVA TNT .*RIVA TNT.* 0 0 0 0
+NVIDIA Corporation N11M .*NVIDIA .*N11M.* 2 1 0 3.1
+NVIDIA RIVA TNT .*RIVA TNT.* 0 0 0 1.5
S3 .*S3 Graphics.* 0 0 1 1.4
SiS SiS.* 0 0 1 1.5
Trident Trident.* 0 0 0 0
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3e94c5edf7..1a96699cff 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3048,6 +3048,30 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request)
sendReliableMessage();
}
+// Send a message to the region to stop the NULL animation state
+// This will reset animation state overrides for the agent.
+void LLAgent::sendAnimationStateReset()
+{
+ if (gAgentID.isNull() || !mRegionp)
+ {
+ return;
+ }
+
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_AgentAnimation);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, getID());
+ msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
+
+ msg->nextBlockFast(_PREHASH_AnimationList);
+ msg->addUUIDFast(_PREHASH_AnimID, LLUUID::null );
+ msg->addBOOLFast(_PREHASH_StartAnim, FALSE);
+
+ msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
+ msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0);
+ sendReliableMessage();
+}
+
void LLAgent::sendWalkRun(bool running)
{
LLMessageSystem* msgsys = gMessageSystem;
@@ -4126,6 +4150,8 @@ void LLAgent::stopCurrentAnimations()
// avatar, propagating this change back to the server.
if (isAgentAvatarValid())
{
+ LLDynamicArray<LLUUID> anim_ids;
+
for ( LLVOAvatar::AnimIterator anim_it =
gAgentAvatarp->mPlayingAnimations.begin();
anim_it != gAgentAvatarp->mPlayingAnimations.end();
@@ -4143,10 +4169,15 @@ void LLAgent::stopCurrentAnimations()
// stop this animation locally
gAgentAvatarp->stopMotion(anim_it->first, TRUE);
// ...and tell the server to tell everyone.
- sendAnimationRequest(anim_it->first, ANIM_REQUEST_STOP);
+ anim_ids.push_back(anim_it->first);
}
}
+ sendAnimationRequests(anim_ids, ANIM_REQUEST_STOP);
+
+ // Tell the region to clear any animation state overrides.
+ sendAnimationStateReset();
+
// re-assert at least the default standing animation, because
// viewers get confused by avs with no associated anims.
sendAnimationRequest(ANIM_AGENT_STAND,
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index f5f26f69d8..c5b4476318 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -431,6 +431,8 @@ public:
void onAnimStop(const LLUUID& id);
void sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimRequest request);
void sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request);
+ void sendAnimationStateReset();
+
void endAnimationUpdateUI();
void unpauseAnimation() { mPauseRequest = NULL; }
BOOL getCustomAnim() const { return mCustomAnim; }
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f92274dbbd..1874cba4a4 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -96,6 +96,7 @@
#include "llupdaterservice.h"
#include "llfloatertexturefetchdebugger.h"
#include "llspellcheck.h"
+#include "llavatarrenderinfoaccountant.h"
// Linden library includes
#include "llavatarnamecache.h"
@@ -570,7 +571,7 @@ static void settings_to_globals()
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
-
+ LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures");
LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor");
@@ -4599,11 +4600,6 @@ void LLAppViewer::idle()
llinfos << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << llendl;
gObjectList.mNumDeadObjectUpdates = 0;
}
- if (gObjectList.mNumUnknownKills)
- {
- llinfos << "Kills on unknown objects: " << gObjectList.mNumUnknownKills << llendl;
- gObjectList.mNumUnknownKills = 0;
- }
if (gObjectList.mNumUnknownUpdates)
{
llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl;
@@ -4840,6 +4836,9 @@ void LLAppViewer::idle()
gObjectList.updateApparentAngles(gAgent);
}
+ // Update AV render info
+ LLAvatarRenderInfoAccountant::idle();
+
{
LLFastTimer t(FTM_AUDIO_UPDATE);
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
new file mode 100644
index 0000000000..da4b6cf806
--- /dev/null
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -0,0 +1,371 @@
+/**
+ * @file llavatarrenderinfoaccountant.cpp
+ * @author Dave Simmons
+ * @date 2013-02-28
+ * @brief
+ *
+ * $LicenseInfo:firstyear=2013&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2013, 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$
+ */
+
+// Precompiled header
+#include "llviewerprecompiledheaders.h"
+// associated header
+#include "llavatarrenderinfoaccountant.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "llcharacter.h"
+#include "llhttpclient.h"
+#include "lltimer.h"
+#include "llviewercontrol.h"
+#include "llviewerobjectlist.h"
+#include "llviewerregion.h"
+#include "llvoavatar.h"
+#include "llworld.h"
+
+
+static const std::string KEY_AGENTS = "agents"; // map
+static const std::string KEY_WEIGHT = "weight"; // integer
+static const std::string KEY_GEOMETRY = "geometry"; // integer
+static const std::string KEY_SURFACE = "surface"; // float
+
+static const std::string KEY_IDENTIFIER = "identifier";
+static const std::string KEY_MESSAGE = "message";
+static const std::string KEY_ERROR = "error";
+
+
+// Send data updates about once per minute, only need per-frame resolution
+LLFrameTimer LLAvatarRenderInfoAccountant::sRenderInfoReportTimer;
+
+
+// HTTP responder class for GET request for avatar render weight information
+class LLAvatarRenderInfoGetResponder : public LLHTTPClient::Responder
+{
+public:
+ LLAvatarRenderInfoGetResponder(U64 region_handle) : mRegionHandle(region_handle)
+ {
+ }
+
+ virtual void error(U32 statusNum, const std::string& reason)
+ {
+ LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
+ if (regionp)
+ {
+ llwarns << "HTTP error result for avatar weight GET: " << statusNum
+ << ", " << reason
+ << " returned by region " << regionp->getName()
+ << llendl;
+ }
+ else
+ {
+ llwarns << "Avatar render weight GET error recieved but region not found for "
+ << mRegionHandle
+ << ", error " << statusNum
+ << ", " << reason
+ << llendl;
+ }
+
+ }
+
+ virtual void result(const LLSD& content)
+ {
+ LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
+ if (regionp)
+ {
+ if (LLAvatarRenderInfoAccountant::logRenderInfo())
+ {
+ llinfos << "Result for avatar weights request for region " << regionp->getName() << ":" << llendl;
+ }
+
+ if (content.isMap())
+ {
+ if (content.has(KEY_AGENTS))
+ {
+ const LLSD & agents = content[KEY_AGENTS];
+ if (agents.isMap())
+ {
+ LLSD::map_const_iterator report_iter = agents.beginMap();
+ while (report_iter != agents.endMap())
+ {
+ LLUUID target_agent_id = LLUUID(report_iter->first);
+ const LLSD & agent_info_map = report_iter->second;
+ LLViewerObject* avatarp = gObjectList.findObject(target_agent_id);
+ if (avatarp &&
+ avatarp->isAvatar() &&
+ agent_info_map.isMap())
+ { // Extract the data for this avatar
+
+ if (LLAvatarRenderInfoAccountant::logRenderInfo())
+ {
+ llinfos << " Agent " << target_agent_id
+ << ": " << agent_info_map << llendl;
+ }
+
+ if (agent_info_map.has(KEY_WEIGHT))
+ {
+ ((LLVOAvatar *) avatarp)->setReportedVisualComplexity(agent_info_map[KEY_WEIGHT].asInteger());
+ }
+ if (agent_info_map.has(KEY_GEOMETRY))
+ {
+ ((LLVOAvatar *) avatarp)->setReportedAttachmentGeometryBytes(agent_info_map[KEY_GEOMETRY].asInteger());
+ }
+ if (agent_info_map.has(KEY_SURFACE))
+ {
+ ((LLVOAvatar *) avatarp)->setReportedAttachmentSurfaceArea((F32) agent_info_map[KEY_SURFACE].asReal());
+ }
+ }
+ report_iter++;
+ }
+ }
+ } // has "agents"
+ else if (content.has(KEY_ERROR))
+ {
+ const LLSD & error = content[KEY_ERROR];
+ llwarns << "Avatar render info GET error: "
+ << error[KEY_IDENTIFIER]
+ << ": " << error[KEY_MESSAGE]
+ << " from region " << regionp->getName()
+ << llendl;
+ }
+ }
+ }
+ else
+ {
+ llinfos << "Avatar render weight info recieved but region not found for "
+ << mRegionHandle << llendl;
+ }
+ }
+
+private:
+ U64 mRegionHandle;
+};
+
+
+// HTTP responder class for POST request for avatar render weight information
+class LLAvatarRenderInfoPostResponder : public LLHTTPClient::Responder
+{
+public:
+ LLAvatarRenderInfoPostResponder(U64 region_handle) : mRegionHandle(region_handle)
+ {
+ }
+
+ virtual void error(U32 statusNum, const std::string& reason)
+ {
+ LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
+ if (regionp)
+ {
+ llwarns << "HTTP error result for avatar weight POST: " << statusNum
+ << ", " << reason
+ << " returned by region " << regionp->getName()
+ << llendl;
+ }
+ else
+ {
+ llwarns << "Avatar render weight POST error recieved but region not found for "
+ << mRegionHandle
+ << ", error " << statusNum
+ << ", " << reason
+ << llendl;
+ }
+ }
+
+ virtual void result(const LLSD& content)
+ {
+ LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
+ if (regionp)
+ {
+ if (LLAvatarRenderInfoAccountant::logRenderInfo())
+ {
+ llinfos << "Result for avatar weights POST for region " << regionp->getName()
+ << ": " << content << llendl;
+ }
+
+ if (content.isMap())
+ {
+ if (content.has(KEY_ERROR))
+ {
+ const LLSD & error = content[KEY_ERROR];
+ llwarns << "Avatar render info POST error: "
+ << error[KEY_IDENTIFIER]
+ << ": " << error[KEY_MESSAGE]
+ << " from region " << regionp->getName()
+ << llendl;
+ }
+ }
+ }
+ else
+ {
+ llinfos << "Avatar render weight POST result recieved but region not found for "
+ << mRegionHandle << llendl;
+ }
+ }
+
+private:
+ U64 mRegionHandle;
+};
+
+
+// static
+// Send request for one region, no timer checks
+void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regionp)
+{
+ std::string url = regionp->getCapability("AvatarRenderInfo");
+ if (!url.empty())
+ {
+ if (logRenderInfo())
+ {
+ llinfos << "Sending avatar render info to region "
+ << regionp->getName()
+ << " from " << url
+ << llendl;
+ }
+
+ // Build the render info to POST to the region
+ LLSD report = LLSD::emptyMap();
+ LLSD agents = LLSD::emptyMap();
+
+ std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
+ while( iter != LLCharacter::sInstances.end() )
+ {
+ LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter);
+ if (avatar &&
+ avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded)
+ !avatar->isDead() && // Not dead yet
+ avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region
+ {
+ avatar->calculateUpdateRenderCost(); // Make sure the numbers are up-to-date
+
+ LLSD info = LLSD::emptyMap();
+ if (avatar->getVisualComplexity() > 0)
+ {
+ info[KEY_WEIGHT] = avatar->getVisualComplexity();
+ }
+ if (avatar->getAttachmentGeometryBytes() > 0)
+ {
+ info[KEY_GEOMETRY] = (S32) avatar->getAttachmentGeometryBytes();
+ }
+ if (avatar->getAttachmentSurfaceArea() > 0.f)
+ {
+ info[KEY_SURFACE] = avatar->getAttachmentSurfaceArea();
+ }
+ if (info.size() > 0)
+ {
+ agents[avatar->getID().asString()] = info;
+ }
+
+ if (logRenderInfo())
+ {
+ llinfos << "Sending avatar render info for " << avatar->getID()
+ << ": " << info << llendl;
+ }
+ }
+ iter++;
+ }
+
+ report[KEY_AGENTS] = agents;
+ if (agents.size() > 0)
+ {
+ LLHTTPClient::post(url, report, new LLAvatarRenderInfoPostResponder(regionp->getHandle()));
+ }
+ }
+}
+
+
+
+
+// static
+// Send request for one region, no timer checks
+void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regionp)
+{
+ std::string url = regionp->getCapability("AvatarRenderInfo");
+ if (!url.empty())
+ {
+ if (logRenderInfo())
+ {
+ llinfos << "Requesting avatar render info for region "
+ << regionp->getName()
+ << " from " << url
+ << llendl;
+ }
+
+ // First send a request to get the latest data
+ LLHTTPClient::get(url, new LLAvatarRenderInfoGetResponder(regionp->getHandle()));
+ }
+}
+
+
+// static
+// Called every frame - send render weight requests to every region
+void LLAvatarRenderInfoAccountant::idle()
+{
+ if (sRenderInfoReportTimer.hasExpired())
+ {
+ const F32 SECS_BETWEEN_REGION_SCANS = 5.f; // Scan the region list every 5 seconds
+ const F32 SECS_BETWEEN_REGION_REQUEST = 60.0; // Update each region every 60 seconds
+
+ S32 num_avs = LLCharacter::sInstances.size();
+
+ // Check all regions and see if it's time to fetch/send data
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ if (regionp &&
+ regionp->isAlive() &&
+ regionp->capabilitiesReceived() && // Region has capability URLs available
+ regionp->getRenderInfoRequestTimer().hasExpired()) // Time to make request
+ {
+ sendRenderInfoToRegion(regionp);
+ getRenderInfoFromRegion(regionp);
+
+ // Reset this regions timer, moving to longer intervals if there are lots of avatars around
+ regionp->getRenderInfoRequestTimer().resetWithExpiry(SECS_BETWEEN_REGION_REQUEST + (2.f * num_avs));
+ }
+ }
+
+ // We scanned all the regions, reset the request timer.
+ sRenderInfoReportTimer.resetWithExpiry(SECS_BETWEEN_REGION_SCANS);
+ }
+}
+
+
+// static
+// Make sRenderInfoReportTimer expire so the next call to idle() will scan and query a new region
+// called via LLViewerRegion::setCapabilitiesReceived() boost signals when the capabilities
+// are returned for a new LLViewerRegion, and is the earliest time to get render info
+void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer()
+{
+ if (logRenderInfo())
+ {
+ llinfos << "Viewer has new region capabilities" << llendl;
+ }
+
+ sRenderInfoReportTimer.resetWithExpiry(0.f);
+}
+
+// static
+bool LLAvatarRenderInfoAccountant::logRenderInfo()
+{
+ static LLCachedControl<bool> render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging");
+ return render_mute_logging_enabled;
+}
diff --git a/indra/newview/llavatarrenderinfoaccountant.h b/indra/newview/llavatarrenderinfoaccountant.h
new file mode 100644
index 0000000000..97dd9f0ad3
--- /dev/null
+++ b/indra/newview/llavatarrenderinfoaccountant.h
@@ -0,0 +1,56 @@
+/**
+ * @file llavatarrenderinfoaccountant.h
+ * @author Dave Simmons
+ * @date 2013-02-28
+ * @brief
+ *
+ * $LicenseInfo:firstyear=2013&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2013, 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$
+ */
+
+#if ! defined(LL_llavatarrenderinfoaccountant_H)
+#define LL_llavatarrenderinfoaccountant_H
+
+class LLViewerRegion;
+
+// Class to gather avatar rendering information
+// that is sent to or fetched from regions.
+class LLAvatarRenderInfoAccountant
+{
+public:
+ LLAvatarRenderInfoAccountant() {};
+ ~LLAvatarRenderInfoAccountant() {};
+
+ static void sendRenderInfoToRegion(LLViewerRegion * regionp);
+ static void getRenderInfoFromRegion(LLViewerRegion * regionp);
+
+ static void expireRenderInfoReportTimer();
+
+ static void idle();
+
+ static bool logRenderInfo();
+
+private:
+ // Send data updates about once per minute, only need per-frame resolution
+ static LLFrameTimer sRenderInfoReportTimer;
+};
+
+#endif /* ! defined(LL_llavatarrenderinfoaccountant_H) */
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 8766585049..8766585049 100755..100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index b6c53e5e30..b6c53e5e30 100755..100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 3eb2e63792..3eb2e63792 100755..100644
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 8c9fd4152a..14c09a2393 100755
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -254,7 +254,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
return count;
}
-static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face", true);
+static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face");
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 04e31e6486..714f9a1718 100755
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -504,6 +504,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba
{
params.mGroup->rebuildMesh();
}
+
params.mVertexBuffer->setBuffer(mask);
params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index c832e1401d..2f6e895cb7 100755
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -331,10 +331,15 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
if (group->mSpatialPartition->mRenderByGroup &&
!group->isDead())
{
- bool draw_glow_for_this_partition = mVertexShaderLevel > 0 && // no shaders = no glow.
- // All particle systems seem to come off the wire with texture entries which claim that they glow. This is probably a bug in the data. Suppress.
- group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_PARTICLE &&
- group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD_PARTICLE;
+ static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group");
+ LLFastTimer t(FTM_RENDER_ALPHA_GROUP_LOOP);
+
+ bool draw_glow_for_this_partition = mVertexShaderLevel > 0; // no shaders = no glow.
+
+ bool disable_cull = group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_PARTICLE ||
+ group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE;
+
+ LLGLDisable cull(disable_cull ? GL_CULL_FACE : 0);
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
@@ -500,32 +505,32 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
}
}
- params.mVertexBuffer->setBuffer(mask);
- params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
- gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
+ static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_PUSH("Alpha Push Verts");
+ {
+ LLFastTimer t(FTM_RENDER_ALPHA_PUSH);
+ gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor);
+ params.mVertexBuffer->setBuffer(mask);
+ params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
+ }
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls could be expensive, but glow must be drawn Z-sorted with alpha.
if (current_shader &&
draw_glow_for_this_partition &&
- params.mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_EMISSIVE))
+ params.mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_EMISSIVE) &&
+ (!params.mParticle || params.mHasGlow))
{
+ static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_GLOW("Alpha Glow");
+ LLFastTimer t(FTM_RENDER_ALPHA_GLOW);
// install glow-accumulating blend mode
gGL.blendFunc(LLRender::BF_ZERO, LLRender::BF_ONE, // don't touch color
LLRender::BF_ONE, LLRender::BF_ONE); // add to alpha (glow)
- emissive_shader->bind();
-
- // glow doesn't use vertex colors from the mesh data
- params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
+ params.mVertexBuffer->setBuffer(mask | LLVertexBuffer::MAP_EMISSIVE);
// do the actual drawing, again
params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
-
- // restore our alpha blend mode
- gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
-
- current_shader->bind();
}
if (tex_setup)
@@ -538,6 +543,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
}
}
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+
LLVertexBuffer::unbind();
if (!light_enabled)
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 075299386e..f3f0b3cce2 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -59,6 +59,7 @@ LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL;
BOOL LLDrawPoolAvatar::sSkipOpaque = FALSE;
BOOL LLDrawPoolAvatar::sSkipTransparent = FALSE;
S32 LLDrawPoolAvatar::sDiffuseChannel = 0;
+F32 LLDrawPoolAvatar::sMinimumAlpha = 0.2f;
static bool is_deferred_render = false;
@@ -135,6 +136,16 @@ void LLDrawPoolAvatar::prerender()
{
sBufferUsage = GL_STREAM_DRAW_ARB;
}
+
+ if (!mDrawFace.empty())
+ {
+ const LLFace *facep = mDrawFace[0];
+ if (facep && facep->getDrawable())
+ {
+ LLVOAvatar* avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get();
+ updateRiggedVertexBuffers(avatarp);
+ }
+ }
}
LLMatrix4& LLDrawPoolAvatar::getModelView()
@@ -272,7 +283,7 @@ void LLDrawPoolAvatar::beginPostDeferredAlpha()
gPipeline.bindDeferredShader(*sVertexProgram);
- sVertexProgram->setMinimumAlpha(0.2f);
+ sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
}
@@ -650,7 +661,7 @@ void LLDrawPoolAvatar::beginRigid()
if (sVertexProgram != NULL)
{ //eyeballs render with the specular shader
sVertexProgram->bind();
- sVertexProgram->setMinimumAlpha(0.2f);
+ sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
}
}
else
@@ -701,7 +712,7 @@ void LLDrawPoolAvatar::beginDeferredRigid()
sVertexProgram = &gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->bind();
- sVertexProgram->setMinimumAlpha(0.2f);
+ sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
}
void LLDrawPoolAvatar::endDeferredRigid()
@@ -759,7 +770,7 @@ void LLDrawPoolAvatar::beginSkinned()
if (LLGLSLShader::sNoFixedFunction)
{
- sVertexProgram->setMinimumAlpha(0.2f);
+ sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
}
}
@@ -1126,7 +1137,7 @@ void LLDrawPoolAvatar::beginDeferredSkinned()
sRenderingSkinned = TRUE;
sVertexProgram->bind();
- sVertexProgram->setMinimumAlpha(0.2f);
+ sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
gGL.getTexUnit(0)->activate();
@@ -1237,7 +1248,10 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (impostor)
{
- if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete())
+ if (LLPipeline::sRenderDeferred && //rendering a deferred impostor
+ !LLPipeline::sReflectionRender &&
+ avatarp->mImpostor.isComplete() && //impostor has required data channels
+ avatarp->mImpostor.getNumTextures() >= 3)
{
if (normal_channel > -1)
{
@@ -1434,6 +1448,65 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
}
}
+void LLDrawPoolAvatar::getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>& buffer, U32 data_mask, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face)
+{
+ face->setGeomIndex(0);
+ face->setIndicesIndex(0);
+
+ //rigged faces do not batch textures
+ face->setTextureIndex(255);
+
+ if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable())
+ { //make a new buffer
+ if (sShaderLevel > 0)
+ {
+ buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB);
+ }
+ else
+ {
+ buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB);
+ }
+ buffer->allocateBuffer(vol_face.mNumVertices, vol_face.mNumIndices, true);
+ }
+ else
+ { //resize existing buffer
+ buffer->resizeBuffer(vol_face.mNumVertices, vol_face.mNumIndices);
+ }
+
+ face->setSize(vol_face.mNumVertices, vol_face.mNumIndices);
+ face->setVertexBuffer(buffer);
+
+ U16 offset = 0;
+
+ LLMatrix4 mat_vert = skin->mBindShapeMatrix;
+ glh::matrix4f m((F32*) mat_vert.mMatrix);
+ m = m.inverse().transpose();
+
+ F32 mat3[] =
+ { m.m[0], m.m[1], m.m[2],
+ m.m[4], m.m[5], m.m[6],
+ m.m[8], m.m[9], m.m[10] };
+
+ LLMatrix3 mat_normal(mat3);
+
+ //let getGeometryVolume know if alpha should override shiny
+ U32 type = gPipeline.getPoolTypeFromTE(face->getTextureEntry(), face->getTexture());
+
+ if (type == LLDrawPool::POOL_ALPHA)
+ {
+ face->setPoolType(LLDrawPool::POOL_ALPHA);
+ }
+ else
+ {
+ face->setPoolType(LLDrawPool::POOL_AVATAR);
+ }
+
+ //llinfos << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << llendl;
+ face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
+
+ buffer->flush();
+}
+
void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* face, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face)
{
LLVector4a* weight = vol_face.mWeights;
@@ -1453,60 +1526,27 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
buffer->getNumIndices() != vol_face.mNumIndices ||
(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
- face->setGeomIndex(0);
- face->setIndicesIndex(0);
-
- //rigged faces do not batch textures
- face->setTextureIndex(255);
-
- if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable())
- { //make a new buffer
- if (sShaderLevel > 0)
+ if (drawable && drawable->isState(LLDrawable::REBUILD_ALL))
+ { //rebuild EVERY face in the drawable, not just this one, to avoid missing drawable wide rebuild issues
+ for (S32 i = 0; i < drawable->getNumFaces(); ++i)
{
- buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB);
- }
- else
- {
- buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB);
+ LLFace* facep = drawable->getFace(i);
+ U32 face_data_mask = facep->getRiggedVertexBufferDataMask();
+ if (face_data_mask)
+ {
+ LLPointer<LLVertexBuffer> cur_buffer = facep->getVertexBuffer();
+ const LLVolumeFace& cur_vol_face = volume->getVolumeFace(i);
+ getRiggedGeometry(facep, cur_buffer, face_data_mask, skin, volume, cur_vol_face);
+ }
}
- buffer->allocateBuffer(vol_face.mNumVertices, vol_face.mNumIndices, true);
- }
- else
- { //resize existing buffer
- buffer->resizeBuffer(vol_face.mNumVertices, vol_face.mNumIndices);
- }
+ drawable->clearState(LLDrawable::REBUILD_ALL);
- face->setSize(vol_face.mNumVertices, vol_face.mNumIndices);
- face->setVertexBuffer(buffer);
-
- U16 offset = 0;
-
- LLMatrix4 mat_vert = skin->mBindShapeMatrix;
- glh::matrix4f m((F32*) mat_vert.mMatrix);
- m = m.inverse().transpose();
-
- F32 mat3[] =
- { m.m[0], m.m[1], m.m[2],
- m.m[4], m.m[5], m.m[6],
- m.m[8], m.m[9], m.m[10] };
-
- LLMatrix3 mat_normal(mat3);
-
- //let getGeometryVolume know if alpha should override shiny
- U32 type = gPipeline.getPoolTypeFromTE(face->getTextureEntry(), face->getTexture());
-
- if (type == LLDrawPool::POOL_ALPHA)
- {
- face->setPoolType(LLDrawPool::POOL_ALPHA);
+ buffer = face->getVertexBuffer();
}
else
- {
- face->setPoolType(LLDrawPool::POOL_AVATAR);
+ { //just rebuild this face
+ getRiggedGeometry(face, buffer, data_mask, skin, volume, vol_face);
}
-
- face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
-
- buffer->flush();
}
if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime())
@@ -1591,11 +1631,6 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
}
}
}
-
- if (drawable && (face->getTEOffset() == drawable->getNumFaces()-1))
- {
- drawable->clearState(LLDrawable::REBUILD_ALL);
- }
}
void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
@@ -1674,7 +1709,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
stop_glerror();
- LLDrawPoolAvatar::sVertexProgram->uniformMatrix4fv("matrixPalette",
+ LLDrawPoolAvatar::sVertexProgram->uniformMatrix4fv(LLViewerShaderMgr::AVATAR_MATRIX,
count,
FALSE,
(GLfloat*) mat[0].mMatrix);
@@ -1751,7 +1786,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
}
}
- if (face->mTextureMatrix)
+ if (face->mTextureMatrix && vobj->mTexAnimMode)
{
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix);
@@ -1765,13 +1800,14 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
buff->setBuffer(data_mask);
buff->drawRange(LLRender::TRIANGLES, start, end, count, offset);
}
+
+ gPipeline.addTrianglesDrawn(count, LLRender::TRIANGLES);
}
}
}
void LLDrawPoolAvatar::renderDeferredRiggedSimple(LLVOAvatar* avatar)
{
- updateRiggedVertexBuffers(avatar);
renderRigged(avatar, RIGGED_DEFERRED_SIMPLE);
}
@@ -1840,7 +1876,6 @@ void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
void LLDrawPoolAvatar::renderRiggedSimple(LLVOAvatar* avatar)
{
- updateRiggedVertexBuffers(avatar);
renderRigged(avatar, RIGGED_SIMPLE);
}
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 7d0368a945..b9d2204052 100755
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -133,6 +133,7 @@ public:
void endDeferredRiggedSimple();
void endDeferredRiggedBump();
+ void getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>& buffer, U32 data_mask, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face);
void updateRiggedFaceVertexBuffer(LLVOAvatar* avatar,
LLFace* facep,
const LLMeshSkinInfo* skin,
@@ -271,6 +272,7 @@ public:
static BOOL sSkipOpaque;
static BOOL sSkipTransparent;
static S32 sDiffuseChannel;
+ static F32 sMinimumAlpha;
static LLGLSLShader* sVertexProgram;
};
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 155e289c9d..6b4c5cfca1 100755
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -461,6 +461,8 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
}
}
}
+ // Moved below shader->disableTexture call to avoid false alarms from auto-re-enable of textures on stage 0
+ // MAINT-755
cube_map->disable();
cube_map->restoreMatrix();
}
@@ -1377,9 +1379,14 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
LLGLDisable blend(GL_BLEND);
gGL.setColorMask(TRUE, TRUE);
gNormalMapGenProgram.bind();
- gNormalMapGenProgram.uniform1f("norm_scale", gSavedSettings.getF32("RenderNormalMapScale"));
- gNormalMapGenProgram.uniform1f("stepX", 1.f/bump->getWidth());
- gNormalMapGenProgram.uniform1f("stepY", 1.f/bump->getHeight());
+
+ static LLStaticHashedString sNormScale("norm_scale");
+ static LLStaticHashedString sStepX("stepX");
+ static LLStaticHashedString sStepY("stepY");
+
+ gNormalMapGenProgram.uniform1f(sNormScale, gSavedSettings.getF32("RenderNormalMapScale"));
+ gNormalMapGenProgram.uniform1f(sStepX, 1.f/bump->getWidth());
+ gNormalMapGenProgram.uniform1f(sStepY, 1.f/bump->getHeight());
LLVector2 v((F32) bump->getWidth()/gPipeline.mScreen.getWidth(),
(F32) bump->getHeight()/gPipeline.mScreen.getHeight());
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 0adb42428d..c3ec234223 100755
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -354,8 +354,8 @@ void LLDrawPoolTerrain::renderFullShader()
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
llassert(shader);
- shader->uniform4fv("object_plane_s", 1, tp0.mV);
- shader->uniform4fv("object_plane_t", 1, tp1.mV);
+ shader->uniform4fv(LLShaderMgr::OBJECT_PLANE_S, 1, tp0.mV);
+ shader->uniform4fv(LLShaderMgr::OBJECT_PLANE_T, 1, tp1.mV);
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
@@ -864,8 +864,8 @@ void LLDrawPoolTerrain::renderSimple()
if (LLGLSLShader::sNoFixedFunction)
{
- sShader->uniform4fv("object_plane_s", 1, tp0.mV);
- sShader->uniform4fv("object_plane_t", 1, tp1.mV);
+ sShader->uniform4fv(LLShaderMgr::OBJECT_PLANE_S, 1, tp0.mV);
+ sShader->uniform4fv(LLShaderMgr::OBJECT_PLANE_T, 1, tp1.mV);
}
else
{
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 5ddc15df42..0d79631182 100755
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -407,8 +407,8 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
}
else
{
- shader->uniform4fv("object_plane_s", 1, tp0);
- shader->uniform4fv("object_plane_t", 1, tp1);
+ shader->uniform4fv(LLShaderMgr::OBJECT_PLANE_S, 1, tp0);
+ shader->uniform4fv(LLShaderMgr::OBJECT_PLANE_T, 1, tp1);
}
gGL.diffuseColor3f(1.f, 1.f, 1.f);
@@ -546,7 +546,7 @@ void LLDrawPoolWater::shade()
sTime = (F32)LLFrameTimer::getElapsedSeconds()*0.5f;
- S32 reftex = shader->enableTexture(LLViewerShaderMgr::WATER_REFTEX);
+ S32 reftex = shader->enableTexture(LLShaderMgr::WATER_REFTEX);
if (reftex > -1)
{
@@ -577,12 +577,12 @@ void LLDrawPoolWater::shade()
mWaterNormp->setFilteringOption(LLTexUnit::TFO_POINT);
}
- S32 screentex = shader->enableTexture(LLViewerShaderMgr::WATER_SCREENTEX);
+ S32 screentex = shader->enableTexture(LLShaderMgr::WATER_SCREENTEX);
if (screentex > -1)
{
- shader->uniform4fv(LLViewerShaderMgr::WATER_FOGCOLOR, 1, sWaterFogColor.mV);
- shader->uniform1f(LLViewerShaderMgr::WATER_FOGDENSITY,
+ shader->uniform4fv(LLShaderMgr::WATER_FOGCOLOR, 1, sWaterFogColor.mV);
+ shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY,
param_mgr->getFogDensity());
gPipeline.mWaterDis.bindTexture(0, screentex);
}
@@ -594,15 +594,9 @@ void LLDrawPoolWater::shade()
if (mVertexShaderLevel == 1)
{
sWaterFogColor.mV[3] = param_mgr->mDensitySliderValue;
- shader->uniform4fv(LLViewerShaderMgr::WATER_FOGCOLOR, 1, sWaterFogColor.mV);
+ shader->uniform4fv(LLShaderMgr::WATER_FOGCOLOR, 1, sWaterFogColor.mV);
}
- F32 screenRes[] =
- {
- 1.f/gGLViewport[2],
- 1.f/gGLViewport[3]
- };
- shader->uniform2fv("screenRes", 1, screenRes);
stop_glerror();
S32 diffTex = shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@@ -614,26 +608,26 @@ void LLDrawPoolWater::shade()
light_diffuse *= 6.f;
//shader->uniformMatrix4fv("inverse_ref", 1, GL_FALSE, (GLfloat*) gGLObliqueProjectionInverse.mMatrix);
- shader->uniform1f(LLViewerShaderMgr::WATER_WATERHEIGHT, eyedepth);
- shader->uniform1f(LLViewerShaderMgr::WATER_TIME, sTime);
- shader->uniform3fv(LLViewerShaderMgr::WATER_EYEVEC, 1, LLViewerCamera::getInstance()->getOrigin().mV);
- shader->uniform3fv(LLViewerShaderMgr::WATER_SPECULAR, 1, light_diffuse.mV);
- shader->uniform1f(LLViewerShaderMgr::WATER_SPECULAR_EXP, light_exp);
- shader->uniform2fv(LLViewerShaderMgr::WATER_WAVE_DIR1, 1, param_mgr->getWave1Dir().mV);
- shader->uniform2fv(LLViewerShaderMgr::WATER_WAVE_DIR2, 1, param_mgr->getWave2Dir().mV);
- shader->uniform3fv(LLViewerShaderMgr::WATER_LIGHT_DIR, 1, light_dir.mV);
-
- shader->uniform3fv("normScale", 1, param_mgr->getNormalScale().mV);
- shader->uniform1f("fresnelScale", param_mgr->getFresnelScale());
- shader->uniform1f("fresnelOffset", param_mgr->getFresnelOffset());
- shader->uniform1f("blurMultiplier", param_mgr->getBlurMultiplier());
+ shader->uniform1f(LLShaderMgr::WATER_WATERHEIGHT, eyedepth);
+ shader->uniform1f(LLShaderMgr::WATER_TIME, sTime);
+ shader->uniform3fv(LLShaderMgr::WATER_EYEVEC, 1, LLViewerCamera::getInstance()->getOrigin().mV);
+ shader->uniform3fv(LLShaderMgr::WATER_SPECULAR, 1, light_diffuse.mV);
+ shader->uniform1f(LLShaderMgr::WATER_SPECULAR_EXP, light_exp);
+ shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR1, 1, param_mgr->getWave1Dir().mV);
+ shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR2, 1, param_mgr->getWave2Dir().mV);
+ shader->uniform3fv(LLShaderMgr::WATER_LIGHT_DIR, 1, light_dir.mV);
+
+ shader->uniform3fv(LLShaderMgr::WATER_NORM_SCALE, 1, param_mgr->getNormalScale().mV);
+ shader->uniform1f(LLShaderMgr::WATER_FRESNEL_SCALE, param_mgr->getFresnelScale());
+ shader->uniform1f(LLShaderMgr::WATER_FRESNEL_OFFSET, param_mgr->getFresnelOffset());
+ shader->uniform1f(LLShaderMgr::WATER_BLUR_MULTIPLIER, param_mgr->getBlurMultiplier());
F32 sunAngle = llmax(0.f, light_dir.mV[2]);
F32 scaledAngle = 1.f - sunAngle;
- shader->uniform1f("sunAngle", sunAngle);
- shader->uniform1f("scaledAngle", scaledAngle);
- shader->uniform1f("sunAngle2", 0.1f + 0.2f*sunAngle);
+ shader->uniform1f(LLShaderMgr::WATER_SUN_ANGLE, sunAngle);
+ shader->uniform1f(LLShaderMgr::WATER_SCALED_ANGLE, scaledAngle);
+ shader->uniform1f(LLShaderMgr::WATER_SUN_ANGLE2, 0.1f + 0.2f*sunAngle);
LLColor4 water_color;
LLVector3 camera_up = LLViewerCamera::getInstance()->getUpAxis();
@@ -641,12 +635,12 @@ void LLDrawPoolWater::shade()
if (LLViewerCamera::getInstance()->cameraUnderWater())
{
water_color.setVec(1.f, 1.f, 1.f, 0.4f);
- shader->uniform1f(LLViewerShaderMgr::WATER_REFSCALE, param_mgr->getScaleBelow());
+ shader->uniform1f(LLShaderMgr::WATER_REFSCALE, param_mgr->getScaleBelow());
}
else
{
water_color.setVec(1.f, 1.f, 1.f, 0.5f*(1.f + up_dot));
- shader->uniform1f(LLViewerShaderMgr::WATER_REFSCALE, param_mgr->getScaleAbove());
+ shader->uniform1f(LLShaderMgr::WATER_REFSCALE, param_mgr->getScaleAbove());
}
if (water_color.mV[3] > 0.9f)
@@ -690,11 +684,11 @@ void LLDrawPoolWater::shade()
}
shader->disableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
- shader->disableTexture(LLViewerShaderMgr::WATER_SCREENTEX);
+ shader->disableTexture(LLShaderMgr::WATER_SCREENTEX);
shader->disableTexture(LLViewerShaderMgr::BUMP_MAP);
shader->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- shader->disableTexture(LLViewerShaderMgr::WATER_REFTEX);
- shader->disableTexture(LLViewerShaderMgr::WATER_SCREENDEPTH);
+ shader->disableTexture(LLShaderMgr::WATER_REFTEX);
+ shader->disableTexture(LLShaderMgr::WATER_SCREENDEPTH);
if (deferred_render)
{
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index b5faff7968..b0e69aa9b5 100755
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -152,7 +152,8 @@ void LLDrawPoolWLSky::renderDome(F32 camHeightLocal, LLGLSLShader * shader) cons
gGL.translatef(0.f,-camHeightLocal, 0.f);
// Draw WL Sky
- shader->uniform3f("camPosLocal", 0.f, camHeightLocal, 0.f);
+ static LLStaticHashedString sCamPosLocal("camPosLocal");
+ shader->uniform3f(sCamPosLocal, 0.f, camHeightLocal, 0.f);
gSky.mVOWLSkyp->drawDome();
@@ -207,7 +208,8 @@ void LLDrawPoolWLSky::renderStars(void) const
if (LLGLSLShader::sNoFixedFunction)
{
gCustomAlphaProgram.bind();
- gCustomAlphaProgram.uniform1f("custom_alpha", star_alpha.mV[3]);
+ static LLStaticHashedString sCustomAlpha("custom_alpha");
+ gCustomAlphaProgram.uniform1f(sCustomAlpha, star_alpha.mV[3]);
}
else
{
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 700b31f8d3..b2e3300ab3 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -52,9 +52,20 @@
#include "llviewerwindow.h"
#include "llviewershadermgr.h"
#include "llviewertexture.h"
+#include "llvoavatar.h"
+#if LL_LINUX
+// Work-around spurious used before init warning on Vector4a
+//
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
+
+extern BOOL gGLDebugLoggingEnabled;
#define LL_MAX_INDICES_COUNT 1000000
+static LLStaticHashedString sTextureIndexIn("texture_index_in");
+static LLStaticHashedString sColorIn("color_in");
+
BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE
#define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2])
@@ -318,6 +329,12 @@ void LLFace::dirtyTexture()
if (vobj)
{
vobj->mLODChanged = TRUE;
+
+ LLVOAvatar* avatar = vobj->getAvatar();
+ if (avatar)
+ { //avatar render cost may have changed
+ avatar->updateVisualComplexity();
+ }
}
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE);
}
@@ -768,7 +785,7 @@ bool less_than_max_mag(const LLVector4a& vec)
}
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
+ const LLMatrix4& mat_vert_in, BOOL global_volume)
{
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
@@ -777,10 +794,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
LLMatrix4a mat_vert;
mat_vert.loadu(mat_vert_in);
- LLMatrix4a mat_normal;
- mat_normal.loadu(mat_normal_in);
-
- //VECTORIZE THIS
LLVector4a min,max;
if (f >= volume.getNumVolumeFaces())
@@ -797,98 +810,65 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
llassert(less_than_max_mag(max));
//min, max are in volume space, convert to drawable render space
- LLVector4a center;
- LLVector4a t;
- t.setAdd(min, max);
- t.mul(0.5f);
- mat_vert.affineTransform(t, center);
- LLVector4a size;
- size.setSub(max, min);
- size.mul(0.5f);
- llassert(less_than_max_mag(min));
- llassert(less_than_max_mag(max));
+ //get 8 corners of bounding box
+ LLVector4Logical mask[6];
- if (!global_volume)
+ for (U32 i = 0; i < 6; ++i)
{
- //VECTORIZE THIS
- LLVector4a scale;
- scale.load3(mDrawablep->getVObj()->getScale().mV);
- size.mul(scale);
+ mask[i].clear();
}
- mat_normal.mMatrix[0].normalize3fast();
- mat_normal.mMatrix[1].normalize3fast();
- mat_normal.mMatrix[2].normalize3fast();
+ mask[0].setElement<2>(); //001
+ mask[1].setElement<1>(); //010
+ mask[2].setElement<1>(); //011
+ mask[2].setElement<2>();
+ mask[3].setElement<0>(); //100
+ mask[4].setElement<0>(); //101
+ mask[4].setElement<2>();
+ mask[5].setElement<0>(); //110
+ mask[5].setElement<1>();
- LLVector4a v[4];
+ LLVector4a v[8];
- //get 4 corners of bounding box
- mat_normal.rotate(size,v[0]);
-
- //VECTORIZE THIS
- LLVector4a scale;
-
- scale.set(-1.f, -1.f, 1.f);
- scale.mul(size);
- mat_normal.rotate(scale, v[1]);
-
- scale.set(1.f, -1.f, -1.f);
- scale.mul(size);
- mat_normal.rotate(scale, v[2]);
-
- scale.set(-1.f, 1.f, -1.f);
- scale.mul(size);
- mat_normal.rotate(scale, v[3]);
+ v[6] = min;
+ v[7] = max;
- LLVector4a& newMin = mExtents[0];
- LLVector4a& newMax = mExtents[1];
-
- newMin = newMax = center;
-
- llassert(less_than_max_mag(center));
-
- for (U32 i = 0; i < 4; i++)
+ for (U32 i = 0; i < 6; ++i)
{
- LLVector4a delta;
- delta.setAbs(v[i]);
- LLVector4a min;
- min.setSub(center, delta);
- LLVector4a max;
- max.setAdd(center, delta);
+ v[i].setSelectWithMask(mask[i], min, max);
+ }
- newMin.setMin(newMin,min);
- newMax.setMax(newMax,max);
+ LLVector4a tv[8];
- llassert(less_than_max_mag(newMin));
- llassert(less_than_max_mag(newMax));
+ //transform bounding box into drawable space
+ for (U32 i = 0; i < 8; ++i)
+ {
+ mat_vert.affineTransform(v[i], tv[i]);
}
+
+ //find bounding box
+ LLVector4a& newMin = mExtents[0];
+ LLVector4a& newMax = mExtents[1];
- if (!mDrawablep->isActive())
+ newMin = newMax = tv[0];
+
+ for (U32 i = 1; i < 8; ++i)
{
- LLVector4a offset;
- offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
- newMin.add(offset);
- newMax.add(offset);
-
- llassert(less_than_max_mag(newMin));
- llassert(less_than_max_mag(newMax));
+ newMin.setMin(newMin, tv[i]);
+ newMax.setMax(newMax, tv[i]);
}
- t.setAdd(newMin, newMax);
+ LLVector4a t;
+ t.setAdd(newMin,newMax);
t.mul(0.5f);
- llassert(less_than_max_mag(t));
-
- //VECTORIZE THIS
mCenterLocal.set(t.getF32ptr());
-
- llassert(less_than_max_mag(newMin));
- llassert(less_than_max_mag(newMax));
t.setSub(newMax,newMin);
mBoundingSphereRadius = t.getLength3().getF32()*0.5f;
+
updateCenterAgent();
}
@@ -1169,6 +1149,15 @@ static LLFastTimer::DeclareTimer FTM_FACE_GEOM_COLOR("Color");
static LLFastTimer::DeclareTimer FTM_FACE_GEOM_EMISSIVE("Emissive");
static LLFastTimer::DeclareTimer FTM_FACE_GEOM_WEIGHTS("Weights");
static LLFastTimer::DeclareTimer FTM_FACE_GEOM_TANGENT("Binormal");
+
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK("Face Feedback");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_POSITION("Feedback Position");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_NORMAL("Feedback Normal");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_TEXTURE("Feedback Texture");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_COLOR("Feedback Color");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_EMISSIVE("Feedback Emissive");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_BINORMAL("Feedback Binormal");
+
static LLFastTimer::DeclareTimer FTM_FACE_GEOM_INDEX("Index");
static LLFastTimer::DeclareTimer FTM_FACE_GEOM_INDEX_TAIL("Tail");
static LLFastTimer::DeclareTimer FTM_FACE_POSITION_STORE("Pos");
@@ -1394,12 +1383,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
#ifdef GL_TRANSFORM_FEEDBACK_BUFFER
if (use_transform_feedback &&
+ mVertexBuffer->getUsage() == GL_DYNAMIC_COPY_ARB &&
gTransformPositionProgram.mProgramObject && //transform shaders are loaded
mVertexBuffer->useVBOs() && //target buffer is in VRAM
!rebuild_weights && //TODO: add support for weights
!volume.isUnique()) //source volume is NOT flexi
{ //use transform feedback to pack vertex buffer
-
+ //gGLDebugLoggingEnabled = TRUE;
+ LLFastTimer t(FTM_FACE_GEOM_FEEDBACK);
+ LLGLEnable discard(GL_RASTERIZER_DISCARD);
LLVertexBuffer* buff = (LLVertexBuffer*) vf.mVertexBuffer.get();
if (vf.mVertexBuffer.isNull() || buff->getNumVerts() != vf.mNumVertices)
@@ -1416,7 +1408,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_pos)
{
- LLFastTimer t(FTM_FACE_GEOM_POSITION);
+ LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_POSITION);
gTransformPositionProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_VERTEX, mGeomIndex, mGeomCount);
@@ -1430,7 +1422,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
vp[2] = 0;
vp[3] = 0;
- gTransformPositionProgram.uniform1i("texture_index_in", val);
+ gTransformPositionProgram.uniform1i(sTextureIndexIn, val);
glBeginTransformFeedback(GL_POINTS);
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
@@ -1441,14 +1433,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_color)
{
- LLFastTimer t(FTM_FACE_GEOM_COLOR);
+ LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_COLOR);
gTransformColorProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_COLOR, mGeomIndex, mGeomCount);
S32 val = *((S32*) color.mV);
- gTransformColorProgram.uniform1i("color_in", val);
+ gTransformColorProgram.uniform1i(sColorIn, val);
glBeginTransformFeedback(GL_POINTS);
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
push_for_transform(buff, vf.mNumVertices, mGeomCount);
@@ -1457,7 +1449,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_emissive)
{
- LLFastTimer t(FTM_FACE_GEOM_EMISSIVE);
+ LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_EMISSIVE);
gTransformColorProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_EMISSIVE, mGeomIndex, mGeomCount);
@@ -1469,7 +1461,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
(glow << 16) |
(glow << 24);
- gTransformColorProgram.uniform1i("color_in", glow32);
+ gTransformColorProgram.uniform1i(sColorIn, glow32);
glBeginTransformFeedback(GL_POINTS);
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
push_for_transform(buff, vf.mNumVertices, mGeomCount);
@@ -1478,7 +1470,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_normal)
{
- LLFastTimer t(FTM_FACE_GEOM_NORMAL);
+ LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_NORMAL);
gTransformNormalProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_NORMAL, mGeomIndex, mGeomCount);
@@ -1504,7 +1496,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
- LLFastTimer t(FTM_FACE_GEOM_TEXTURE);
+ LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_TEXTURE);
gTransformTexCoordProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TEXCOORD0, mGeomIndex, mGeomCount);
@@ -1527,13 +1519,13 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
glBindBufferARB(GL_TRANSFORM_FEEDBACK_BUFFER, 0);
-
gGL.popMatrix();
if (cur_shader)
{
cur_shader->bind();
}
+ //gGLDebugLoggingEnabled = FALSE;
}
else
#endif
@@ -1927,21 +1919,32 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_pos)
{
- LLFastTimer t(FTM_FACE_GEOM_POSITION);
+ LLVector4a* src = vf.mPositions;
+
+ //_mm_prefetch((char*)src, _MM_HINT_T0);
+
+ LLVector4a* end = src+num_vertices;
+ //LLVector4a* end_64 = end-4;
+
+ //LLFastTimer t(FTM_FACE_GEOM_POSITION);
llassert(num_vertices > 0);
mVertexBuffer->getVertexStrider(vert, mGeomIndex, mGeomCount, map_range);
-
LLMatrix4a mat_vert;
mat_vert.loadu(mat_vert_in);
+
+ F32* dst = (F32*) vert.get();
+ F32* end_f32 = dst+mGeomCount*4;
- LLVector4a* src = vf.mPositions;
- volatile F32* dst = (volatile F32*) vert.get();
+ //_mm_prefetch((char*)dst, _MM_HINT_NTA);
+ //_mm_prefetch((char*)src, _MM_HINT_NTA);
+
+ //_mm_prefetch((char*)dst, _MM_HINT_NTA);
- volatile F32* end = dst+num_vertices*4;
- LLVector4a res;
+ LLVector4a res0; //,res1,res2,res3;
+
LLVector4a texIdx;
S32 index = mTextureIndex < 255 ? mTextureIndex : 0;
@@ -1958,29 +1961,53 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
texIdx.set(0,0,0,val);
+ LLVector4a tmp;
+
{
- LLFastTimer t(FTM_FACE_POSITION_STORE);
- LLVector4a tmp;
+ //LLFastTimer t2(FTM_FACE_POSITION_STORE);
- do
- {
- mat_vert.affineTransform(*src++, res);
- tmp.setSelectWithMask(mask, texIdx, res);
+ /*if (num_vertices > 4)
+ { //more than 64 bytes
+ while (src < end_64)
+ {
+ _mm_prefetch((char*)src + 64, _MM_HINT_T0);
+ _mm_prefetch((char*)dst + 64, _MM_HINT_T0);
+
+ mat_vert.affineTransform(*src, res0);
+ tmp.setSelectWithMask(mask, texIdx, res0);
+ tmp.store4a((F32*) dst);
+
+ mat_vert.affineTransform(*(src+1), res1);
+ tmp.setSelectWithMask(mask, texIdx, res1);
+ tmp.store4a((F32*) dst+4);
+
+ mat_vert.affineTransform(*(src+2), res2);
+ tmp.setSelectWithMask(mask, texIdx, res2);
+ tmp.store4a((F32*) dst+8);
+
+ mat_vert.affineTransform(*(src+3), res3);
+ tmp.setSelectWithMask(mask, texIdx, res3);
+ tmp.store4a((F32*) dst+12);
+
+ dst += 16;
+ src += 4;
+ }
+ }*/
+
+ while (src < end)
+ {
+ mat_vert.affineTransform(*src++, res0);
+ tmp.setSelectWithMask(mask, texIdx, res0);
tmp.store4a((F32*) dst);
dst += 4;
}
- while(dst < end);
}
-
+
{
- LLFastTimer t(FTM_FACE_POSITION_PAD);
- S32 aligned_pad_vertices = mGeomCount - num_vertices;
- res.set(res[0], res[1], res[2], 0.f);
-
- while (aligned_pad_vertices > 0)
+ //LLFastTimer t(FTM_FACE_POSITION_PAD);
+ while (dst < end_f32)
{
- --aligned_pad_vertices;
- res.store4a((F32*) dst);
+ res0.store4a((F32*) dst);
dst += 4;
}
}
@@ -1994,14 +2021,16 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_normal)
{
- LLFastTimer t(FTM_FACE_GEOM_NORMAL);
+ //LLFastTimer t(FTM_FACE_GEOM_NORMAL);
mVertexBuffer->getNormalStrider(norm, mGeomIndex, mGeomCount, map_range);
F32* normals = (F32*) norm.get();
- for (S32 i = 0; i < num_vertices; i++)
- {
+ LLVector4a* src = vf.mNormals;
+ LLVector4a* end = src+num_vertices;
+
+ while (src < end)
+ {
LLVector4a normal;
- mat_normal.rotate(vf.mNormals[i], normal);
- normal.normalize3fast();
+ mat_normal.rotate(*src++, normal);
normal.store4a(normals);
normals += 4;
}
@@ -2024,14 +2053,18 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
mask.clear();
mask.setElement<3>();
- for (S32 i = 0; i < num_vertices; i++)
+ LLVector4a* src = vf.mTangents;
+ LLVector4a* end = vf.mTangents+num_vertices;
+
+ while (src < end)
{
LLVector4a tangent_out;
- mat_normal.rotate(vf.mTangents[i], tangent_out);
+ mat_normal.rotate(*src, tangent_out);
tangent_out.normalize3fast();
- tangent_out.setSelectWithMask(mask, vf.mTangents[i], tangent_out);
+ tangent_out.setSelectWithMask(mask, *src, tangent_out);
tangent_out.store4a(tangents);
+ src++;
tangents += 4;
}
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 0687544d53..763634a3ab 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -195,7 +195,7 @@ public:
void setSize(S32 numVertices, S32 num_indices = 0, bool align = false);
BOOL genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat, const LLMatrix3& inv_trans_mat, BOOL global_volume = FALSE);
+ const LLMatrix4& mat, BOOL global_volume = FALSE);
void init(LLDrawable* drawablep, LLViewerObject* objp);
void destroy();
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index fbf72b1a85..8e1a1df211 100755
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -345,7 +345,7 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
return TRUE;
}
-static LLFastTimer::DeclareTimer FTM_RENDER_TIMER("Timers", true);
+static LLFastTimer::DeclareTimer FTM_RENDER_TIMER("Timers");
static std::map<LLFastTimer::NamedTimer*, LLColor4> sTimerColors;
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index caad0afec0..98c0c0bf51 100755
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -294,6 +294,9 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons
void LLVolumeImplFlexible::updateRenderRes()
{
+ if (!mAttributes)
+ return;
+
LLDrawable* drawablep = mVO->mDrawable;
S32 new_res = mAttributes->getSimulateLOD();
@@ -435,7 +438,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
}
}
- if(!mInitialized)
+ if(!mInitialized || !mAttributes)
{
//the object is not visible
return ;
@@ -689,30 +692,36 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
LLVector4(z_axis, 0.f),
LLVector4(delta_pos, 1.f));
+ LL_CHECK_MEMORY
for (i=0; i<=num_render_sections; ++i)
{
new_point = &path->mPath[i];
LLVector3 pos = newSection[i].mPosition * rel_xform;
LLQuaternion rot = mSection[i].mAxisRotation * newSection[i].mRotation * delta_rot;
-
- if (!mUpdated || (new_point->mPos-pos).magVec()/mVO->mDrawable->mDistanceWRTCamera > 0.001f)
+
+ LLVector3 np(new_point->mPos.getF32ptr());
+
+ if (!mUpdated || (np-pos).magVec()/mVO->mDrawable->mDistanceWRTCamera > 0.001f)
{
- new_point->mPos = newSection[i].mPosition * rel_xform;
+ new_point->mPos.load3((newSection[i].mPosition * rel_xform).mV);
mUpdated = FALSE;
}
- new_point->mRot = rot;
- new_point->mScale = newSection[i].mScale;
+ new_point->mRot.loadu(LLMatrix3(rot));
+ new_point->mScale.set(newSection[i].mScale.mV[0], newSection[i].mScale.mV[1], 0,1);
new_point->mTexT = ((F32)i)/(num_render_sections);
}
-
+ LL_CHECK_MEMORY
mLastSegmentRotation = parentSegmentRotation;
}
+static LLFastTimer::DeclareTimer FTM_FLEXI_PREBUILD("Flexi Prebuild");
+
void LLVolumeImplFlexible::preRebuild()
{
if (!mUpdated)
{
+ LLFastTimer t(FTM_FLEXI_PREBUILD);
doFlexibleRebuild();
}
}
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 116bd241c4..664f7d4fd6 100755
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -89,8 +89,10 @@ void LLFloaterHardwareSettings::refresh()
void LLFloaterHardwareSettings::refreshEnabledState()
{
+ F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
+
S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
- S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting();
+ S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem);
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 9ce5e12897..c4d7bbb7f6 100755
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -187,14 +187,11 @@ void LLFloaterIMNearbyChatScreenChannel::deactivateToast(LLToast* toast)
{
toast_vec_t::iterator pos = std::find(m_active_toasts.begin(), m_active_toasts.end(), toast->getHandle());
- if (pos == m_active_toasts.end())
+ if (pos != m_active_toasts.end())
{
- llassert(pos == m_active_toasts.end());
- return;
+ LL_DEBUGS("NearbyChat") << "Deactivating toast" << llendl;
+ m_active_toasts.erase(pos);
}
-
- LL_DEBUGS("NearbyChat") << "Deactivating toast" << llendl;
- m_active_toasts.erase(pos);
}
void LLFloaterIMNearbyChatScreenChannel::createOverflowToast(S32 bottom, F32 timer)
@@ -210,8 +207,8 @@ void LLFloaterIMNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool a
{
// Viewer is quitting.
// Immediately stop processing chat messages (EXT-1419).
- mStopProcessing = true;
-}
+ mStopProcessing = true;
+ }
else
{
// The toast is being closed by user (STORM-192).
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 8290494c22..6ef4d8717d 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2027,6 +2027,10 @@ void LLPanelLandOptions::refresh()
mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID());
mSnapshotCtrl->setEnabled( can_change_identity );
+ // find out where we're looking and convert that to an angle in degrees on a regular compass (not the internal representation)
+ LLVector3 user_look_at = parcel->getUserLookAt();
+ U32 user_look_at_angle = ( (U32)( ( atan2(user_look_at[1], -user_look_at[0]) + F_PI * 2 ) * RAD_TO_DEG + 0.5) - 90) % 360;
+
LLVector3 pos = parcel->getUserLocation();
if (pos.isExactlyZero())
{
@@ -2034,10 +2038,11 @@ void LLPanelLandOptions::refresh()
}
else
{
- mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d",
+ mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d (%d\xC2\xB0)",
llround(pos.mV[VX]),
llround(pos.mV[VY]),
- llround(pos.mV[VZ])));
+ llround(pos.mV[VZ]),
+ user_look_at_angle));
}
mSetBtn->setEnabled( can_change_landing_point );
@@ -2118,7 +2123,7 @@ void LLPanelLandOptions::refreshSearch()
bool can_change =
LLViewerParcelMgr::isParcelModifiableByAgent(
- parcel, GP_LAND_CHANGE_IDENTITY)
+ parcel, GP_LAND_FIND_PLACES)
&& region
&& !(region->getRegionFlag(REGION_FLAGS_BLOCK_PARCEL_SEARCH));
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 100f1d580b..19cec55837 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -290,6 +290,22 @@ bool ll_is_degenerate(const LLVector4a& a, const LLVector4a& b, const LLVector4a
bool validate_face(const LLVolumeFace& face)
{
+
+ for (U32 v = 0; v < face.mNumVertices; v++)
+ {
+ if(face.mPositions && !face.mPositions[v].isFinite3())
+ {
+ llwarns << "NaN position data in face found!" << llendl;
+ return false;
+ }
+
+ if(face.mNormals && !face.mNormals[v].isFinite3())
+ {
+ llwarns << "NaN normal data in face found!" << llendl;
+ return false;
+ }
+ }
+
for (U32 i = 0; i < face.mNumIndices; ++i)
{
if (face.mIndices[i] >= face.mNumVertices)
@@ -305,8 +321,10 @@ bool validate_face(const LLVolumeFace& face)
return false;
}
+
/*const LLVector4a scale(0.5f);
+
for (U32 i = 0; i < face.mNumIndices; i+=3)
{
U16 idx1 = face.mIndices[i];
@@ -323,7 +341,6 @@ bool validate_face(const LLVolumeFace& face)
return false;
}
}*/
-
return true;
}
@@ -5921,3 +5938,5 @@ void LLFloaterModelPreview::setPermissonsErrorStatus(U32 status, const std::stri
LLNotificationsUtil::add("MeshUploadPermError");
}
+
+
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 55b03986d0..fbafc90bbe 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -337,7 +337,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
- mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));
+ mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::refreshUI,this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
@@ -1148,6 +1148,8 @@ void LLFloaterPreference::refreshEnabledState()
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
+ LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
+
BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) &&
@@ -1157,11 +1159,13 @@ void LLFloaterPreference::refreshEnabledState()
(ctrl_wind_light->get()) ? TRUE : FALSE;
ctrl_deferred->setEnabled(enabled);
-
+ ctrl_deferred2->setEnabled(enabled);
+
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail");
+ // note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE);
ctrl_deferred->set(gSavedSettings.getBOOL("RenderDeferred"));
@@ -1189,6 +1193,7 @@ void LLFloaterPreference::disableUnavailableSettings()
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
+ LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
@@ -1222,6 +1227,8 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
+ ctrl_deferred2->setEnabled(FALSE);
+ ctrl_deferred2->setValue(FALSE);
}
// disabled windlight
@@ -1242,6 +1249,8 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
+ ctrl_deferred2->setEnabled(FALSE);
+ ctrl_deferred2->setValue(FALSE);
}
// disabled deferred
@@ -1259,6 +1268,8 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
+ ctrl_deferred2->setEnabled(FALSE);
+ ctrl_deferred2->setValue(FALSE);
}
// disabled deferred SSAO
@@ -1303,6 +1314,8 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
+ ctrl_deferred2->setEnabled(FALSE);
+ ctrl_deferred2->setValue(FALSE);
}
// disabled cloth
@@ -1331,6 +1344,7 @@ void LLFloaterPreference::refresh()
updateSliderText(getChild<LLSliderCtrl>("FlexibleMeshDetail", true), getChild<LLTextBox>("FlexibleMeshDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("TreeMeshDetail", true), getChild<LLTextBox>("TreeMeshDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail", true), getChild<LLTextBox>("AvatarMeshDetailText", true));
+ updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail2", true), getChild<LLTextBox>("AvatarMeshDetailText2", true));
updateSliderText(getChild<LLSliderCtrl>("AvatarPhysicsDetail", true), getChild<LLTextBox>("AvatarPhysicsDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("TerrainMeshDetail", true), getChild<LLTextBox>("TerrainMeshDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("RenderPostProcess", true), getChild<LLTextBox>("PostProcessText", true));
@@ -1582,16 +1596,9 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
getChildView("chat_font_size")->setEnabled(TRUE);
}
-void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name)
+void LLFloaterPreference::refreshUI()
{
- std::string ctrl_name = name.asString();
-
- if ((ctrl_name =="" )|| !hasChild(ctrl_name, TRUE))
- return;
-
- LLTextBox* text_box = getChild<LLTextBox>(name.asString());
- LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl);
- updateSliderText(slider, text_box);
+ refresh();
}
void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 22e80a21cb..cb180f6f1e 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -154,8 +154,7 @@ public:
void onChangeQuality(const LLSD& data);
void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
- void onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name);
-// void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
+ void refreshUI();
void onCommitParcelMediaAutoPlayEnable();
void onCommitMediaEnabled();
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index cfc87e9015..86b5a5e00b 100755
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -43,6 +43,7 @@ class LLFloaterWebContent :
public LLInstanceTracker<LLFloaterWebContent, std::string>
{
public:
+
typedef LLInstanceTracker<LLFloaterWebContent, std::string> instance_tracker_t;
LOG_CLASS(LLFloaterWebContent);
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index b62db70ec8..06bf294417 100755
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1681,7 +1681,8 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
gGL.getModelviewMatrix().inverse().mult_vec_matrix(plane);
- gClipProgram.uniform4fv("clip_plane", 1, plane.v);
+ static LLStaticHashedString sClipPlane("clip_plane");
+ gClipProgram.uniform4fv(sClipPlane, 1, plane.v);
BOOL particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
BOOL clouds = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS);
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 7f2a5e1642..6c38c1fb56 100755
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -46,6 +46,7 @@ class LLMediaCtrl :
{
LOG_CLASS(LLMediaCtrl);
public:
+
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
{
Optional<std::string> start_url;
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
index 2b92b0b3d1..a567d1217a 100755
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
@@ -92,7 +92,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::initialize()
void LLMenuOptionPathfindingRebakeNavmesh::quit()
{
- if (mIsInitialized)
+ if (mIsInitialized) // Quitting from the login screen leaves this uninitialized
{
if (mNavMeshSlot.connected())
{
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 8d3539d297..2e02805c02 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -289,7 +289,14 @@ public:
~LLMeshSkinInfoResponder()
{
- llassert(mProcessed);
+ if (!LLApp::isQuitting() &&
+ !mProcessed &&
+ mMeshID.notNull())
+ { // Something went wrong, retry
+ llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl;
+ LLMeshRepository::sHTTPRetryCount++;
+ gMeshRepo.mThread->loadMeshSkinInfo(mMeshID);
+ }
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -314,7 +321,14 @@ public:
~LLMeshDecompositionResponder()
{
- llassert(mProcessed);
+ if (!LLApp::isQuitting() &&
+ !mProcessed &&
+ mMeshID.notNull())
+ { // Something went wrong, retry
+ llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl;
+ LLMeshRepository::sHTTPRetryCount++;
+ gMeshRepo.mThread->loadMeshDecomposition(mMeshID);
+ }
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -339,7 +353,14 @@ public:
~LLMeshPhysicsShapeResponder()
{
- llassert(mProcessed);
+ if (!LLApp::isQuitting() &&
+ !mProcessed &&
+ mMeshID.notNull())
+ { // Something went wrong, retry
+ llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl;
+ LLMeshRepository::sHTTPRetryCount++;
+ gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID);
+ }
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -589,7 +610,7 @@ void LLMeshRepoThread::run()
if (!fetchMeshLOD(req.mMeshParams, req.mLOD, count))//failed, resubmit
{
mMutex->lock();
- mLODReqQ.push(req) ;
+ mLODReqQ.push(req);
mMutex->unlock();
}
}
@@ -1201,8 +1222,7 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat
LLMutexLock lock(mHeaderMutex);
mMeshHeaderSize[mesh_id] = header_size;
mMeshHeader[mesh_id] = header;
- }
-
+ }
LLMutexLock lock(mMutex); // make sure only one thread access mPendingLOD at the same time.
@@ -1920,7 +1940,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
@@ -1928,7 +1948,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -1984,15 +2004,15 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
- llwarns << "Timeout or service unavailable, retrying." << llendl;
+ llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl;
LLMeshRepository::sHTTPRetryCount++;
gMeshRepo.mThread->loadMeshSkinInfo(mMeshID);
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2047,15 +2067,15 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
- llwarns << "Timeout or service unavailable, retrying." << llendl;
+ llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl;
LLMeshRepository::sHTTPRetryCount++;
gMeshRepo.mThread->loadMeshDecomposition(mMeshID);
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2111,15 +2131,15 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
- llwarns << "Timeout or service unavailable, retrying." << llendl;
+ llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl;
LLMeshRepository::sHTTPRetryCount++;
gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID);
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2172,16 +2192,16 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
// << "Header responder failed with status: "
// << status << ": " << reason << llendl;
- // 503 (service unavailable) or 499 (timeout)
+ // 503 (service unavailable) or 499 (internal Linden-generated error)
// can be due to server load and can be retried
// TODO*: Add maximum retry logic, exponential backoff
// and (somewhat more optional than the others) retries
// again after some set period of time
- llassert(status == 503 || status == 499);
+ llassert(status == HTTP_NOT_FOUND || status == HTTP_SERVICE_UNAVAILABLE || status == HTTP_REQUEST_TIME_OUT || status == HTTP_INTERNAL_ERROR);
- if (status == 503 || status == 499)
+ if (status == HTTP_SERVICE_UNAVAILABLE || status == HTTP_REQUEST_TIME_OUT || status == HTTP_INTERNAL_ERROR)
{ //retry
llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
@@ -2193,7 +2213,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
}
else
{
- llwarns << "Unhandled status." << llendl;
+ llwarns << "Unhandled status: " << status << llendl;
}
}
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 8602271f84..8eaf691d6f 100755
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -413,7 +413,7 @@ public:
void startRequest() { ++mPendingUploads; }
void stopRequest() { --mPendingUploads; }
-
+
bool finished() { return mFinished; }
virtual void run();
void preStart();
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 7f396b7b7e..7ddd04fed0 100755
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -416,9 +416,9 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
}
-void LLNameListCtrl::updateColumns()
+void LLNameListCtrl::updateColumns(bool force_update)
{
- LLScrollListCtrl::updateColumns();
+ LLScrollListCtrl::updateColumns(force_update);
if (!mNameColumn.empty())
{
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 271802d48a..92e82b672d 100755
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -67,6 +67,7 @@ class LLNameListCtrl
: public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl>
{
public:
+
typedef enum e_name_type
{
INDIVIDUAL,
@@ -149,7 +150,7 @@ public:
void sortByName(BOOL ascending);
- /*virtual*/ void updateColumns();
+ /*virtual*/ void updateColumns(bool force_update);
/*virtual*/ void mouseOverHighlightNthItem( S32 index );
private:
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 133b269c11..a9a3c686a6 100755
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -85,6 +85,7 @@ public:
std::string mAlreadyInGroup;
std::string mTooManySelected;
bool mConfirmedOwnerInvite;
+ std::set<LLUUID> mInviteeIDs;
void (*mCloseCallback)(void* data);
@@ -117,31 +118,30 @@ LLPanelGroupInvite::impl::~impl()
}
}
+const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap.
+
void LLPanelGroupInvite::impl::addUsers(const std::vector<std::string>& names,
const uuid_vec_t& agent_ids)
{
std::string name;
LLUUID id;
+ if (names.size() + mInviteeIDs.size() > MAX_GROUP_INVITES)
+ {
+ // Fail! Show a warning and don't add any names.
+ LLSD msg;
+ msg["MESSAGE"] = mTooManySelected;
+ LLNotificationsUtil::add("GenericAlert", msg);
+ return;
+ }
+
for (S32 i = 0; i < (S32)names.size(); i++)
{
name = names[i];
id = agent_ids[i];
// Make sure this agent isn't already in the list.
- bool already_in_list = false;
- std::vector<LLScrollListItem*> items = mInvitees->getAllData();
- for (std::vector<LLScrollListItem*>::iterator iter = items.begin();
- iter != items.end(); ++iter)
- {
- LLScrollListItem* item = *iter;
- if (item->getUUID() == id)
- {
- already_in_list = true;
- break;
- }
- }
- if (already_in_list)
+ if (mInviteeIDs.find(id) != mInviteeIDs.end())
{
continue;
}
@@ -152,6 +152,7 @@ void LLPanelGroupInvite::impl::addUsers(const std::vector<std::string>& names,
row["columns"][0]["value"] = name;
mInvitees->addElement(row);
+ mInviteeIDs.insert(id);
}
}
@@ -193,7 +194,6 @@ void LLPanelGroupInvite::impl::submitInvitations()
role_member_pairs[item->getUUID()] = role_id;
}
- const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap.
if (role_member_pairs.size() > MAX_GROUP_INVITES)
{
// Fail!
@@ -334,6 +334,12 @@ void LLPanelGroupInvite::impl::handleRemove()
mInvitees->getAllSelected();
if (selection.empty()) return;
+ std::vector<LLScrollListItem*>::iterator iter;
+ for(iter = selection.begin(); iter != selection.end(); ++iter)
+ {
+ mInviteeIDs.erase( (*iter)->getUUID() );
+ }
+
// Remove all selected invitees.
mInvitees->deleteSelectedItems();
mRemoveButton->setEnabled(FALSE);
@@ -459,6 +465,7 @@ void LLPanelGroupInvite::clear()
mImplementation->mRoleNames->clear();
mImplementation->mRoleNames->removeall();
mImplementation->mOKButton->setEnabled(FALSE);
+ mImplementation->mInviteeIDs.clear();
}
void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 941c578783..d7ae897604 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1404,7 +1404,9 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
if (bridge->mAvatar.notNull())
{
bridge->mAvatar->mAttachmentGeometryBytes -= mGeometryBytes;
+ bridge->mAvatar->mAttachmentGeometryBytes = llmax(bridge->mAvatar->mAttachmentGeometryBytes, 0);
bridge->mAvatar->mAttachmentSurfaceArea -= mSurfaceArea;
+ bridge->mAvatar->mAttachmentSurfaceArea = llmax(bridge->mAvatar->mAttachmentSurfaceArea, 0.f);
}
}
@@ -2240,6 +2242,18 @@ void drawBox(const LLVector4a& c, const LLVector4a& r)
void drawBoxOutline(const LLVector3& pos, const LLVector3& size)
{
+
+ llassert(pos.isFinite());
+ llassert(size.isFinite());
+
+ llassert(!llisnan(pos.mV[0]));
+ llassert(!llisnan(pos.mV[1]));
+ llassert(!llisnan(pos.mV[2]));
+
+ llassert(!llisnan(size.mV[0]));
+ llassert(!llisnan(size.mV[1]));
+ llassert(!llisnan(size.mV[2]));
+
LLVector3 v1 = size.scaledVec(LLVector3( 1, 1,1));
LLVector3 v2 = size.scaledVec(LLVector3(-1, 1,1));
LLVector3 v3 = size.scaledVec(LLVector3(-1,-1,1));
@@ -3064,20 +3078,23 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
const LLVector4a* ext;
LLVector4a pos, size;
- //render face bounding boxes
- for (S32 i = 0; i < drawable->getNumFaces(); i++)
+ if (drawable->getVOVolume())
{
- LLFace* facep = drawable->getFace(i);
- if (facep)
+ //render face bounding boxes
+ for (S32 i = 0; i < drawable->getNumFaces(); i++)
{
- ext = facep->mExtents;
+ LLFace* facep = drawable->getFace(i);
+ if (facep)
+ {
+ ext = facep->mExtents;
- pos.setAdd(ext[0], ext[1]);
- pos.mul(0.5f);
- size.setSub(ext[1], ext[0]);
- size.mul(0.5f);
+ pos.setAdd(ext[0], ext[1]);
+ pos.mul(0.5f);
+ size.setSub(ext[1], ext[0]);
+ size.mul(0.5f);
- drawBoxOutline(pos,size);
+ drawBoxOutline(pos,size);
+ }
}
}
@@ -3457,7 +3474,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::SPHERE)
{
- /*LLVolumeParams volume_params;
+ LLVolumeParams volume_params;
volume_params.setType( LL_PCODE_PROFILE_CIRCLE_HALF, LL_PCODE_PATH_CIRCLE );
volume_params.setBeginAndEndS( 0.f, 1.f );
volume_params.setBeginAndEndT( 0.f, 1.f );
@@ -3467,7 +3484,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
gGL.diffuseColor4fv(color.mV);
pushVerts(sphere);
- LLPrimitive::sVolumeManager->unrefVolume(sphere);*/
+ LLPrimitive::sVolumeManager->unrefVolume(sphere);
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::CYLINDER)
{
@@ -3545,51 +3562,67 @@ void renderPhysicsShapes(LLSpatialGroup* group)
for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
LLDrawable* drawable = *i;
- LLVOVolume* volume = drawable->getVOVolume();
- if (volume && !volume->isAttachment() && volume->getPhysicsShapeType() != LLViewerObject::PHYSICS_SHAPE_NONE )
+
+ if (drawable->isSpatialBridge())
{
- if (!group->mSpatialPartition->isBridge())
+ LLSpatialBridge* bridge = drawable->asPartition()->asBridge();
+
+ if (bridge)
{
gGL.pushMatrix();
- LLVector3 trans = drawable->getRegion()->getOriginAgent();
- gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
- renderPhysicsShape(drawable, volume);
+ gGL.multMatrix((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
+ bridge->renderPhysicsShapes();
gGL.popMatrix();
}
- else
- {
- renderPhysicsShape(drawable, volume);
- }
}
else
{
- LLViewerObject* object = drawable->getVObj();
- if (object && object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH)
+ LLVOVolume* volume = drawable->getVOVolume();
+ if (volume && !volume->isAttachment() && volume->getPhysicsShapeType() != LLViewerObject::PHYSICS_SHAPE_NONE )
{
- gGL.pushMatrix();
- gGL.multMatrix((F32*) object->getRegion()->mRenderMatrix.mMatrix);
- //push face vertices for terrain
- for (S32 i = 0; i < drawable->getNumFaces(); ++i)
+ if (!group->mSpatialPartition->isBridge())
+ {
+ gGL.pushMatrix();
+ LLVector3 trans = drawable->getRegion()->getOriginAgent();
+ gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
+ renderPhysicsShape(drawable, volume);
+ gGL.popMatrix();
+ }
+ else
+ {
+ renderPhysicsShape(drawable, volume);
+ }
+ }
+ else
+ {
+ LLViewerObject* object = drawable->getVObj();
+ if (object && object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH)
{
- LLFace* face = drawable->getFace(i);
- if (face)
+ gGL.pushMatrix();
+ gGL.multMatrix((F32*) object->getRegion()->mRenderMatrix.mMatrix);
+ //push face vertices for terrain
+ for (S32 i = 0; i < drawable->getNumFaces(); ++i)
{
- LLVertexBuffer* buff = face->getVertexBuffer();
- if (buff)
+ LLFace* face = drawable->getFace(i);
+ if (face)
{
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ LLVertexBuffer* buff = face->getVertexBuffer();
+ if (buff)
+ {
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
- gGL.diffuseColor3f(0.2f, 0.5f, 0.3f);
- buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
+ buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ gGL.diffuseColor3f(0.2f, 0.5f, 0.3f);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
- gGL.diffuseColor3f(0.2f, 1.f, 0.3f);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
+ gGL.diffuseColor3f(0.2f, 1.f, 0.3f);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
+ }
}
}
+ gGL.popMatrix();
}
- gGL.popMatrix();
}
}
}
@@ -4179,6 +4212,10 @@ public:
if (!group->isEmpty())
{
gGL.diffuseColor3f(0,0,1);
+
+ llassert(group->mObjectBounds[0].isFinite3());
+ llassert(group->mObjectBounds[1].isFinite3());
+
drawBoxOutline(group->mObjectBounds[0],
group->mObjectBounds[1]);
}
@@ -4808,6 +4845,9 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
mMaterial(NULL),
mShaderMask(0),
mSpecColor(1.0f, 1.0f, 1.0f, 0.5f),
+ mBlendFuncSrc(LLRender::BF_SOURCE_ALPHA),
+ mBlendFuncDst(LLRender::BF_ONE_MINUS_SOURCE_ALPHA),
+ mHasGlow(FALSE),
mEnvIntensity(0.0f),
mAlphaMaskCutoff(0.5f),
mDiffuseAlphaMode(0)
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 9732be90af..f26defd5e1 100755
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -70,12 +70,12 @@ protected:
public:
void* operator new(size_t size)
{
- return ll_aligned_malloc_16(size);
+ return ll_aligned_malloc(size,64);
}
void operator delete(void* ptr)
{
- ll_aligned_free_16(ptr);
+ ll_aligned_free(ptr);
}
@@ -123,6 +123,9 @@ public:
LLMaterialPtr mMaterial; // If this is null, the following parameters are unused.
LLMaterialID mMaterialID;
U32 mShaderMask;
+ U32 mBlendFuncSrc;
+ U32 mBlendFuncDst;
+ BOOL mHasGlow;
LLPointer<LLViewerTexture> mSpecularMap;
const LLMatrix4* mSpecularMapMatrix;
LLPointer<LLViewerTexture> mNormalMap;
@@ -752,7 +755,7 @@ class LLVolumeGeometryManager: public LLGeometryManager
virtual void rebuildGeom(LLSpatialGroup* group);
virtual void rebuildMesh(LLSpatialGroup* group);
virtual void getGeometry(LLSpatialGroup* group);
- void genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort = FALSE, BOOL batch_textures = FALSE, BOOL no_materials = FALSE);
+ void genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort = FALSE, BOOL batch_textures = FALSE, BOOL no_materials = FALSE);
void registerFace(LLSpatialGroup* group, LLFace* facep, U32 type);
};
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 36a7aeb590..5bc2e971eb 100755
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1922,10 +1922,10 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
h >>= i;
if(w * h *c > 0) //valid
{
- LLPointer<LLImageRaw> newraw = new LLImageRaw(raw->getData(), raw->getWidth(), raw->getHeight(), raw->getComponents());
- newraw->scale(w, h) ;
- raw = newraw;
-
+ //make a duplicate to keep the original raw image untouched.
+ raw = raw->duplicate();
+ raw->scale(w, h) ;
+
discardlevel += i ;
}
}
@@ -1935,9 +1935,12 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
memcpy(mFastCachePadBuffer + sizeof(S32), &h, sizeof(S32));
memcpy(mFastCachePadBuffer + sizeof(S32) * 2, &c, sizeof(S32));
memcpy(mFastCachePadBuffer + sizeof(S32) * 3, &discardlevel, sizeof(S32));
- if(w * h * c > 0) //valid
+
+ S32 copy_size = w * h * c;
+ if(copy_size > 0) //valid
{
- memcpy(mFastCachePadBuffer + TEXTURE_FAST_CACHE_ENTRY_OVERHEAD, raw->getData(), w * h * c);
+ copy_size = llmin(copy_size, TEXTURE_FAST_CACHE_ENTRY_SIZE - TEXTURE_FAST_CACHE_ENTRY_OVERHEAD);
+ memcpy(mFastCachePadBuffer + TEXTURE_FAST_CACHE_ENTRY_OVERHEAD, raw->getData(), copy_size);
}
S32 offset = id * TEXTURE_FAST_CACHE_ENTRY_SIZE;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 6173e76a35..6173e76a35 100755..100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 9dfb29b905..d876c9a3f4 100755
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -173,8 +173,20 @@ void LLToast::setHideButtonEnabled(bool enabled)
//--------------------------------------------------------------------------
LLToast::~LLToast()
-{
- mOnToastDestroyedSignal(this);
+{
+ if(LLApp::isQuitting())
+ {
+ mOnFadeSignal.disconnect_all_slots();
+ mOnDeleteToastSignal.disconnect_all_slots();
+ mOnToastDestroyedSignal.disconnect_all_slots();
+ mOnToastHoverSignal.disconnect_all_slots();
+ mToastMouseEnterSignal.disconnect_all_slots();
+ mToastMouseLeaveSignal.disconnect_all_slots();
+ }
+ else
+ {
+ mOnToastDestroyedSignal(this);
+ }
}
//--------------------------------------------------------------------------
@@ -572,10 +584,34 @@ S32 LLToast::notifyParent(const LLSD& info)
//static
void LLToast::updateClass()
{
- for (LLInstanceTracker<LLToast>::instance_iter iter = LLInstanceTracker<LLToast>::beginInstances(); iter != LLInstanceTracker<LLToast>::endInstances(); )
+ for (LLInstanceTracker<LLToast>::instance_iter iter = LLInstanceTracker<LLToast>::beginInstances();
+ iter != LLInstanceTracker<LLToast>::endInstances(); )
{
LLToast& toast = *iter++;
toast.updateHoveredState();
}
}
+
+// static
+void LLToast::cleanupToasts()
+{
+ LLToast * toastp = NULL;
+
+ while (LLInstanceTracker<LLToast>::instanceCount() > 0)
+ {
+ { // Need to scope iter to allow deletion
+ LLInstanceTracker<LLToast>::instance_iter iter = LLInstanceTracker<LLToast>::beginInstances();
+ toastp = &(*iter);
+ }
+
+ //llinfos << "Cleaning up toast id " << toastp->getNotificationID() << llendl;
+
+ // LLToast destructor will remove it from the LLInstanceTracker.
+ if (!toastp)
+ break; // Don't get stuck in the loop if a null pointer somehow got on the list
+
+ delete toastp;
+ }
+}
+
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index ea62f758f8..f02d7c2a1a 100755
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -73,6 +73,7 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
{
friend class LLToastLifeTimer;
public:
+
typedef boost::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
@@ -105,6 +106,7 @@ public:
};
static void updateClass();
+ static void cleanupToasts();
LLToast(const LLToast::Params& p);
virtual ~LLToast();
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 8bfde2bcf1..94d07b37ef 100755
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -60,7 +60,7 @@ LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, co
LLInstanceTracker<LLToastNotifyPanel, LLUUID>(notification->getID())
{
init(rect, show_images);
- }
+}
void LLToastNotifyPanel::addDefaultButton()
{
LLSD form_element;
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index fc9a316759..1c362c18e0 100755
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -121,7 +121,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
// don't pick transparent so users can't "pay" transparent objects
- mPick = gViewerWindow->pickImmediate(x, y, FALSE);
+ mPick = gViewerWindow->pickImmediate(x, y, FALSE, TRUE);
mPick.mKeyMask = mask;
// claim not handled so UI focus stays same
@@ -1687,6 +1687,13 @@ BOOL LLToolPie::handleRightClickPick()
showVisualContextMenuEffect();
}
}
+ else if (mPick.mParticleOwnerID.notNull())
+ {
+ if (gMenuMuteParticle && mPick.mParticleOwnerID != gAgent.getID())
+ {
+ gMenuMuteParticle->show(x,y);
+ }
+ }
LLTool::handleRightMouseDown(x, y, mask);
// We handled the event.
diff --git a/indra/newview/lltoolselect.h b/indra/newview/lltoolselect.h
index baa27f6071..74dababe8c 100755
--- a/indra/newview/lltoolselect.h
+++ b/indra/newview/lltoolselect.h
@@ -34,7 +34,7 @@
class LLObjectSelection;
-class LLToolSelect : public LLTool, public LLSingleton<LLToolSelect>
+class LLToolSelect : public LLTool
{
public:
LLToolSelect( LLToolComposite* composite );
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index f90b35a7bd..422f18566f 100755
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -225,13 +225,13 @@ void display_stats()
}
static LLFastTimer::DeclareTimer FTM_PICK("Picking");
-static LLFastTimer::DeclareTimer FTM_RENDER("Render", true);
+static LLFastTimer::DeclareTimer FTM_RENDER("Render");
static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky");
static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Image Update Bump");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List", true);
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete");
static LLFastTimer::DeclareTimer FTM_RESIZE_WINDOW("Resize Window");
static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("HUD Update");
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index a179b61cff..a179b61cff 100755..100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 5e2f05f468..33d4b65d4a 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -169,6 +169,7 @@ LLContextMenu *gMenuObject = NULL;
LLContextMenu *gMenuAttachmentSelf = NULL;
LLContextMenu *gMenuAttachmentOther = NULL;
LLContextMenu *gMenuLand = NULL;
+LLContextMenu *gMenuMuteParticle = NULL;
const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents");
@@ -425,6 +426,9 @@ void init_menus()
gMenuLand = LLUICtrlFactory::createFromFile<LLContextMenu>(
"menu_land.xml", gMenuHolder, registry);
+ gMenuMuteParticle = LLUICtrlFactory::createFromFile<LLContextMenu>(
+ "menu_mute_particle.xml", gMenuHolder, registry);
+
///
/// set up the colors
///
@@ -2450,6 +2454,9 @@ void cleanup_menus()
delete gMenuLand;
gMenuLand = NULL;
+ delete gMenuMuteParticle;
+ gMenuMuteParticle = NULL;
+
delete gMenuBarView;
gMenuBarView = NULL;
@@ -2803,6 +2810,13 @@ bool enable_object_edit()
return enable;
}
+bool enable_mute_particle()
+{
+ const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
+
+ return pick.mParticleOwnerID != LLUUID::null && pick.mParticleOwnerID != gAgent.getID();
+}
+
// mutually exclusive - show either edit option or build in menu
bool enable_object_build()
{
@@ -2916,6 +2930,63 @@ bool enable_object_unmute()
}
}
+
+// 0 = normal, 1 = always, 2 = never
+class LLAvatarCheckImposterMode : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+ if (!object) return false;
+
+ LLVOAvatar* avatar = find_avatar_from_object(object);
+ if (!avatar) return false;
+
+ U32 mode = userdata.asInteger();
+ switch (mode)
+ {
+ case 0:
+ return (avatar->getVisualMuteSettings() == LLVOAvatar::VISUAL_MUTE_NOT_SET);
+ case 1:
+ return (avatar->getVisualMuteSettings() == LLVOAvatar::ALWAYS_VISUAL_MUTE);
+ case 2:
+ return (avatar->getVisualMuteSettings() == LLVOAvatar::NEVER_VISUAL_MUTE);
+ default:
+ return false;
+ }
+ } // handleEvent()
+};
+
+// 0 = normal, 1 = always, 2 = never
+class LLAvatarSetImposterMode : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+ if (!object) return false;
+
+ LLVOAvatar* avatar = find_avatar_from_object(object);
+ if (!avatar) return false;
+
+ U32 mode = userdata.asInteger();
+ switch (mode)
+ {
+ case 0:
+ avatar->setVisualMuteSettings(LLVOAvatar::VISUAL_MUTE_NOT_SET);
+ return true;
+ case 1:
+ avatar->setVisualMuteSettings(LLVOAvatar::ALWAYS_VISUAL_MUTE);
+ return true;
+ case 2:
+ avatar->setVisualMuteSettings(LLVOAvatar::NEVER_VISUAL_MUTE);
+ return true;
+ default:
+ return false;
+ }
+ } // handleEvent()
+};
+
+
class LLObjectMute : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -6220,6 +6291,33 @@ class LLLandEdit : public view_listener_t
}
};
+class LLMuteParticle : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLUUID id = LLToolPie::getInstance()->getPick().mParticleOwnerID;
+
+ if (id.notNull())
+ {
+ std::string name;
+ gCacheName->getFullName(id, name);
+
+ LLMute mute(id, name, LLMute::AGENT);
+ if (LLMuteList::getInstance()->isMuted(mute.mID))
+ {
+ LLMuteList::getInstance()->remove(mute);
+ }
+ else
+ {
+ LLMuteList::getInstance()->add(mute);
+ LLPanelBlockedList::showPanelAndSelect(mute.mID);
+ }
+ }
+
+ return true;
+ }
+};
+
class LLWorldEnableBuyLand : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -8640,6 +8738,8 @@ void initialize_menus()
view_listener_t::addMenu( new LLCheckPanelPeopleTab(), "SideTray.CheckPanelPeopleTab");
// Avatar pie menu
+ view_listener_t::addMenu(new LLAvatarCheckImposterMode(), "Avatar.CheckImposterMode");
+ view_listener_t::addMenu(new LLAvatarSetImposterMode(), "Avatar.SetImposterMode");
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
view_listener_t::addMenu(new LLAvatarAddContact(), "Avatar.AddContact");
@@ -8713,6 +8813,9 @@ void initialize_menus()
view_listener_t::addMenu(new LLLandBuyPass(), "Land.BuyPass");
view_listener_t::addMenu(new LLLandEdit(), "Land.Edit");
+ // Particle muting
+ view_listener_t::addMenu(new LLMuteParticle(), "Particle.Mute");
+
view_listener_t::addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass");
commit.add("Land.Buy", boost::bind(&handle_buy_land));
@@ -8735,6 +8838,7 @@ void initialize_menus()
enable.add("EnablePayObject", boost::bind(&enable_pay_object));
enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar));
enable.add("EnableEdit", boost::bind(&enable_object_edit));
+ enable.add("EnableMuteParticle", boost::bind(&enable_mute_particle));
enable.add("VisibleBuild", boost::bind(&enable_object_build));
commit.add("Pathfinding.Linksets.Select", boost::bind(&LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects));
enable.add("EnableSelectInPathfindingLinksets", boost::bind(&enable_object_select_in_pathfinding_linksets));
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 143420e227..7f09fc2d8f 100755
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -177,6 +177,7 @@ extern LLContextMenu *gMenuObject;
extern LLContextMenu *gMenuAttachmentSelf;
extern LLContextMenu *gMenuAttachmentOther;
extern LLContextMenu *gMenuLand;
+extern LLContextMenu *gMenuMuteParticle;
// Needed to build menus when attachment site list available
extern LLMenuGL* gAttachSubMenu;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ace16396db..d6ba803c46 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4129,7 +4129,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
{
LLTracker::stopTracking(NULL);
}
- else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() )
+ else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() && look_at.isExactlyZero())
{
//look at the beacon
LLVector3 global_agent_pos = agent_pos;
@@ -4570,7 +4570,6 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
if (id == LLUUID::null)
{
LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL;
- gObjectList.mNumUnknownKills++;
continue;
}
else
@@ -4594,18 +4593,12 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
// Do the kill
gObjectList.killObject(objectp);
}
- else
- {
- LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL;
- gObjectList.mNumUnknownKills++;
- }
}
// We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab,
// which is using the object, release the mouse capture correctly when the object dies.
// See LLToolGrab::handleHoverActive() and LLToolGrab::handleHoverNonPhysical().
LLSelectMgr::getInstance()->removeObjectFromSelections(id);
-
}
}
@@ -5945,19 +5938,42 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
}
+static void process_special_alert_messages(const std::string & message)
+{
+ // Do special handling for alert messages. This is a legacy hack, and any actual displayed
+ // text should be altered in the notifications.xml files.
+ if ( message == "You died and have been teleported to your home location")
+ {
+ LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
+ }
+ else if( message == "Home position set." )
+ {
+ // save the home location image to disk
+ std::string snap_filename = gDirUtilp->getLindenUserDir();
+ snap_filename += gDirUtilp->getDirDelimiter();
+ snap_filename += SCREEN_HOME_FILENAME;
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
+ }
+}
+
+
+
void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data)
{
// make sure the cursor is back to the usual default since the
// alert is probably due to some kind of error.
gViewerWindow->getWindow()->resetBusyCount();
+ std::string message;
+ msgsystem->getStringFast(_PREHASH_AlertData, _PREHASH_Message, message);
+
+ process_special_alert_messages(message);
+
if (!attempt_standard_notification(msgsystem))
{
BOOL modal = FALSE;
msgsystem->getBOOL("AlertData", "Modal", modal);
- std::string buffer;
- msgsystem->getStringFast(_PREHASH_AlertData, _PREHASH_Message, buffer);
- process_alert_core(buffer, modal);
+ process_alert_core(message, modal);
}
}
@@ -5972,12 +5988,15 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
// alert is probably due to some kind of error.
gViewerWindow->getWindow()->resetBusyCount();
+ std::string message;
+ msgsystem->getStringFast(_PREHASH_AlertData, _PREHASH_Message, message);
+
+ process_special_alert_messages(message);
+
if (!attempt_standard_notification(msgsystem))
{
BOOL modal = FALSE;
- std::string buffer;
- msgsystem->getStringFast(_PREHASH_AlertData, _PREHASH_Message, buffer);
- process_alert_core(buffer, modal);
+ process_alert_core(message, modal);
}
}
@@ -6007,20 +6026,6 @@ bool handle_special_alerts(const std::string &pAlertName)
void process_alert_core(const std::string& message, BOOL modal)
{
- // HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml
- if ( message == "You died and have been teleported to your home location")
- {
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
- }
- else if( message == "Home position set." )
- {
- // save the home location image to disk
- std::string snap_filename = gDirUtilp->getLindenUserDir();
- snap_filename += gDirUtilp->getDirDelimiter();
- snap_filename += SCREEN_HOME_FILENAME;
- gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
- }
-
const std::string ALERT_PREFIX("ALERT: ");
const std::string NOTIFY_PREFIX("NOTIFY: ");
if (message.find(ALERT_PREFIX) == 0)
@@ -7326,8 +7331,12 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance();
if(instance)
{
- instance->trackURL(
- sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
+ llinfos << "Object named " << object_name
+ << " is offering TP to region "
+ << sim_name << " position " << pos
+ << llendl;
+
+ instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
LLFloaterReg::showInstance("world_map", "center");
}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 6f7b2f40e6..e92cc39ba7 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1578,6 +1578,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
dp->setPassFlags(value);
dp->unpackUUID(owner_id, "Owner");
+ mOwnerID = owner_id;
+
if (value & 0x80)
{
dp->unpackVector3(new_angv, "Omega");
@@ -1651,13 +1653,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
retval |= checkMediaURL(media_url);
//
- // Unpack particle system data
+ // Unpack particle system data (legacy)
//
if (value & 0x8)
{
- unpackParticleSource(*dp, owner_id);
+ unpackParticleSource(*dp, owner_id, true);
}
- else
+ else if (!(value & 0x400))
{
deleteParticleSource();
}
@@ -1722,7 +1724,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// keep local flags and overwrite remote-controlled flags
mFlags = (mFlags & FLAGS_LOCAL) | flags;
- // ...new objects that should come in selected need to be added to the selected list
+ // ...new objects that should come in selected need to be added to the selected list
mCreateSelected = ((flags & FLAGS_CREATE_SELECTED) != 0);
}
break;
@@ -4838,7 +4840,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
}
}
-void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id)
+void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy)
{
if (!mPartSourcep.isNull() && mPartSourcep->isDead())
{
@@ -4847,7 +4849,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
if (mPartSourcep)
{
// If we've got one already, just update the existing source (or remove it)
- if (!LLViewerPartSourceScript::unpackPSS(this, mPartSourcep, dp))
+ if (!LLViewerPartSourceScript::unpackPSS(this, mPartSourcep, dp, legacy))
{
mPartSourcep->setDead();
mPartSourcep = NULL;
@@ -4855,7 +4857,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
}
else
{
- LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp);
+ LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp, legacy);
//If the owner is muted, don't create the system
if(LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagParticles)) return;
// We need to be able to deal with a particle source that hasn't changed, but still got an update!
@@ -5701,6 +5703,11 @@ F32 LLAlphaObject::getPartSize(S32 idx)
return 0.f;
}
+void LLAlphaObject::getBlendFunc(S32 face, U32& src, U32& dst)
+{
+
+}
+
// virtual
void LLStaticViewerObject::updateDrawable(BOOL force_damped)
{
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index ea0d55cda5..05bc7f68a2 100755
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -112,14 +112,6 @@ class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
protected:
~LLViewerObject(); // use unref()
- // TomY: Provide for a list of extra parameter structures, mapped by structure name
- struct ExtraParameter
- {
- BOOL in_use;
- LLNetworkData *data;
- };
- std::map<U16, ExtraParameter*> mExtraParameterList;
-
public:
typedef std::list<LLPointer<LLViewerObject> > child_list_t;
typedef std::list<LLPointer<LLViewerObject> > vobj_list_t;
@@ -561,6 +553,8 @@ public:
std::vector<LLVector3> mUnselectedChildrenPositions ;
private:
+ // TomY: Provide for a list of extra parameter structures, mapped by structure name
+ struct ExtraParameter;
ExtraParameter* createNewParameterEntry(U16 param_type);
ExtraParameter* getExtraParameterEntry(U16 param_type) const;
ExtraParameter* getExtraParameterEntryCreate(U16 param_type);
@@ -600,6 +594,7 @@ public:
} EPhysicsShapeType;
LLUUID mID;
+ LLUUID mOwnerID; //null if unknown
// unique within region, not unique across regions
// Local ID = 0 is not used
@@ -680,7 +675,7 @@ protected:
BOOL isOnMap();
void unpackParticleSource(const S32 block_num, const LLUUID& owner_id);
- void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id);
+ void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy);
void deleteParticleSource();
void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id);
@@ -799,6 +794,14 @@ private:
LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory.
EObjectUpdateType mLastUpdateType;
BOOL mLastUpdateCached;
+
+ // TomY: Provide for a list of extra parameter structures, mapped by structure name
+ struct ExtraParameter
+ {
+ BOOL in_use;
+ LLNetworkData *data;
+ };
+ std::map<U16, ExtraParameter*> mExtraParameterList;
};
///////////////////
@@ -844,9 +847,12 @@ public:
LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
- LLStrider<LLColor4U>& colorsp,
+ LLStrider<LLColor4U>& colorsp,
+ LLStrider<LLColor4U>& emissivep,
LLStrider<U16>& indicesp) = 0;
+ virtual void getBlendFunc(S32 face, U32& src, U32& dst);
+
F32 mDepth;
};
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index caacf26cb3..66615657d8 100755
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -106,7 +106,6 @@ LLViewerObjectList::LLViewerObjectList()
mNumNewObjects = 0;
mWasPaused = FALSE;
mNumDeadObjectUpdates = 0;
- mNumUnknownKills = 0;
mNumUnknownUpdates = 0;
}
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 449a4633ff..6518c25d09 100755
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -188,7 +188,6 @@ public:
S32 mNumUnknownUpdates;
S32 mNumDeadObjectUpdates;
- S32 mNumUnknownKills;
S32 mNumDeadObjects;
protected:
std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 6bd9f66b9c..96cd43a8ab 100755
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -80,12 +80,31 @@ LLViewerPart::LLViewerPart() :
mImagep(NULL)
{
mPartSourcep = NULL;
-
+ mParent = NULL;
+ mChild = NULL;
++LLViewerPartSim::sParticleCount2 ;
}
LLViewerPart::~LLViewerPart()
{
+ if (mPartSourcep.notNull() && mPartSourcep->mLastPart == this)
+ {
+ mPartSourcep->mLastPart = NULL;
+ }
+
+ //patch up holes in the ribbon
+ if (mParent)
+ {
+ llassert(mParent->mChild == this);
+ mParent->mChild = mChild;
+ }
+
+ if (mChild)
+ {
+ llassert (mChild->mParent == this);
+ mChild->mParent = mParent;
+ }
+
mPartSourcep = NULL;
--LLViewerPartSim::sParticleCount2 ;
@@ -367,6 +386,9 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
part->mScale += frac*part->mEndScale;
}
+ // Do glow interpolation
+ part->mGlow.mV[3] = (U8) llround(lerp(part->mStartGlow, part->mEndGlow, frac)*255.f);
+
// Set the last update time to now.
part->mLastUpdateTime = cur_time;
@@ -488,9 +510,13 @@ void LLViewerPartSim::destroyClass()
//static
BOOL LLViewerPartSim::shouldAddPart()
{
- if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount)
+ if (sParticleCount >= MAX_PART_COUNT)
{
+ return FALSE;
+ }
+ if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount)
+ {
F32 frac = (F32)sParticleCount/(F32)sMaxParticleCount;
frac -= PART_THROTTLE_THRESHOLD;
frac *= PART_THROTTLE_RESCALE;
@@ -500,7 +526,10 @@ BOOL LLViewerPartSim::shouldAddPart()
return FALSE;
}
}
- if (sParticleCount >= MAX_PART_COUNT)
+
+ // Check frame rate, and don't add more if the viewer is really slow
+ const F32 MIN_FRAME_RATE_FOR_NEW_PARTICLES = 4.f;
+ if (gFPSClamped < MIN_FRAME_RATE_FOR_NEW_PARTICLES)
{
return FALSE;
}
@@ -616,6 +645,9 @@ void LLViewerPartSim::updateSimulation()
{
static LLFrameTimer update_timer;
+ //reset VBO cursor
+ LLVOPartGroup::sVBSlotCursor = 0;
+
const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f);
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES)))
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index c91fcf0691..095de2060c 100755
--- a/indra/newview/llviewerpartsim.h
+++ b/indra/newview/llviewerpartsim.h
@@ -65,15 +65,22 @@ public:
LLVPCallback mVPCallback; // Callback function for more complicated behaviors
LLPointer<LLViewerPartSource> mPartSourcep; // Particle source used for this object
-
+
+ LLViewerPart* mParent; // particle to connect to if this is part of a particle ribbon
+ LLViewerPart* mChild; // child particle for clean reference destruction
// Current particle state (possibly used for rendering)
LLPointer<LLViewerTexture> mImagep;
LLVector3 mPosAgent;
LLVector3 mVelocity;
LLVector3 mAccel;
+ LLVector3 mAxis;
LLColor4 mColor;
LLVector2 mScale;
+ F32 mStartGlow;
+ F32 mEndGlow;
+ LLColor4U mGlow;
+
static U32 sNextPartID;
};
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index b311f659fb..b6bbd6140d 100755
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -52,6 +52,8 @@ LLViewerPartSource::LLViewerPartSource(const U32 type) :
static U32 id_seed = 0;
mID = ++id_seed;
+ mLastPart = NULL;
+
mDelay = 0 ;
}
@@ -279,6 +281,22 @@ void LLViewerPartSourceScript::update(const F32 dt)
{
part->mFlags |= LLPartData::LL_PART_HUD;
}
+
+ if (part->mFlags & LLPartData::LL_PART_RIBBON_MASK && mLastPart)
+ { //set previous particle's parent to this particle to chain ribbon together
+ mLastPart->mParent = part;
+ part->mChild = mLastPart;
+ part->mAxis = LLVector3(0,0,1);
+
+ if (mSourceObjectp.notNull())
+ {
+ LLQuaternion rot = mSourceObjectp->getRenderRotation();
+ part->mAxis *= rot;
+ }
+ }
+
+ mLastPart = part;
+
part->mMaxAge = mPartSysData.mPartData.mMaxAge;
part->mStartColor = mPartSysData.mPartData.mStartColor;
part->mEndColor = mPartSysData.mPartData.mEndColor;
@@ -290,6 +308,13 @@ void LLViewerPartSourceScript::update(const F32 dt)
part->mAccel = mPartSysData.mPartAccel;
+ part->mBlendFuncDest = mPartSysData.mPartData.mBlendFuncDest;
+ part->mBlendFuncSource = mPartSysData.mPartData.mBlendFuncSource;
+
+ part->mStartGlow = mPartSysData.mPartData.mStartGlow;
+ part->mEndGlow = mPartSysData.mPartData.mEndGlow;
+ part->mGlow = LLColor4U(0, 0, 0, (U8) llround(part->mStartGlow*255.f));
+
if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_DROP)
{
part->mPosAgent = mPosAgent;
@@ -430,28 +455,51 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
}
-LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp)
+LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp, bool legacy)
{
if (!pssp)
{
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
- if (!new_pssp->mPartSysData.unpack(dp))
+ if (legacy)
{
- return NULL;
+ if (!new_pssp->mPartSysData.unpackLegacy(dp))
+ {
+ return NULL;
+ }
+ }
+ else
+ {
+ if (!new_pssp->mPartSysData.unpack(dp))
+ {
+ return NULL;
+ }
}
+
if (new_pssp->mPartSysData.mTargetUUID.notNull())
{
LLViewerObject *target_objp = gObjectList.findObject(new_pssp->mPartSysData.mTargetUUID);
new_pssp->setTargetObject(target_objp);
}
+
return new_pssp;
}
else
{
- if (!pssp->mPartSysData.unpack(dp))
+ if (legacy)
{
- return NULL;
+ if (!pssp->mPartSysData.unpackLegacy(dp))
+ {
+ return NULL;
+ }
}
+ else
+ {
+ if (!pssp->mPartSysData.unpack(dp))
+ {
+ return NULL;
+ }
+ }
+
if (pssp->mPartSysData.mTargetUUID.notNull())
{
LLViewerObject *target_objp = gObjectList.findObject(pssp->mPartSysData.mTargetUUID);
@@ -569,6 +617,11 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
part->mScale.mV[0] = 0.25f;
part->mScale.mV[1] = 0.25f;
part->mParameter = ll_frand(F_TWO_PI);
+ part->mBlendFuncDest = LLRender::BF_ONE_MINUS_SOURCE_ALPHA;
+ part->mBlendFuncSource = LLRender::BF_SOURCE_ALPHA;
+ part->mStartGlow = 0.f;
+ part->mEndGlow = 0.f;
+ part->mGlow = LLColor4U(0, 0, 0, 0);
LLViewerPartSim::getInstance()->addPart(part);
}
@@ -721,6 +774,12 @@ void LLViewerPartSourceBeam::update(const F32 dt)
part->mPosAgent = mPosAgent;
part->mVelocity = mTargetPosAgent - mPosAgent;
+ part->mBlendFuncDest = LLRender::BF_ONE_MINUS_SOURCE_ALPHA;
+ part->mBlendFuncSource = LLRender::BF_SOURCE_ALPHA;
+ part->mStartGlow = 0.f;
+ part->mEndGlow = 0.f;
+ part->mGlow = LLColor4U(0, 0, 0, 0);
+
LLViewerPartSim::getInstance()->addPart(part);
}
}
@@ -825,6 +884,12 @@ void LLViewerPartSourceChat::update(const F32 dt)
part->mScale.mV[0] = 0.25f;
part->mScale.mV[1] = 0.25f;
part->mParameter = ll_frand(F_TWO_PI);
+ part->mBlendFuncDest = LLRender::BF_ONE_MINUS_SOURCE_ALPHA;
+ part->mBlendFuncSource = LLRender::BF_SOURCE_ALPHA;
+ part->mStartGlow = 0.f;
+ part->mEndGlow = 0.f;
+ part->mGlow = LLColor4U(0, 0, 0, 0);
+
LLViewerPartSim::getInstance()->addPart(part);
}
diff --git a/indra/newview/llviewerpartsource.h b/indra/newview/llviewerpartsource.h
index 28702d36a2..12e926173b 100755
--- a/indra/newview/llviewerpartsource.h
+++ b/indra/newview/llviewerpartsource.h
@@ -76,6 +76,7 @@ public:
LLVector3 mLastUpdatePosAgent;
LLPointer<LLViewerObject> mSourceObjectp;
U32 mID;
+ LLViewerPart* mLastPart; //last particle emitted (for making particle ribbons)
protected:
U32 mType;
@@ -85,7 +86,6 @@ protected:
F32 mLastPartTime;
LLUUID mOwnerUUID;
LLPointer<LLViewerTexture> mImagep;
-
// Particle information
U32 mPartFlags; // Flags for the particle
U32 mDelay ; //delay to start particles
@@ -114,7 +114,7 @@ public:
// Returns a new particle source to attach to an object...
static LLPointer<LLViewerPartSourceScript> unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num);
- static LLPointer<LLViewerPartSourceScript> unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp);
+ static LLPointer<LLViewerPartSourceScript> unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp, bool legacy);
static LLPointer<LLViewerPartSourceScript> createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters);
LLViewerTexture *getImage() const { return mImagep; }
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index a4f6340d9e..778c0ee61a 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -44,6 +44,7 @@
#include "llagent.h"
#include "llagentcamera.h"
+#include "llavatarrenderinfoaccountant.h"
#include "llcallingcard.h"
#include "llcaphttpsender.h"
#include "llcapabilitylistener.h"
@@ -300,12 +301,16 @@ public:
if ( regionp->getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() )
{
- llinfos<<"BaseCapabilitiesCompleteTracker "<<"Sim sent duplicate seed caps that differs in size - most likely content."<<llendl;
+ llinfos << "BaseCapabilitiesCompleteTracker " << "sim " << regionp->getName()
+ << " sent duplicate seed caps that differs in size - most likely content. "
+ << (S32) regionp->getRegionImpl()->mCapabilities.size() << " vs " << regionp->getRegionImpl()->mSecondCapabilitiesTracker.size()
+ << llendl;
//todo#add cap debug versus original check?
- /*CapabilityMap::const_iterator iter = regionp->getRegionImpl()->mCapabilities.begin();
+ /*
+ CapabilityMap::const_iterator iter = regionp->getRegionImpl()->mCapabilities.begin();
while (iter!=regionp->getRegionImpl()->mCapabilities.end() )
{
- llinfos<<"BaseCapabilitiesCompleteTracker Original "<<iter->first<<" "<< iter->second<<llendl;
+ llinfos << "BaseCapabilitiesCompleteTracker Original " << iter->first << " is " << iter->second << llendl;
++iter;
}
*/
@@ -393,6 +398,9 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE
mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
+
+ mRenderInfoRequestTimer.resetWithExpiry(0.f); // Set timer to be expired
+ setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer));
}
@@ -1577,6 +1585,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("AgentState");
capabilityNames.append("AttachmentResources");
capabilityNames.append("AvatarPickerSearch");
+ capabilityNames.append("AvatarRenderInfo");
capabilityNames.append("CharacterProperties");
capabilityNames.append("ChatSessionRequest");
capabilityNames.append("CopyInventoryFromNotecard");
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 031159183b..e2cc95f232 100755
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -376,6 +376,8 @@ public:
LLDynamicArray<U32> mMapAvatars;
LLDynamicArray<LLUUID> mMapAvatarIDs;
+ LLFrameTimer & getRenderInfoRequestTimer() { return mRenderInfoRequestTimer; };
+
private:
LLViewerRegionImpl * mImpl;
@@ -434,6 +436,8 @@ private:
BOOL mReleaseNotesRequested;
LLSD mSimulatorFeatures;
+
+ LLFrameTimer mRenderInfoRequestTimer;
};
inline BOOL LLViewerRegion::getRegionProtocol(U64 protocol) const
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 7bce629d3e..dfe4147d94 100755
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -48,6 +48,13 @@
#define UNIFORM_ERRS LL_ERRS("Shader")
#endif
+static LLStaticHashedString sTexture0("texture0");
+static LLStaticHashedString sTexture1("texture1");
+static LLStaticHashedString sTex0("tex0");
+static LLStaticHashedString sTex1("tex1");
+static LLStaticHashedString sGlowMap("glowMap");
+static LLStaticHashedString sScreenMap("screenMap");
+
// Lots of STL stuff in here, using namespace std to keep things more readable
using std::vector;
using std::pair;
@@ -323,47 +330,6 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void)
if (mReservedAttribs.empty())
{
LLShaderMgr::initAttribsAndUniforms();
-
- mAvatarUniforms.push_back("matrixPalette");
- mAvatarUniforms.push_back("gWindDir");
- mAvatarUniforms.push_back("gSinWaveParams");
- mAvatarUniforms.push_back("gGravity");
-
- mWLUniforms.push_back("camPosLocal");
-
- mTerrainUniforms.reserve(5);
- mTerrainUniforms.push_back("detail_0");
- mTerrainUniforms.push_back("detail_1");
- mTerrainUniforms.push_back("detail_2");
- mTerrainUniforms.push_back("detail_3");
- mTerrainUniforms.push_back("alpha_ramp");
-
- mGlowUniforms.push_back("glowDelta");
- mGlowUniforms.push_back("glowStrength");
-
- mGlowExtractUniforms.push_back("minLuminance");
- mGlowExtractUniforms.push_back("maxExtractAlpha");
- mGlowExtractUniforms.push_back("lumWeights");
- mGlowExtractUniforms.push_back("warmthWeights");
- mGlowExtractUniforms.push_back("warmthAmount");
-
- mShinyUniforms.push_back("origin");
-
- mWaterUniforms.reserve(12);
- mWaterUniforms.push_back("screenTex");
- mWaterUniforms.push_back("screenDepth");
- mWaterUniforms.push_back("refTex");
- mWaterUniforms.push_back("eyeVec");
- mWaterUniforms.push_back("time");
- mWaterUniforms.push_back("d1");
- mWaterUniforms.push_back("d2");
- mWaterUniforms.push_back("lightDir");
- mWaterUniforms.push_back("specular");
- mWaterUniforms.push_back("lightExp");
- mWaterUniforms.push_back("fogCol");
- mWaterUniforms.push_back("kd");
- mWaterUniforms.push_back("refScale");
- mWaterUniforms.push_back("waterHeight");
}
}
@@ -950,7 +916,7 @@ BOOL LLViewerShaderMgr::loadShadersEnvironment()
gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainV.glsl", GL_VERTEX_SHADER_ARB));
gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainF.glsl", GL_FRAGMENT_SHADER_ARB));
gTerrainProgram.mShaderLevel = mVertexShaderLevel[SHADER_ENVIRONMENT];
- success = gTerrainProgram.createShader(NULL, &mTerrainUniforms);
+ success = gTerrainProgram.createShader(NULL, NULL);
}
if (!success)
@@ -988,7 +954,7 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER_ARB));
gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER_ARB));
gWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_WATER];
- success = gWaterProgram.createShader(NULL, &mWaterUniforms);
+ success = gWaterProgram.createShader(NULL, NULL);
}
if (success)
@@ -1002,7 +968,7 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gUnderWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_WATER];
gUnderWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- success = gUnderWaterProgram.createShader(NULL, &mWaterUniforms);
+ success = gUnderWaterProgram.createShader(NULL, NULL);
}
if (success)
@@ -1020,7 +986,7 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
gTerrainWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_ENVIRONMENT];
gTerrainWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- terrainWaterSuccess = gTerrainWaterProgram.createShader(NULL, &mTerrainUniforms);
+ terrainWaterSuccess = gTerrainWaterProgram.createShader(NULL, NULL);
}
/// Keep track of water shader levels
@@ -1069,7 +1035,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
gGlowProgram.mShaderFiles.push_back(make_pair("effects/glowV.glsl", GL_VERTEX_SHADER_ARB));
gGlowProgram.mShaderFiles.push_back(make_pair("effects/glowF.glsl", GL_FRAGMENT_SHADER_ARB));
gGlowProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
- success = gGlowProgram.createShader(NULL, &mGlowUniforms);
+ success = gGlowProgram.createShader(NULL, NULL);
if (!success)
{
LLPipeline::sRenderGlow = FALSE;
@@ -1083,7 +1049,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractV.glsl", GL_VERTEX_SHADER_ARB));
gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractF.glsl", GL_FRAGMENT_SHADER_ARB));
gGlowExtractProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
- success = gGlowExtractProgram.createShader(NULL, &mGlowExtractUniforms);
+ success = gGlowExtractProgram.createShader(NULL, NULL);
if (!success)
{
LLPipeline::sRenderGlow = FALSE;
@@ -1504,7 +1470,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredFullbrightShinyProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredFullbrightShinyProgram.createShader(NULL, &mShinyUniforms);
+ success = gDeferredFullbrightShinyProgram.createShader(NULL, NULL);
}
if (success)
@@ -1534,7 +1500,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredSkinnedFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinySkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredSkinnedFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSkinnedFullbrightShinyProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gDeferredSkinnedFullbrightShinyProgram.createShader(NULL, &mShinyUniforms);
+ success = gDeferredSkinnedFullbrightShinyProgram.createShader(NULL, NULL);
}
if (success)
@@ -1562,7 +1528,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredWaterProgram.createShader(NULL, &mWaterUniforms);
+ success = gDeferredWaterProgram.createShader(NULL, NULL);
}
if (success)
@@ -1625,7 +1591,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarShadowF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0");
gDeferredAvatarShadowProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredAvatarShadowProgram.createShader(NULL, &mAvatarUniforms);
+ success = gDeferredAvatarShadowProgram.createShader(NULL, NULL);
}
if (success)
@@ -1647,7 +1613,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredTerrainProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredTerrainProgram.createShader(NULL, &mTerrainUniforms);
+ success = gDeferredTerrainProgram.createShader(NULL, NULL);
}
if (success)
@@ -1658,7 +1624,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredAvatarProgram.createShader(NULL, &mAvatarUniforms);
+ success = gDeferredAvatarProgram.createShader(NULL, NULL);
}
if (success)
@@ -1681,7 +1647,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.addPermutation("HAS_SHADOW", mVertexShaderLevel[SHADER_DEFERRED] > 1 ? "1" : "0");
gDeferredAvatarAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredAvatarAlphaProgram.createShader(NULL, &mAvatarUniforms);
+ success = gDeferredAvatarAlphaProgram.createShader(NULL, NULL);
gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = true;
gDeferredAvatarAlphaProgram.mFeatures.hasLighting = true;
@@ -1756,7 +1722,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredWLSkyProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
gDeferredWLSkyProgram.mShaderGroup = LLGLSLShader::SG_SKY;
- success = gDeferredWLSkyProgram.createShader(NULL, &mWLUniforms);
+ success = gDeferredWLSkyProgram.createShader(NULL, NULL);
}
if (success)
@@ -1767,7 +1733,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredWLCloudProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
gDeferredWLCloudProgram.mShaderGroup = LLGLSLShader::SG_SKY;
- success = gDeferredWLCloudProgram.createShader(NULL, &mWLUniforms);
+ success = gDeferredWLCloudProgram.createShader(NULL, NULL);
}
if (success)
@@ -1778,7 +1744,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredStarProgram.mShaderFiles.push_back(make_pair("deferred/starsF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredStarProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
gDeferredStarProgram.mShaderGroup = LLGLSLShader::SG_SKY;
- success = gDeferredStarProgram.createShader(NULL, &mWLUniforms);
+ success = gDeferredStarProgram.createShader(NULL, NULL);
}
if (success)
@@ -2129,7 +2095,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectShinyNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gObjectShinyNonIndexedProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectShinyNonIndexedProgram.createShader(NULL, NULL);
}
if (success)
@@ -2146,7 +2112,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectShinyNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectShinyNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
gObjectShinyNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- success = gObjectShinyNonIndexedWaterProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectShinyNonIndexedWaterProgram.createShader(NULL, NULL);
}
if (success)
@@ -2162,7 +2128,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectFullbrightShinyNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectFullbrightShinyNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gObjectFullbrightShinyNonIndexedProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectFullbrightShinyNonIndexedProgram.createShader(NULL, NULL);
}
if (success)
@@ -2180,7 +2146,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectFullbrightShinyNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
gObjectFullbrightShinyNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- success = gObjectFullbrightShinyNonIndexedWaterProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectFullbrightShinyNonIndexedWaterProgram.createShader(NULL, NULL);
}
if (success)
@@ -2259,12 +2225,11 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectBumpProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
success = gObjectBumpProgram.createShader(NULL, NULL);
-
if (success)
{ //lldrawpoolbump assumes "texture0" has channel 0 and "texture1" has channel 1
gObjectBumpProgram.bind();
- gObjectBumpProgram.uniform1i("texture0", 0);
- gObjectBumpProgram.uniform1i("texture1", 1);
+ gObjectBumpProgram.uniform1i(sTexture0, 0);
+ gObjectBumpProgram.uniform1i(sTexture1, 1);
gObjectBumpProgram.unbind();
}
}
@@ -2413,7 +2378,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectShinyProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gObjectShinyProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectShinyProgram.createShader(NULL, NULL);
}
if (success)
@@ -2430,7 +2395,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectShinyWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
gObjectShinyWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- success = gObjectShinyWaterProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectShinyWaterProgram.createShader(NULL, NULL);
}
if (success)
@@ -2446,7 +2411,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB));
gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectFullbrightShinyProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gObjectFullbrightShinyProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectFullbrightShinyProgram.createShader(NULL, NULL);
}
if (success)
@@ -2464,7 +2429,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectFullbrightShinyWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
gObjectFullbrightShinyWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- success = gObjectFullbrightShinyWaterProgram.createShader(NULL, &mShinyUniforms);
+ success = gObjectFullbrightShinyWaterProgram.createShader(NULL, NULL);
}
if (mVertexShaderLevel[SHADER_AVATAR] > 0)
@@ -2552,7 +2517,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinySkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gSkinnedObjectFullbrightShinyProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gSkinnedObjectFullbrightShinyProgram.createShader(NULL, &mShinyUniforms);
+ success = gSkinnedObjectFullbrightShinyProgram.createShader(NULL, NULL);
}
if (success)
@@ -2570,7 +2535,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectShinySimpleProgram.mShaderFiles.push_back(make_pair("objects/shinySimpleSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectShinySimpleProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER_ARB));
gSkinnedObjectShinySimpleProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gSkinnedObjectShinySimpleProgram.createShader(NULL, &mShinyUniforms);
+ success = gSkinnedObjectShinySimpleProgram.createShader(NULL, NULL);
}
if (success)
@@ -2629,7 +2594,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinySkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
gSkinnedObjectFullbrightShinyWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gSkinnedObjectFullbrightShinyWaterProgram.createShader(NULL, &mShinyUniforms);
+ success = gSkinnedObjectFullbrightShinyWaterProgram.createShader(NULL, NULL);
}
if (success)
@@ -2649,7 +2614,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gSkinnedObjectShinySimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/shinySimpleSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gSkinnedObjectShinySimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
gSkinnedObjectShinySimpleWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
- success = gSkinnedObjectShinySimpleWaterProgram.createShader(NULL, &mShinyUniforms);
+ success = gSkinnedObjectShinySimpleWaterProgram.createShader(NULL, NULL);
}
}
@@ -2690,7 +2655,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarF.glsl", GL_FRAGMENT_SHADER_ARB));
gAvatarProgram.mShaderLevel = mVertexShaderLevel[SHADER_AVATAR];
- success = gAvatarProgram.createShader(NULL, &mAvatarUniforms);
+ success = gAvatarProgram.createShader(NULL, NULL);
if (success)
{
@@ -2709,7 +2674,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
// Note: no cloth under water:
gAvatarWaterProgram.mShaderLevel = llmin(mVertexShaderLevel[SHADER_AVATAR], 1);
gAvatarWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- success = gAvatarWaterProgram.createShader(NULL, &mAvatarUniforms);
+ success = gAvatarWaterProgram.createShader(NULL, NULL);
}
/// Keep track of avatar levels
@@ -2728,7 +2693,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarF.glsl", GL_FRAGMENT_SHADER_ARB));
gAvatarPickProgram.mShaderLevel = mVertexShaderLevel[SHADER_AVATAR];
- success = gAvatarPickProgram.createShader(NULL, &mAvatarUniforms);
+ success = gAvatarPickProgram.createShader(NULL, NULL);
}
if (success)
@@ -2850,7 +2815,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gSplatTextureRectProgram.bind();
- gSplatTextureRectProgram.uniform1i("screenMap", 0);
+ gSplatTextureRectProgram.uniform1i(sScreenMap, 0);
gSplatTextureRectProgram.unbind();
}
}
@@ -2866,8 +2831,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gGlowCombineProgram.bind();
- gGlowCombineProgram.uniform1i("glowMap", 0);
- gGlowCombineProgram.uniform1i("screenMap", 1);
+ gGlowCombineProgram.uniform1i(sGlowMap, 0);
+ gGlowCombineProgram.uniform1i(sScreenMap, 1);
gGlowCombineProgram.unbind();
}
}
@@ -2883,8 +2848,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gGlowCombineFXAAProgram.bind();
- gGlowCombineFXAAProgram.uniform1i("glowMap", 0);
- gGlowCombineFXAAProgram.uniform1i("screenMap", 1);
+ gGlowCombineFXAAProgram.uniform1i(sGlowMap, 0);
+ gGlowCombineFXAAProgram.uniform1i(sScreenMap, 1);
gGlowCombineFXAAProgram.unbind();
}
}
@@ -2901,8 +2866,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gTwoTextureAddProgram.bind();
- gTwoTextureAddProgram.uniform1i("tex0", 0);
- gTwoTextureAddProgram.uniform1i("tex1", 1);
+ gTwoTextureAddProgram.uniform1i(sTex0, 0);
+ gTwoTextureAddProgram.uniform1i(sTex1, 1);
}
}
@@ -2917,7 +2882,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gOneTextureNoColorProgram.bind();
- gOneTextureNoColorProgram.uniform1i("tex0", 0);
+ gOneTextureNoColorProgram.uniform1i(sTex0, 0);
}
}
@@ -2932,7 +2897,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gSolidColorProgram.bind();
- gSolidColorProgram.uniform1i("tex0", 0);
+ gSolidColorProgram.uniform1i(sTex0, 0);
gSolidColorProgram.unbind();
}
}
@@ -3036,7 +3001,7 @@ BOOL LLViewerShaderMgr::loadShadersWindLight()
gWLSkyProgram.mShaderFiles.push_back(make_pair("windlight/skyF.glsl", GL_FRAGMENT_SHADER_ARB));
gWLSkyProgram.mShaderLevel = mVertexShaderLevel[SHADER_WINDLIGHT];
gWLSkyProgram.mShaderGroup = LLGLSLShader::SG_SKY;
- success = gWLSkyProgram.createShader(NULL, &mWLUniforms);
+ success = gWLSkyProgram.createShader(NULL, NULL);
}
if (success)
@@ -3048,7 +3013,7 @@ BOOL LLViewerShaderMgr::loadShadersWindLight()
gWLCloudProgram.mShaderFiles.push_back(make_pair("windlight/cloudsF.glsl", GL_FRAGMENT_SHADER_ARB));
gWLCloudProgram.mShaderLevel = mVertexShaderLevel[SHADER_WINDLIGHT];
gWLCloudProgram.mShaderGroup = LLGLSLShader::SG_SKY;
- success = gWLCloudProgram.createShader(NULL, &mWLUniforms);
+ success = gWLCloudProgram.createShader(NULL, NULL);
}
return success;
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index ed8167947d..a685ce5914 100755
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -77,56 +77,7 @@ public:
SHADER_COUNT
};
- typedef enum
- {
- SHINY_ORIGIN = END_RESERVED_UNIFORMS
- } eShinyUniforms;
-
- typedef enum
- {
- WATER_SCREENTEX = END_RESERVED_UNIFORMS,
- WATER_SCREENDEPTH,
- WATER_REFTEX,
- WATER_EYEVEC,
- WATER_TIME,
- WATER_WAVE_DIR1,
- WATER_WAVE_DIR2,
- WATER_LIGHT_DIR,
- WATER_SPECULAR,
- WATER_SPECULAR_EXP,
- WATER_FOGCOLOR,
- WATER_FOGDENSITY,
- WATER_REFSCALE,
- WATER_WATERHEIGHT,
- } eWaterUniforms;
-
- typedef enum
- {
- WL_CAMPOSLOCAL = END_RESERVED_UNIFORMS,
- WL_WATERHEIGHT
- } eWLUniforms;
-
- typedef enum
- {
- TERRAIN_DETAIL0 = END_RESERVED_UNIFORMS,
- TERRAIN_DETAIL1,
- TERRAIN_DETAIL2,
- TERRAIN_DETAIL3,
- TERRAIN_ALPHARAMP
- } eTerrainUniforms;
-
- typedef enum
- {
- GLOW_DELTA = END_RESERVED_UNIFORMS
- } eGlowUniforms;
-
- typedef enum
- {
- AVATAR_MATRIX = END_RESERVED_UNIFORMS,
- AVATAR_WIND,
- AVATAR_SINWAVE,
- AVATAR_GRAVITY,
- } eAvatarUniforms;
+
// simple model of forward iterator
// http://www.sgi.com/tech/stl/ForwardIterator.html
@@ -179,23 +130,6 @@ public:
/* virtual */ void updateShaderUniforms(LLGLSLShader * shader);
private:
-
- std::vector<std::string> mShinyUniforms;
-
- //water parameters
- std::vector<std::string> mWaterUniforms;
-
- std::vector<std::string> mWLUniforms;
-
- //terrain parameters
- std::vector<std::string> mTerrainUniforms;
-
- //glow parameters
- std::vector<std::string> mGlowUniforms;
-
- std::vector<std::string> mGlowExtractUniforms;
-
- std::vector<std::string> mAvatarUniforms;
// the list of shaders we need to propagate parameters to.
std::vector<LLGLSLShader *> mShaderList;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 6cc9f4ace1..84f66c359f 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1199,10 +1199,10 @@ void LLViewerFetchedTexture::dump()
// ONLY called from LLViewerFetchedTextureList
void LLViewerFetchedTexture::destroyTexture()
{
- //if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes)//not ready to release unused memory.
- //{
- // return ;
- //}
+ if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes * 0.95f)//not ready to release unused memory.
+ {
+ return ;
+ }
if (mNeedsCreateTexture)//return if in the process of generating a new texture.
{
return ;
@@ -1290,7 +1290,12 @@ void LLViewerFetchedTexture::addToCreateTexture()
destroyRawImage();
return ;
}
- mRawImage->scale(w >> i, h >> i) ;
+
+ {
+ //make a duplicate in case somebody else is using this raw image
+ mRawImage = mRawImage->duplicate();
+ mRawImage->scale(w >> i, h >> i) ;
+ }
}
}
}
@@ -1521,7 +1526,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
else if (pixel_priority < 0.001f && !have_all_data)
{
// Not on screen but we might want some data
- if (mBoostLevel > BOOST_HIGH)
+ if (mBoostLevel > BOOST_SELECTED)
{
// Always want high boosted images
priority = 1.f;
@@ -2669,7 +2674,11 @@ void LLViewerFetchedTexture::setCachedRawImage()
--i ;
}
- mRawImage->scale(w >> i, h >> i) ;
+ {
+ //make a duplicate in case somebody else is using this raw image
+ mRawImage = mRawImage->duplicate();
+ mRawImage->scale(w >> i, h >> i) ;
+ }
}
mCachedRawImage = mRawImage ;
mRawDiscardLevel += i ;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index c96f89017f..10101a4b9b 100755
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -101,6 +101,7 @@ public:
INVALID_TEXTURE_TYPE
};
+
typedef std::vector<LLFace*> ll_face_list_t;
typedef std::vector<LLVOVolume*> ll_volume_list_t;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index d9f3548a29..fc43abf844 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -561,15 +561,17 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
llassert_always(mInitialized) ;
llassert(image);
if (image->isInImageList())
- {
- llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl;
+ { // Flag is already set?
+ llwarns << "LLViewerTextureList::addImageToList - image " << image->getID() << " already in list" << llendl;
}
- if((mImageList.insert(image)).second != true)
+ else
{
- llerrs << "Error happens when insert image to mImageList!" << llendl ;
+ if((mImageList.insert(image)).second != true)
+ {
+ llwarns << "Error happens when insert image " << image->getID() << " into mImageList!" << llendl ;
+ }
+ image->setInImageList(TRUE) ;
}
-
- image->setInImageList(TRUE) ;
}
void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
@@ -577,24 +579,46 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
assert_main_thread();
llassert_always(mInitialized) ;
llassert(image);
- if (!image->isInImageList())
+
+ S32 count = 0;
+ if (image->isInImageList())
{
- llinfos << "RefCount: " << image->getNumRefs() << llendl ;
+ count = mImageList.erase(image) ;
+ if(count != 1)
+ {
+ llwarns << "Image " << image->getID()
+ << " had mInImageList set but mImageList.erase() returned " << count
+ << llendl;
+ }
+ }
+ else
+ { // Something is wrong, image is expected in list or callers should check first
+ llwarns << "Calling removeImageFromList() for " << image->getID()
+ << " but doesn't have mInImageList set"
+ << " ref count is " << image->getNumRefs()
+ << llendl;
uuid_map_t::iterator iter = mUUIDMap.find(image->getID());
- if(iter == mUUIDMap.end() || iter->second != image)
+ if(iter == mUUIDMap.end())
{
- llinfos << "Image is not in mUUIDMap!" << llendl ;
+ llwarns << "Image " << image->getID() << " is also not in mUUIDMap!" << llendl ;
+ }
+ else if (iter->second != image)
+ {
+ llwarns << "Image " << image->getID() << " was in mUUIDMap but with different pointer" << llendl ;
+ }
+ else
+ {
+ llwarns << "Image " << image->getID() << " was in mUUIDMap with same pointer" << llendl ;
+ }
+ count = mImageList.erase(image) ;
+ if(count != 0)
+ { // it was in the list already?
+ llwarns << "Image " << image->getID()
+ << " had mInImageList false but mImageList.erase() returned " << count
+ << llendl;
}
- llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl;
}
- S32 count = mImageList.erase(image) ;
- if(count != 1)
- {
- llinfos << image->getID() << llendl ;
- llerrs << "Error happens when remove image from mImageList: " << count << llendl ;
- }
-
image->setInImageList(FALSE) ;
}
@@ -1237,7 +1261,7 @@ S32 LLViewerTextureList::getMinVideoRamSetting()
//static
// Returns max setting for TextureMemory (in MB)
-S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
+S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_multiplier)
{
S32 max_texmem;
if (gGLManager.mVRAM != 0)
@@ -1281,7 +1305,10 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
max_texmem = llmin(max_texmem, (S32)(system_ram/2));
else
max_texmem = llmin(max_texmem, (S32)(system_ram));
-
+
+ // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
+ max_texmem = llmin(max_texmem, (S32) (mem_multiplier * (F32) max_texmem));
+
max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), MAX_VIDEO_RAM_IN_MEGA_BYTES);
return max_texmem;
@@ -1294,7 +1321,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
// Initialize the image pipeline VRAM settings
S32 cur_mem = gSavedSettings.getS32("TextureMemory");
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
- S32 default_mem = getMaxVideoRamSetting(true); // recommended default
+ S32 default_mem = getMaxVideoRamSetting(true, mem_multiplier); // recommended default
if (mem == 0)
{
mem = cur_mem > 0 ? cur_mem : default_mem;
@@ -1304,10 +1331,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
mem = default_mem;
}
- // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
- mem = llmin(mem, (S32) (mem_multiplier * (F32) default_mem));
-
- mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting());
+ mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting(false, mem_multiplier));
if (mem != cur_mem)
{
gSavedSettings.setS32("TextureMemory", mem);
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 136042620d..26dc6dcbe2 100755
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -114,7 +114,7 @@ public:
void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level);
static S32 getMinVideoRamSetting();
- static S32 getMaxVideoRamSetting(bool get_recommended = false);
+ static S32 getMaxVideoRamSetting(bool get_recommended, float mem_multiplier);
private:
void updateImagesDecodePriorities();
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 65a906d3c0..05e5dc68a5 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -151,6 +151,7 @@
#include "lltexturecache.h"
#include "lltexturefetch.h"
#include "lltextureview.h"
+#include "lltoast.h"
#include "lltool.h"
#include "lltoolbarview.h"
#include "lltoolcomp.h"
@@ -229,7 +230,9 @@ LLFrameTimer gAwayTriggerTimer;
BOOL gShowOverlayTitle = FALSE;
LLViewerObject* gDebugRaycastObject = NULL;
+LLVOPartGroup* gDebugRaycastParticle = NULL;
LLVector4a gDebugRaycastIntersection;
+LLVector4a gDebugRaycastParticleIntersection;
LLVector2 gDebugRaycastTexCoord;
LLVector4a gDebugRaycastNormal;
LLVector4a gDebugRaycastTangent;
@@ -331,9 +334,10 @@ public:
mTextColor = LLColor4( 0.86f, 0.86f, 0.86f, 1.f );
// Draw stuff growing up from right lower corner of screen
- U32 xpos = mWindow->getWorldViewWidthScaled() - 350;
- U32 ypos = 64;
- const U32 y_inc = 20;
+ S32 xpos = mWindow->getWorldViewWidthScaled() - 400;
+ xpos = llmax(xpos, 0);
+ S32 ypos = 64;
+ const S32 y_inc = 20;
clearText();
@@ -633,6 +637,42 @@ public:
LLVertexBuffer::sSetCount = LLImageGL::sUniqueCount =
gPipeline.mNumVisibleNodes = LLPipeline::sVisibleLightCount = 0;
}
+ if (gSavedSettings.getBOOL("DebugShowAvatarRenderInfo"))
+ {
+ std::map<std::string, LLVOAvatar*> sorted_avs;
+
+ std::vector<LLCharacter*>::iterator sort_iter = LLCharacter::sInstances.begin();
+ while (sort_iter != LLCharacter::sInstances.end())
+ {
+ LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*sort_iter);
+ if (avatar &&
+ !avatar->isDead()) // Not dead yet
+ {
+ // Stuff into a sorted map so the display is ordered
+ sorted_avs[avatar->getFullname()] = avatar;
+ }
+ sort_iter++;
+ }
+
+ std::string trunc_name;
+ std::map<std::string, LLVOAvatar*>::reverse_iterator av_iter = sorted_avs.rbegin(); // Put "A" at the top
+ while (av_iter != sorted_avs.rend())
+ {
+ LLVOAvatar* avatar = av_iter->second;
+
+ avatar->calculateUpdateRenderCost(); // Make sure the numbers are up-to-date
+
+ trunc_name = utf8str_truncate(avatar->getFullname(), 16);
+ addText(xpos, ypos, llformat("%s : rez %d, weight %d, bytes %d area %.2f",
+ trunc_name.c_str(),
+ avatar->getRezzedStatus(),
+ avatar->getVisualComplexity(),
+ avatar->getAttachmentGeometryBytes(),
+ avatar->getAttachmentSurfaceArea()));
+ ypos += y_inc;
+ av_iter++;
+ }
+ }
if (gSavedSettings.getBOOL("DebugShowRenderMatrices"))
{
addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLProjection[12], gGLProjection[13], gGLProjection[14], gGLProjection[15]));
@@ -1997,6 +2037,9 @@ void LLViewerWindow::shutdownViews()
}
llinfos << "Global views cleaned." << llendl ;
+ LLNotificationsUI::LLToast::cleanupToasts();
+ llinfos << "Leftover toast cleaned up." << llendl;
+
// DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open
// will crump with LL_ERRS.
LLModalDialog::shutdownModals();
@@ -2844,6 +2887,8 @@ void LLViewerWindow::updateUI()
&gDebugRaycastTangent,
&gDebugRaycastStart,
&gDebugRaycastEnd);
+
+ gDebugRaycastParticle = gPipeline.lineSegmentIntersectParticle(gDebugRaycastStart, gDebugRaycastEnd, &gDebugRaycastParticleIntersection, NULL);
}
updateMouseDelta();
@@ -3664,7 +3709,7 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback
pick_transparent = TRUE;
}
- LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, TRUE, callback);
+ LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, callback);
schedulePick(pick_info);
}
@@ -3720,7 +3765,7 @@ void LLViewerWindow::returnEmptyPicks()
}
// Performs the GL object/land pick.
-LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent)
+LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_particle)
{
BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
@@ -3729,10 +3774,10 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans
// "Show Debug Alpha" means no object actually transparent
pick_transparent = TRUE;
}
-
+
// shortcut queueing in mPicks and just update mLastPick in place
MASK key_mask = gKeyboard->currentMask(TRUE);
- mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, TRUE, NULL);
+ mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, NULL);
mLastPick.fetchResults();
return mLastPick;
@@ -4291,7 +4336,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
F32 scale_factor = 1.0f ;
if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height))
{
- if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
+ if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&
+ (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
{
if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true))
{
@@ -4306,6 +4352,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
snapshot_height = image_height;
reset_deferred = true;
mWorldViewRectRaw.set(0, image_height, image_width, 0);
+ LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
+ LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
scratch_space.bindTarget();
}
else
@@ -4515,6 +4563,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (reset_deferred)
{
mWorldViewRectRaw = window_rect;
+ LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
+ LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
scratch_space.flush();
scratch_space.release();
gPipeline.allocateScreenBuffer(original_width, original_height);
@@ -5128,13 +5178,15 @@ LLPickInfo::LLPickInfo()
mTangent(),
mBinormal(),
mHUDIcon(NULL),
- mPickTransparent(FALSE)
+ mPickTransparent(FALSE),
+ mPickParticle(FALSE)
{
}
LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
BOOL pick_transparent,
+ BOOL pick_particle,
BOOL pick_uv_coords,
void (*pick_callback)(const LLPickInfo& pick_info))
: mMousePt(mouse_pos),
@@ -5150,7 +5202,8 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
mTangent(),
mBinormal(),
mHUDIcon(NULL),
- mPickTransparent(pick_transparent)
+ mPickTransparent(pick_transparent),
+ mPickParticle(pick_particle)
{
}
@@ -5168,6 +5221,10 @@ void LLPickInfo::fetchResults()
LLVector4a origin;
origin.load3(LLViewerCamera::getInstance()->getOrigin().mV);
F32 icon_dist = 0.f;
+ LLVector4a start;
+ LLVector4a end;
+ LLVector4a particle_end;
+
if (hit_icon)
{
LLVector4a delta;
@@ -5177,14 +5234,24 @@ void LLPickInfo::fetchResults()
LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f,
NULL, -1, mPickTransparent, &face_hit,
- &intersection, &uv, &normal, &tangent);
+ &intersection, &uv, &normal, &tangent, &start, &end);
mPickPt = mMousePt;
U32 te_offset = face_hit > -1 ? face_hit : 0;
- //unproject relative clicked coordinate from window coordinate using GL
-
+ if (mPickParticle)
+ { //get the end point of line segement to use for particle raycast
+ if (hit_object)
+ {
+ particle_end = intersection;
+ }
+ else
+ {
+ particle_end = end;
+ }
+ }
+
LLViewerObject* objectp = hit_object;
@@ -5199,6 +5266,7 @@ void LLPickInfo::fetchResults()
mHUDIcon = hit_icon;
mPickType = PICK_ICON;
mPosGlobal = mHUDIcon->getPositionGlobal();
+
}
else if (objectp)
{
@@ -5248,6 +5316,18 @@ void LLPickInfo::fetchResults()
}
}
+ if (mPickParticle)
+ { //search for closest particle to click origin out to intersection point
+ S32 part_face = -1;
+
+ LLVOPartGroup* group = gPipeline.lineSegmentIntersectParticle(start, particle_end, NULL, &part_face);
+ if (group)
+ {
+ mParticleOwnerID = group->getPartOwner(part_face);
+ mParticleSourceID = group->getPartSource(part_face);
+ }
+ }
+
if (mPickCallback)
{
mPickCallback(*this);
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 89f6e3bc26..c16b80b214 100755
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -65,6 +65,7 @@ class LLWindow;
class LLRootView;
class LLWindowListener;
class LLViewerWindowListener;
+class LLVOPartGroup;
class LLPopupView;
#define PICK_HALF_WIDTH 5
@@ -87,7 +88,8 @@ public:
LLPickInfo();
LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
- BOOL pick_transparent,
+ BOOL pick_transparent,
+ BOOL pick_particle,
BOOL pick_surface_info,
void (*pick_callback)(const LLPickInfo& pick_info));
@@ -108,6 +110,8 @@ public:
LLVector3d mPosGlobal;
LLVector3 mObjectOffset;
LLUUID mObjectID;
+ LLUUID mParticleOwnerID;
+ LLUUID mParticleSourceID;
S32 mObjectFace;
LLHUDIcon* mHUDIcon;
LLVector3 mIntersection;
@@ -118,6 +122,7 @@ public:
LLVector4 mTangent;
LLVector3 mBinormal;
BOOL mPickTransparent;
+ BOOL mPickParticle;
void getSurfaceInfo();
private:
@@ -356,7 +361,7 @@ public:
void returnEmptyPicks();
void pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE);
- LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent);
+ LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE);
LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth,
LLVector4a* intersection);
@@ -501,6 +506,8 @@ extern LLFrameTimer gAwayTriggerTimer; // how long the avatar has been away
extern LLViewerObject* gDebugRaycastObject;
extern LLVector4a gDebugRaycastIntersection;
+extern LLVOPartGroup* gDebugRaycastParticle;
+extern LLVector4a gDebugRaycastParticleIntersection;
extern LLVector2 gDebugRaycastTexCoord;
extern LLVector4a gDebugRaycastNormal;
extern LLVector4a gDebugRaycastTangent;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1a050800b4..1aa38e6bfa 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -58,6 +58,7 @@
#include "llhudmanager.h"
#include "llhudnametag.h"
#include "llhudtext.h" // for mText/mDebugText
+#include "llimview.h"
#include "llinitparam.h"
#include "llkeyframefallmotion.h"
#include "llkeyframestandmotion.h"
@@ -668,6 +669,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mSpecialRenderMode(0),
mAttachmentGeometryBytes(0),
mAttachmentSurfaceArea(0.f),
+ mReportedVisualComplexity(-1),
+ mReportedAttachmentGeometryBytes(-1),
+ mReportedAttachmentSurfaceArea(-1.f),
mTurning(FALSE),
mLastSkeletonSerialNum( 0 ),
mIsSitting(FALSE),
@@ -701,6 +705,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mFullyLoaded(FALSE),
mPreviousFullyLoaded(FALSE),
mFullyLoadedInitialized(FALSE),
+ mVisualComplexity(0),
+ mVisualComplexityStale(TRUE),
mLoadedCallbacksPaused(FALSE),
mHasPelvisOffset( FALSE ),
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar")),
@@ -769,6 +775,13 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mLastPelvisToFoot = 0.0f;
mPelvisFixup = 0.0f;
mLastPelvisFixup = 0.0f;
+
+ mCachedVisualMute = !isSelf();
+ mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() + 5.0;
+ mVisuallyMuteSetting = VISUAL_MUTE_NOT_SET;
+
+ F32 color_value = (F32) (getID().mData[0]);
+ mMutedAVColor = calcMutedAVColor(color_value, 0, 256);
}
std::string LLVOAvatar::avString() const
@@ -2972,14 +2985,83 @@ void LLVOAvatar::slamPosition()
mRoot->updateWorldMatrixChildren();
}
-bool LLVOAvatar::isVisuallyMuted() const
+bool LLVOAvatar::isVisuallyMuted()
{
- static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit");
- static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit");
-
- return LLMuteList::getInstance()->isMuted(getID())
- || (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0)
- || (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f);
+ bool muted = false;
+
+ // Priority order (highest priority first)
+ // * own avatar is never visually muted
+ // * if on the "always draw normally" list, draw them normally
+ // * if on the "always visually mute" list, mute them
+ // * draw them normally if they meet the following criteria:
+ // - within the closest N avatars OR on friends list OR in an IM chat
+ // - AND aren't over the thresholds
+ // * otherwise visually mute all other avatars
+
+ if (!isSelf())
+ {
+ static LLCachedControl<F32> render_mute_threshold(gSavedSettings, "RenderAutoMuteThreshold");
+ static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit");
+ static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit");
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderCostLimit");
+
+ if (mVisuallyMuteSetting == ALWAYS_VISUAL_MUTE)
+ { // Always want to see this AV as an imposter
+ muted = true;
+ }
+ else if (mVisuallyMuteSetting == NEVER_VISUAL_MUTE)
+ { // Never show as imposter
+ muted = false;
+ }
+ else if (LLVOAvatar::sLODFactor <= render_mute_threshold)
+ {
+ F64 now = LLFrameTimer::getTotalSeconds();
+
+ if (now < mCachedVisualMuteUpdateTime)
+ { // Use cached mute value
+ muted = mCachedVisualMute;
+ }
+ else
+ { // Determine if visually muted or not
+
+ U32 max_cost = (U32) (max_render_cost*(LLVOAvatar::sLODFactor+0.5));
+
+ muted = LLMuteList::getInstance()->isMuted(getID()) ||
+ (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
+ (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
+ (mVisualComplexity > max_cost && max_render_cost > 0);
+
+ // Could be part of the grand || collection above, but yanked out to make the logic visible
+ if (!muted)
+ {
+ if (sMaxVisible > 0)
+ { // They are above the visibilty rank - mute them
+ muted = (mVisibilityRank > sMaxVisible);
+ }
+
+ /* Not used - always draw friends or those in IMs. Works nicely, needs UI?
+ if (muted || // Don't mute friends or IMs
+ sMaxVisible == 0)
+ {
+ muted = !(LLAvatarTracker::instance().isBuddy(getID()));
+ if (muted)
+ { // Not a friend, so they are muted ... are they in an IM?
+ LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,getID());
+ muted = !gIMMgr->hasSession(session_id);
+ }
+ }
+ */
+ }
+
+ // Save visual mute state and set interval for updating
+ const F64 SECONDS_BETWEEN_RENDER_AUTO_MUTE_UPDATES = 1.5;
+ mCachedVisualMuteUpdateTime = now + SECONDS_BETWEEN_RENDER_AUTO_MUTE_UPDATES;
+ mCachedVisualMute = muted;
+ }
+ }
+ }
+
+ return muted;
}
//------------------------------------------------------------------------
@@ -3077,7 +3159,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// the rest should only be done occasionally for far away avatars
//--------------------------------------------------------------------
- if (visible && (!isSelf() || isVisuallyMuted()) && !mIsDummy && sUseImpostors && !mNeedsAnimUpdate && !sFreezeCounter)
+ bool visually_muted = isVisuallyMuted();
+ if (visible && (!isSelf() || visually_muted) && !mIsDummy && sUseImpostors && !mNeedsAnimUpdate && !sFreezeCounter)
{
const LLVector4a* ext = mDrawable->getSpatialExtents();
LLVector4a size;
@@ -3086,8 +3169,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
F32 impostor_area = 256.f*512.f*(8.125f - LLVOAvatar::sLODFactor*8.f);
- if (isVisuallyMuted())
- { // muted avatars update at 16 hz
+ if (visually_muted)
+ { // visually muted avatars update at 16 hz
mUpdatePeriod = 16;
}
else if (mVisibilityRank <= LLVOAvatar::sMaxVisible ||
@@ -3887,9 +3970,11 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
BOOL first_pass = TRUE;
if (!LLDrawPoolAvatar::sSkipOpaque)
{
+ bool visually_muted = isVisuallyMuted();
+
if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender)
{
- if (isTextureVisible(TEX_HEAD_BAKED) || mIsDummy)
+ if (isTextureVisible(TEX_HEAD_BAKED) || mIsDummy || visually_muted)
{
LLViewerJoint* head_mesh = getViewerJoint(MESH_ID_HEAD);
if (head_mesh)
@@ -3899,7 +3984,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
first_pass = FALSE;
}
}
- if (isTextureVisible(TEX_UPPER_BAKED) || mIsDummy)
+ if (isTextureVisible(TEX_UPPER_BAKED) || mIsDummy || visually_muted)
{
LLViewerJoint* upper_mesh = getViewerJoint(MESH_ID_UPPER_BODY);
if (upper_mesh)
@@ -3909,7 +3994,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
first_pass = FALSE;
}
- if (isTextureVisible(TEX_LOWER_BAKED) || mIsDummy)
+ if (isTextureVisible(TEX_LOWER_BAKED) || mIsDummy || visually_muted)
{
LLViewerJoint* lower_mesh = getViewerJoint(MESH_ID_LOWER_BODY);
if (lower_mesh)
@@ -5481,6 +5566,8 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
return 0;
}
+ mVisualComplexityStale = TRUE;
+
if (viewer_object->isSelected())
{
LLSelectMgr::getInstance()->updateSelectionCenter();
@@ -5628,6 +5715,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
if (attachment->isObjectAttached(viewer_object))
{
+ mVisualComplexityStale = TRUE;
cleanupAttachedMesh( viewer_object );
attachment->removeObject(viewer_object);
lldebugs << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << llendl;
@@ -7734,9 +7822,9 @@ void LLVOAvatar::updateImpostors()
LLCharacter::sAllowInstancesChange = TRUE ;
}
-BOOL LLVOAvatar::isImpostor() const
+BOOL LLVOAvatar::isImpostor()
{
- return (isVisuallyMuted() || (sUseImpostors && mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
+ return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
}
@@ -7779,135 +7867,182 @@ void LLVOAvatar::getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& d
angle.mV[2] = da;
}
+
void LLVOAvatar::idleUpdateRenderCost()
{
- static const U32 ARC_BODY_PART_COST = 200;
- static const U32 ARC_LIMIT = 20000;
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderCostLimit");
- static std::set<LLUUID> all_textures;
+ static const U32 ARC_LIMIT = 20000;
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_ATTACHMENT_BYTES))
{ //set debug text to attachment geometry bytes here so render cost will override
setDebugText(llformat("%.1f KB, %.2f m^2", mAttachmentGeometryBytes/1024.f, mAttachmentSurfaceArea));
}
- if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME))
+ if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME) && max_render_cost == 0)
{
return;
}
- U32 cost = 0;
- LLVOVolume::texture_cost_t textures;
+ calculateUpdateRenderCost(); // Update mVisualComplexity if needed
+
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME))
+ {
+ std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
+ setDebugText(llformat("%s %d", viz_string.c_str(), mVisualComplexity));
+ F32 green = 1.f-llclamp(((F32) mVisualComplexity-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f);
+ F32 red = llmin((F32) mVisualComplexity/(F32)ARC_LIMIT, 1.f);
+ mText->setColor(LLColor4(red,green,0,1));
+ }
+}
- for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
+
+// Calculations for mVisualComplexity value
+void LLVOAvatar::calculateUpdateRenderCost()
+{
+ static const U32 ARC_BODY_PART_COST = 200;
+
+ // Diagnostic list of all textures on our avatar
+ static std::set<LLUUID> all_textures;
+
+ if (mVisualComplexityStale)
{
- const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = LLAvatarAppearanceDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index);
- ETextureIndex tex_index = baked_dict->mTextureIndex;
- if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(LLWearableType::WT_SKIRT)))
+ mVisualComplexityStale = FALSE;
+ U32 cost = 0;
+ LLVOVolume::texture_cost_t textures;
+
+ for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
- if (isTextureVisible(tex_index))
+ const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = LLAvatarAppearanceDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index);
+ ETextureIndex tex_index = baked_dict->mTextureIndex;
+ if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(LLWearableType::WT_SKIRT)))
{
- cost +=ARC_BODY_PART_COST;
+ if (isTextureVisible(tex_index))
+ {
+ cost +=ARC_BODY_PART_COST;
+ }
}
}
- }
- for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end();
- ++iter)
- {
- LLViewerJointAttachment* attachment = iter->second;
- for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
- attachment_iter != attachment->mAttachedObjects.end();
- ++attachment_iter)
+ for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- const LLViewerObject* attached_object = (*attachment_iter);
- if (attached_object && !attached_object->isHUDAttachment())
+ LLViewerJointAttachment* attachment = iter->second;
+ for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+ attachment_iter != attachment->mAttachedObjects.end();
+ ++attachment_iter)
{
- textures.clear();
- const LLDrawable* drawable = attached_object->mDrawable;
- if (drawable)
+ const LLViewerObject* attached_object = (*attachment_iter);
+ if (attached_object && !attached_object->isHUDAttachment())
{
- const LLVOVolume* volume = drawable->getVOVolume();
- if (volume)
+ textures.clear();
+ const LLDrawable* drawable = attached_object->mDrawable;
+ if (drawable)
{
- cost += volume->getRenderCost(textures);
-
- const_child_list_t children = volume->getChildren();
- for (const_child_list_t::const_iterator child_iter = children.begin();
- child_iter != children.end();
- ++child_iter)
+ const LLVOVolume* volume = drawable->getVOVolume();
+ if (volume)
{
- LLViewerObject* child_obj = *child_iter;
- LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
- if (child)
+ cost += volume->getRenderCost(textures);
+
+ const_child_list_t children = volume->getChildren();
+ for (const_child_list_t::const_iterator child_iter = children.begin();
+ child_iter != children.end();
+ ++child_iter)
{
- cost += child->getRenderCost(textures);
+ LLViewerObject* child_obj = *child_iter;
+ LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
+ if (child)
+ {
+ cost += child->getRenderCost(textures);
+ }
}
- }
- for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
- {
- // add the cost of each individual texture in the linkset
- cost += iter->second;
+ for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ {
+ // add the cost of each individual texture in the linkset
+ cost += iter->second;
+ }
}
}
}
}
- }
-
- }
-
+ }
- // Diagnostic output to identify all avatar-related textures.
- // Does not affect rendering cost calculation.
- // Could be wrapped in a debug option if output becomes problematic.
- if (isSelf())
- {
- // print any attachment textures we didn't already know about.
- for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it)
+ // Diagnostic output to identify all avatar-related textures.
+ // Does not affect rendering cost calculation.
+ // Could be wrapped in a debug option if output becomes problematic.
+ if (isSelf())
{
- LLUUID image_id = it->first;
- if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
- continue;
- if (all_textures.find(image_id) == all_textures.end())
+ // print any attachment textures we didn't already know about.
+ for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it)
{
- // attachment texture not previously seen.
- llinfos << "attachment_texture: " << image_id.asString() << llendl;
- all_textures.insert(image_id);
+ LLUUID image_id = it->first;
+ if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
+ continue;
+ if (all_textures.find(image_id) == all_textures.end())
+ {
+ // attachment texture not previously seen.
+ llinfos << "attachment_texture: " << image_id.asString() << llendl;
+ all_textures.insert(image_id);
+ }
}
- }
- // print any avatar textures we didn't already know about
- for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getTextures().begin();
+ // print any avatar textures we didn't already know about
+ for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getTextures().begin();
iter != LLAvatarAppearanceDictionary::getInstance()->getTextures().end();
- ++iter)
- {
- const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = iter->second;
- // TODO: MULTI-WEARABLE: handle multiple textures for self
- const LLViewerTexture* te_image = getImage(iter->first,0);
- if (!te_image)
- continue;
- LLUUID image_id = te_image->getID();
- if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
- continue;
- if (all_textures.find(image_id) == all_textures.end())
+ ++iter)
{
- llinfos << "local_texture: " << texture_dict->mName << ": " << image_id << llendl;
- all_textures.insert(image_id);
+ const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = iter->second;
+ // TODO: MULTI-WEARABLE: handle multiple textures for self
+ const LLViewerTexture* te_image = getImage(iter->first,0);
+ if (!te_image)
+ continue;
+ LLUUID image_id = te_image->getID();
+ if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
+ continue;
+ if (all_textures.find(image_id) == all_textures.end())
+ {
+ llinfos << "local_texture: " << texture_dict->mName << ": " << image_id << llendl;
+ all_textures.insert(image_id);
+ }
}
}
+
+ mVisualComplexity = cost;
}
+}
-
- std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
- setDebugText(llformat("%s %d", viz_string.c_str(), cost));
- mVisualComplexity = cost;
- F32 green = 1.f-llclamp(((F32) cost-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f);
- F32 red = llmin((F32) cost/(F32)ARC_LIMIT, 1.f);
- mText->setColor(LLColor4(red,green,0,1));
+
+// static
+LLColor4 LLVOAvatar::calcMutedAVColor(F32 value, S32 range_low, S32 range_high)
+{
+ F32 clamped_value = llmin(value, (F32) range_high);
+ clamped_value = llmax(value, (F32) range_low);
+ F32 spectrum = (clamped_value / range_high); // spectrum is between 0 and 1.f
+
+ // Array of colors. These are arranged so only one RGB color changes between each step,
+ // and it loops back to red so there is an even distribution. It is not a heat map
+ const S32 NUM_SPECTRUM_COLORS = 7;
+ static LLColor4 * spectrum_color[NUM_SPECTRUM_COLORS] = { &LLColor4::red, &LLColor4::magenta, &LLColor4::blue, &LLColor4::cyan, &LLColor4::green, &LLColor4::yellow, &LLColor4::red };
+
+ spectrum = spectrum * (NUM_SPECTRUM_COLORS - 1); // Scale to range of number of colors
+ S32 spectrum_index_1 = floor(spectrum); // Desired color will be after this index
+ S32 spectrum_index_2 = spectrum_index_1 + 1; // and before this index (inclusive)
+ F32 fractBetween = spectrum - (F32)(spectrum_index_1); // distance between the two indexes (0-1)
+
+ LLColor4 new_color = lerp(*spectrum_color[spectrum_index_1], *spectrum_color[spectrum_index_2], fractBetween);
+ new_color.normalize();
+ new_color *= 0.9f;
+
+ //llinfos << "From value " << std::setprecision(3) << value << " returning color " << new_color
+ // << " using indexes " << spectrum_index_1 << ", " << spectrum_index_2
+ // << " and fractBetween " << fractBetween
+ // << llendl;
+
+ return new_color;
}
// static
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index b05eed344b..be2d69a41a 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -250,6 +250,24 @@ public:
static void invalidateNameTags();
void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
void idleUpdateRenderCost();
+ void calculateUpdateRenderCost();
+ void updateVisualComplexity() { mVisualComplexityStale = TRUE; }
+
+ S32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
+ S32 getAttachmentGeometryBytes() { return mAttachmentGeometryBytes; }; // number of bytes in attached geometry
+ F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; // estimated surface area of attachments
+
+ S32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
+ void setReportedVisualComplexity(S32 value) { mReportedVisualComplexity = value; };
+ S32 getReportedAttachmentGeometryBytes() { return mReportedAttachmentGeometryBytes; }; //number of bytes in attached geometry
+ void setReportedAttachmentGeometryBytes(S32 value) { mReportedAttachmentGeometryBytes = value; };
+ F32 getReportedAttachmentSurfaceArea() { return mReportedAttachmentSurfaceArea; }; //estimated surface area of attachments
+ void setReportedAttachmentSurfaceArea(F32 value) { mReportedAttachmentSurfaceArea = value; };
+
+ S32 getUpdatePeriod() { return mUpdatePeriod; };
+ const LLColor4 & getMutedAVColor() { return mMutedAVColor; };
+
+
void idleUpdateBelowWater();
//--------------------------------------------------------------------
@@ -303,12 +321,15 @@ public:
static void logPendingPhasesAllAvatars();
void logMetricsTimerRecord(const std::string& phase_name, F32 elapsed, bool completed);
+ static LLColor4 calcMutedAVColor(F32 value, S32 range_low, S32 range_high);
+
protected:
LLViewerStats::PhaseMap& getPhases() { return mPhases; }
BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
void updateRuthTimer(bool loading);
F32 calcMorphAmount();
+
private:
BOOL mFirstFullyVisible;
BOOL mFullyLoaded;
@@ -316,6 +337,8 @@ private:
BOOL mFullyLoadedInitialized;
S32 mFullyLoadedFrameCounter;
S32 mVisualComplexity;
+ BOOL mVisualComplexityStale;
+ LLColor4 mMutedAVColor;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
@@ -369,7 +392,16 @@ public:
public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
- bool isVisuallyMuted() const;
+ bool isVisuallyMuted();
+
+ enum VisualMuteSettings
+ {
+ VISUAL_MUTE_NOT_SET = 0,
+ ALWAYS_VISUAL_MUTE = 1,
+ NEVER_VISUAL_MUTE = 2
+ };
+ void setVisualMuteSettings(VisualMuteSettings set) { mVisuallyMuteSetting = set; };
+ VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
U32 renderRigid();
U32 renderSkinned(EAvatarRenderPass pass);
@@ -380,9 +412,13 @@ public:
static void destroyGL();
static void restoreGL();
S32 mSpecialRenderMode; // special lighting
- U32 mAttachmentGeometryBytes; //number of bytes in attached geometry
+ S32 mAttachmentGeometryBytes; //number of bytes in attached geometry
F32 mAttachmentSurfaceArea; //estimated surface area of attachments
+ S32 mReportedVisualComplexity; // Numbers as reported by the SL server
+ S32 mReportedAttachmentGeometryBytes; //number of bytes in attached geometry
+ F32 mReportedAttachmentSurfaceArea; //estimated surface area of attachments
+
private:
bool shouldAlphaMask();
@@ -392,6 +428,11 @@ private:
S32 mUpdatePeriod;
S32 mNumInitFaces; //number of faces generated when creating the avatar drawable, does not inculde splitted faces due to long vertex buffer.
+ bool mCachedVisualMute; // cached return value for isVisuallyMuted()
+ F64 mCachedVisualMuteUpdateTime; // Time to update mCachedVisualMute
+
+ VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
+
//--------------------------------------------------------------------
// Morph masks
//--------------------------------------------------------------------
@@ -430,7 +471,7 @@ private:
// Impostors
//--------------------------------------------------------------------
public:
- BOOL isImpostor() const;
+ BOOL isImpostor();
BOOL needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;
const LLVector2& getImpostorDim() const;
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index cab5c4bc1d..591d5cae0b 100755
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -476,6 +476,7 @@ void LLVOGrass::getGeometry(S32 idx,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
+ LLStrider<LLColor4U>& emissivep,
LLStrider<U16>& indicesp)
{
if(!mNumBlades)//stop rendering grass
@@ -708,7 +709,11 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
facep->setIndicesIndex(index_count);
facep->setVertexBuffer(buffer);
facep->setPoolType(LLDrawPool::POOL_ALPHA);
- object->getGeometry(facep->getTEOffset(), verticesp, normalsp, texcoordsp, colorsp, indicesp);
+
+ //dummy parameter (unused by this implementation)
+ LLStrider<LLColor4U> emissivep;
+
+ object->getGeometry(facep->getTEOffset(), verticesp, normalsp, texcoordsp, colorsp, emissivep, indicesp);
vertex_count += facep->getGeomCount();
index_count += facep->getIndicesCount();
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index 122806766d..e54de85412 100755
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -63,6 +63,7 @@ public:
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
+ LLStrider<LLColor4U>& emissivep,
LLStrider<U16>& indicesp);
void updateFaceSize(S32 idx) { }
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 9b5d981aa5..abead02174 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -532,25 +532,25 @@ void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries)
{
LLViewerRegion *region = gAgent.getRegion();
- if ( region && (mVoiceEnabled || !mIsInitialized))
+ // If we've not received the capability yet, return.
+ // the password will remain empty, so we'll remain in
+ // stateIdle
+ if ( region &&
+ region->capabilitiesReceived() &&
+ (mVoiceEnabled || !mIsInitialized))
{
std::string url =
region->getCapability("ProvisionVoiceAccountRequest");
- if ( url.empty() )
+ if ( !url.empty() )
{
- // we've not received the capability yet, so return.
- // the password will remain empty, so we'll remain in
- // stateIdle
- return;
- }
-
- LLHTTPClient::post(
- url,
- LLSD(),
- new LLVivoxVoiceAccountProvisionResponder(retries));
+ LLHTTPClient::post(
+ url,
+ LLSD(),
+ new LLVivoxVoiceAccountProvisionResponder(retries));
- setState(stateConnectorStart);
+ setState(stateConnectorStart);
+ }
}
}
@@ -7660,6 +7660,9 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
*/
// We don't need to process this, but we also shouldn't warn on it, since that confuses people.
}
+ else if (!stricmp(eventTypeCstr, "VoiceServiceConnectionStateChangedEvent"))
+ { // Yet another ignored event
+ }
else
{
LL_WARNS("VivoxProtocolParser") << "Unknown event type " << eventTypeString << LL_ENDL;
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 43a5ddba42..a65de0c047 100755
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -49,17 +49,11 @@ const F32 MAX_PART_LIFETIME = 120.f;
extern U64 gFrameTime;
LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL;
-S32 LLVOPartGroup::sVBSlotFree[];
-S32* LLVOPartGroup::sVBSlotCursor = NULL;
+S32 LLVOPartGroup::sVBSlotCursor = 0;
void LLVOPartGroup::initClass()
{
- for (S32 i = 0; i < LL_MAX_PARTICLE_COUNT; ++i)
- {
- sVBSlotFree[i] = i;
- }
-
- sVBSlotCursor = sVBSlotFree;
+
}
//static
@@ -124,36 +118,33 @@ void LLVOPartGroup::destroyGL()
//static
S32 LLVOPartGroup::findAvailableVBSlot()
{
- if (sVBSlotCursor >= sVBSlotFree+LL_MAX_PARTICLE_COUNT)
+ if (sVBSlotCursor >= LL_MAX_PARTICLE_COUNT)
{ //no more available slots
return -1;
}
- S32 ret = *sVBSlotCursor;
- sVBSlotCursor++;
-
- return ret;
+ return sVBSlotCursor++;
}
bool ll_is_part_idx_allocated(S32 idx, S32* start, S32* end)
{
- while (start < end)
+ /*while (start < end)
{
if (*start == idx)
{ //not allocated (in free list)
return false;
}
++start;
- }
+ }*/
//allocated (not in free list)
- return true;
+ return false;
}
//static
void LLVOPartGroup::freeVBSlot(S32 idx)
{
- llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0);
+ /*llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0);
//llassert(sVBSlotCursor > sVBSlotFree);
//llassert(ll_is_part_idx_allocated(idx, sVBSlotCursor, sVBSlotFree+LL_MAX_PARTICLE_COUNT));
@@ -161,7 +152,7 @@ void LLVOPartGroup::freeVBSlot(S32 idx)
{
sVBSlotCursor--;
*sVBSlotCursor = idx;
- }
+ }*/
}
LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
@@ -191,10 +182,17 @@ F32 LLVOPartGroup::getBinRadius()
void LLVOPartGroup::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
{
const LLVector3& pos_agent = getPositionAgent();
+
newMin.load3( (pos_agent - mScale).mV);
newMax.load3( (pos_agent + mScale).mV);
+
+ llassert(newMin.isFinite3());
+ llassert(newMax.isFinite3());
+
LLVector4a pos;
pos.load3(pos_agent.mV);
+
+ llassert(pos.isFinite3());
mDrawable->setPositionGroup(pos);
}
@@ -234,6 +232,37 @@ LLDrawable* LLVOPartGroup::createDrawable(LLPipeline *pipeline)
const F32 MAX_PARTICLE_AREA_SCALE = 0.02f; // some tuned constant, limits on how much particle area to draw
+ LLUUID LLVOPartGroup::getPartOwner(S32 idx)
+ {
+ LLUUID ret = LLUUID::null;
+
+ if (idx < (S32) mViewerPartGroupp->mParticles.size())
+ {
+ ret = mViewerPartGroupp->mParticles[idx]->mPartSourcep->getOwnerUUID();
+ }
+
+ return ret;
+ }
+
+ LLUUID LLVOPartGroup::getPartSource(S32 idx)
+ {
+ LLUUID ret = LLUUID::null;
+
+ if (idx < (S32) mViewerPartGroupp->mParticles.size())
+ {
+ LLViewerPart* part = mViewerPartGroupp->mParticles[idx];
+ if (part && part->mPartSourcep.notNull() &&
+ part->mPartSourcep->mSourceObjectp.notNull())
+ {
+ LLViewerObject* source = part->mPartSourcep->mSourceObjectp;
+ ret = source->getID();
+ }
+ }
+
+ return ret;
+ }
+
+
F32 LLVOPartGroup::getPartSize(S32 idx)
{
if (idx < (S32) mViewerPartGroupp->mParticles.size())
@@ -244,6 +273,20 @@ F32 LLVOPartGroup::getPartSize(S32 idx)
return 0.f;
}
+void LLVOPartGroup::getBlendFunc(S32 idx, U32& src, U32& dst)
+{
+ if (idx < (S32) mViewerPartGroupp->mParticles.size())
+ {
+ LLViewerPart* part = mViewerPartGroupp->mParticles[idx];
+ src = part->mBlendFuncSource;
+ dst = part->mBlendFuncDest;
+ }
+ else
+ {
+ llerrs << "WTF?" << llendl;
+ }
+}
+
LLVector3 LLVOPartGroup::getCameraPosition() const
{
return gAgentCamera.getCameraPositionAgent();
@@ -303,19 +346,52 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
mDepth = 0.f;
S32 i = 0 ;
LLVector3 camera_agent = getCameraPosition();
+
+ F32 max_scale = 0.f;
+
+
for (i = 0 ; i < (S32)mViewerPartGroupp->mParticles.size(); i++)
{
const LLViewerPart *part = mViewerPartGroupp->mParticles[i];
+
+ //remember the largest particle
+ max_scale = llmax(max_scale, part->mScale.mV[0], part->mScale.mV[1]);
+
+ if (part->mFlags & LLPartData::LL_PART_RIBBON_MASK)
+ { //include ribbon segment length in scale
+ const LLVector3* pos_agent = NULL;
+ if (part->mParent)
+ {
+ pos_agent = &(part->mParent->mPosAgent);
+ }
+ else if (part->mPartSourcep.notNull())
+ {
+ pos_agent = &(part->mPartSourcep->mPosAgent);
+ }
+
+ if (pos_agent)
+ {
+ F32 dist = (*pos_agent-part->mPosAgent).length();
+
+ max_scale = llmax(max_scale, dist);
+ }
+ }
+
LLVector3 part_pos_agent(part->mPosAgent);
LLVector3 at(part_pos_agent - camera_agent);
+
F32 camera_dist_squared = at.lengthSquared();
F32 inv_camera_dist_squared;
if (camera_dist_squared > 1.f)
inv_camera_dist_squared = 1.f / camera_dist_squared;
else
inv_camera_dist_squared = 1.f;
+
+ llassert(llfinite(inv_camera_dist_squared));
+ llassert(!llisnan(inv_camera_dist_squared));
+
F32 area = part->mScale.mV[0] * part->mScale.mV[1] * inv_camera_dist_squared;
tot_area = llmax(tot_area, area);
@@ -382,104 +458,257 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
facep->setSize(0, 0);
}
+ //record max scale (used to stretch bounding box for visibility culling)
+ mScale.set(max_scale, max_scale, max_scale);
+
mDrawable->movePartition();
LLPipeline::sCompiles++;
return TRUE;
}
+
+BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ S32 face,
+ BOOL pick_transparent,
+ S32* face_hit,
+ LLVector4a* intersection,
+ LLVector2* tex_coord,
+ LLVector4a* normal,
+ LLVector4a* bi_normal)
+{
+ LLVector4a dir;
+ dir.setSub(end, start);
+
+ F32 closest_t = 2.f;
+ BOOL ret = FALSE;
+
+ for (U32 idx = 0; idx < mViewerPartGroupp->mParticles.size(); ++idx)
+ {
+ const LLViewerPart &part = *((LLViewerPart*) (mViewerPartGroupp->mParticles[idx]));
+
+ LLVector4a v[4];
+ LLStrider<LLVector4a> verticesp;
+ verticesp = v;
+
+ getGeometry(part, verticesp);
+
+ F32 a,b,t;
+ if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a,b,t) ||
+ LLTriangleRayIntersect(v[1], v[3], v[2], start, dir, a,b,t))
+ {
+ if (t >= 0.f &&
+ t <= 1.f &&
+ t < closest_t)
+ {
+ ret = TRUE;
+ closest_t = t;
+ if (face_hit)
+ {
+ *face_hit = idx;
+ }
+
+ if (intersection)
+ {
+ LLVector4a intersect = dir;
+ intersect.mul(closest_t);
+ intersection->setAdd(intersect, start);
+ }
+ }
+ }
+ }
+
+ return ret;
+}
+
+void LLVOPartGroup::getGeometry(const LLViewerPart& part,
+ LLStrider<LLVector4a>& verticesp)
+{
+ if (part.mFlags & LLPartData::LL_PART_RIBBON_MASK)
+ {
+ LLVector4a axis, pos, paxis, ppos;
+ F32 scale, pscale;
+
+ pos.load3(part.mPosAgent.mV);
+ axis.load3(part.mAxis.mV);
+ scale = part.mScale.mV[0];
+
+ if (part.mParent)
+ {
+ ppos.load3(part.mParent->mPosAgent.mV);
+ paxis.load3(part.mParent->mAxis.mV);
+ pscale = part.mParent->mScale.mV[0];
+ }
+ else
+ { //use source object as position
+
+ if (part.mPartSourcep->mSourceObjectp.notNull())
+ {
+ LLVector3 v = LLVector3(0,0,1);
+ v *= part.mPartSourcep->mSourceObjectp->getRenderRotation();
+ paxis.load3(v.mV);
+ ppos.load3(part.mPartSourcep->mPosAgent.mV);
+ pscale = part.mStartScale.mV[0];
+ }
+ else
+ { //no source object, no parent, nothing to draw
+ ppos = pos;
+ pscale = scale;
+ paxis = axis;
+ }
+ }
+
+ LLVector4a p0, p1, p2, p3;
+
+ scale *= 0.5f;
+ pscale *= 0.5f;
+
+ axis.mul(scale);
+ paxis.mul(pscale);
+
+ p0.setAdd(pos, axis);
+ p1.setSub(pos,axis);
+ p2.setAdd(ppos, paxis);
+ p3.setSub(ppos, paxis);
+
+ (*verticesp++) = p2;
+ (*verticesp++) = p3;
+ (*verticesp++) = p0;
+ (*verticesp++) = p1;
+ }
+ else
+ {
+ LLVector4a part_pos_agent;
+ part_pos_agent.load3(part.mPosAgent.mV);
+ LLVector4a camera_agent;
+ camera_agent.load3(getCameraPosition().mV);
+ LLVector4a at;
+ at.setSub(part_pos_agent, camera_agent);
+ LLVector4a up(0, 0, 1);
+ LLVector4a right;
+
+ right.setCross3(at, up);
+ right.normalize3fast();
+
+ up.setCross3(right, at);
+ up.normalize3fast();
+
+ if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)
+ {
+ LLVector4a normvel;
+ normvel.load3(part.mVelocity.mV);
+ normvel.normalize3fast();
+ LLVector2 up_fracs;
+ up_fracs.mV[0] = normvel.dot3(right).getF32();
+ up_fracs.mV[1] = normvel.dot3(up).getF32();
+ up_fracs.normalize();
+ LLVector4a new_up;
+ LLVector4a new_right;
+
+ //new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
+ LLVector4a t = right;
+ t.mul(up_fracs.mV[0]);
+ new_up = up;
+ new_up.mul(up_fracs.mV[1]);
+ new_up.add(t);
+
+ //new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
+ t = right;
+ t.mul(up_fracs.mV[1]);
+ new_right = up;
+ new_right.mul(up_fracs.mV[0]);
+ t.sub(new_right);
+
+ up = new_up;
+ right = t;
+ up.normalize3fast();
+ right.normalize3fast();
+ }
+
+ right.mul(0.5f*part.mScale.mV[0]);
+ up.mul(0.5f*part.mScale.mV[1]);
+
+
+ //HACK -- the verticesp->mV[3] = 0.f here are to set the texture index to 0 (particles don't use texture batching, maybe they should)
+ // this works because there is actually a 4th float stored after the vertex position which is used as a texture index
+ // also, somebody please VECTORIZE THIS
+
+ LLVector4a ppapu;
+ LLVector4a ppamu;
+
+ ppapu.setAdd(part_pos_agent, up);
+ ppamu.setSub(part_pos_agent, up);
+
+ verticesp->setSub(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setSub(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ }
+}
+
+
+
void LLVOPartGroup::getGeometry(S32 idx,
LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
+ LLStrider<LLColor4U>& emissivep,
LLStrider<U16>& indicesp)
{
if (idx >= (S32) mViewerPartGroupp->mParticles.size())
{
return;
}
-
+
const LLViewerPart &part = *((LLViewerPart*) (mViewerPartGroupp->mParticles[idx]));
- LLVector4a part_pos_agent;
- part_pos_agent.load3(part.mPosAgent.mV);
- LLVector4a camera_agent;
- camera_agent.load3(getCameraPosition().mV);
- LLVector4a at;
- at.setSub(part_pos_agent, camera_agent);
- LLVector4a up(0, 0, 1);
- LLVector4a right;
+ getGeometry(part, verticesp);
- right.setCross3(at, up);
- right.normalize3fast();
+ LLColor4U pcolor;
+ LLColor4U color = part.mColor;
- up.setCross3(right, at);
- up.normalize3fast();
+ LLColor4U pglow;
- if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)
+ if (part.mFlags & LLPartData::LL_PART_RIBBON_MASK)
+ { //make sure color blends properly
+ if (part.mParent)
+ {
+ pglow = part.mParent->mGlow;
+ pcolor = part.mParent->mColor;
+ }
+ else
+ {
+ pglow = LLColor4U(0, 0, 0, (U8) llround(255.f*part.mStartGlow));
+ pcolor = part.mStartColor;
+ }
+ }
+ else
{
- LLVector4a normvel;
- normvel.load3(part.mVelocity.mV);
- normvel.normalize3fast();
- LLVector2 up_fracs;
- up_fracs.mV[0] = normvel.dot3(right).getF32();
- up_fracs.mV[1] = normvel.dot3(up).getF32();
- up_fracs.normalize();
- LLVector4a new_up;
- LLVector4a new_right;
-
- //new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
- LLVector4a t = right;
- t.mul(up_fracs.mV[0]);
- new_up = up;
- new_up.mul(up_fracs.mV[1]);
- new_up.add(t);
-
- //new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
- t = right;
- t.mul(up_fracs.mV[1]);
- new_right = up;
- new_right.mul(up_fracs.mV[0]);
- t.sub(new_right);
-
- up = new_up;
- right = t;
- up.normalize3fast();
- right.normalize3fast();
+ pglow = part.mGlow;
+ pcolor = color;
}
- right.mul(0.5f*part.mScale.mV[0]);
- up.mul(0.5f*part.mScale.mV[1]);
-
-
- LLVector3 normal = -LLViewerCamera::getInstance()->getXAxis();
-
- //HACK -- the verticesp->mV[3] = 0.f here are to set the texture index to 0 (particles don't use texture batching, maybe they should)
- // this works because there is actually a 4th float stored after the vertex position which is used as a texture index
- // also, somebody please VECTORIZE THIS
-
- LLVector4a ppapu;
- LLVector4a ppamu;
-
- ppapu.setAdd(part_pos_agent, up);
- ppamu.setSub(part_pos_agent, up);
-
- verticesp->setSub(ppapu, right);
- (*verticesp++).getF32ptr()[3] = 0.f;
- verticesp->setSub(ppamu, right);
- (*verticesp++).getF32ptr()[3] = 0.f;
- verticesp->setAdd(ppapu, right);
- (*verticesp++).getF32ptr()[3] = 0.f;
- verticesp->setAdd(ppamu, right);
- (*verticesp++).getF32ptr()[3] = 0.f;
+ *colorsp++ = pcolor;
+ *colorsp++ = pcolor;
+ *colorsp++ = color;
+ *colorsp++ = color;
+
+ //if (pglow.mV[3] || part.mGlow.mV[3])
+ { //only write glow if it is not zero
+ *emissivep++ = pglow;
+ *emissivep++ = pglow;
+ *emissivep++ = part.mGlow;
+ *emissivep++ = part.mGlow;
+ }
- *colorsp++ = part.mColor;
- *colorsp++ = part.mColor;
- *colorsp++ = part.mColor;
- *colorsp++ = part.mColor;
if (!(part.mFlags & LLPartData::LL_PART_EMISSIVE_MASK))
{ //not fullbright, needs normal
+ LLVector3 normal = -LLViewerCamera::getInstance()->getXAxis();
*normalsp++ = normal;
*normalsp++ = normal;
*normalsp++ = normal;
@@ -618,10 +847,13 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLStrider<LLVector3> normalsp;
LLStrider<LLVector2> texcoordsp;
LLStrider<LLColor4U> colorsp;
+ LLStrider<LLColor4U> emissivep;
buffer->getVertexStrider(verticesp);
buffer->getNormalStrider(normalsp);
buffer->getColorStrider(colorsp);
+ buffer->getEmissiveStrider(emissivep);
+
LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[mRenderPass];
@@ -630,7 +862,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLFace* facep = *i;
LLAlphaObject* object = (LLAlphaObject*) facep->getViewerObject();
- if (!facep->isState(LLFace::PARTICLE))
+ //if (!facep->isState(LLFace::PARTICLE))
{ //set the indices of this face
S32 idx = LLVOPartGroup::findAvailableVBSlot();
if (idx >= 0)
@@ -639,7 +871,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
facep->setIndicesIndex(idx*6);
facep->setVertexBuffer(LLVOPartGroup::sVB);
facep->setPoolType(LLDrawPool::POOL_ALPHA);
- facep->setState(LLFace::PARTICLE);
+ //facep->setState(LLFace::PARTICLE);
}
else
{
@@ -654,9 +886,19 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLStrider<LLVector3> cur_norm = normalsp + geom_idx;
LLStrider<LLVector2> cur_tc = texcoordsp + geom_idx;
LLStrider<LLColor4U> cur_col = colorsp + geom_idx;
+ LLStrider<LLColor4U> cur_glow = emissivep + geom_idx;
+
+ LLColor4U* start_glow = cur_glow.get();
- object->getGeometry(facep->getTEOffset(), cur_vert, cur_norm, cur_tc, cur_col, cur_idx);
+ object->getGeometry(facep->getTEOffset(), cur_vert, cur_norm, cur_tc, cur_col, cur_glow, cur_idx);
+ BOOL has_glow = FALSE;
+
+ if (cur_glow.get() != start_glow)
+ {
+ has_glow = TRUE;
+ }
+
llassert(facep->getGeomCount() == 4);
llassert(facep->getIndicesCount() == 6);
@@ -671,24 +913,37 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
bool batched = false;
- if (idx >= 0 &&
- draw_vec[idx]->mTexture == facep->getTexture() &&
- draw_vec[idx]->mFullbright == fullbright)
+ U32 bf_src = LLRender::BF_SOURCE_ALPHA;
+ U32 bf_dst = LLRender::BF_ONE_MINUS_SOURCE_ALPHA;
+
+ object->getBlendFunc(facep->getTEOffset(), bf_src, bf_dst);
+
+
+ if (idx >= 0)
{
- if (draw_vec[idx]->mEnd == facep->getGeomIndex()-1)
- {
- batched = true;
- draw_vec[idx]->mCount += facep->getIndicesCount();
- draw_vec[idx]->mEnd += facep->getGeomCount();
- draw_vec[idx]->mVSize = llmax(draw_vec[idx]->mVSize, vsize);
- }
- else if (draw_vec[idx]->mStart == facep->getGeomIndex()+facep->getGeomCount()+1)
+ LLDrawInfo* info = draw_vec[idx];
+
+ if (info->mTexture == facep->getTexture() &&
+ info->mHasGlow == has_glow &&
+ info->mFullbright == fullbright &&
+ info->mBlendFuncDst == bf_dst &&
+ info->mBlendFuncSrc == bf_src)
{
- batched = true;
- draw_vec[idx]->mCount += facep->getIndicesCount();
- draw_vec[idx]->mStart -= facep->getGeomCount();
- draw_vec[idx]->mOffset = facep->getIndicesStart();
- draw_vec[idx]->mVSize = llmax(draw_vec[idx]->mVSize, vsize);
+ if (draw_vec[idx]->mEnd == facep->getGeomIndex()-1)
+ {
+ batched = true;
+ info->mCount += facep->getIndicesCount();
+ info->mEnd += facep->getGeomCount();
+ info->mVSize = llmax(draw_vec[idx]->mVSize, vsize);
+ }
+ else if (draw_vec[idx]->mStart == facep->getGeomIndex()+facep->getGeomCount()+1)
+ {
+ batched = true;
+ info->mCount += facep->getIndicesCount();
+ info->mStart -= facep->getGeomCount();
+ info->mOffset = facep->getIndicesStart();
+ info->mVSize = llmax(draw_vec[idx]->mVSize, vsize);
+ }
}
}
@@ -705,6 +960,10 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
info->mExtents[0] = group->mObjectExtents[0];
info->mExtents[1] = group->mObjectExtents[1];
info->mVSize = vsize;
+ info->mBlendFuncDst = bf_dst;
+ info->mBlendFuncSrc = bf_src;
+ info->mHasGlow = has_glow;
+ info->mParticle = TRUE;
draw_vec.push_back(info);
//for alpha sorting
facep->setDrawInfo(info);
diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h
index 42c1252d01..724e915d02 100755
--- a/indra/newview/llvopartgroup.h
+++ b/indra/newview/llvopartgroup.h
@@ -42,8 +42,7 @@ public:
//vertex buffer for holding all particles
static LLPointer<LLVertexBuffer> sVB;
- static S32 sVBSlotFree[LL_MAX_PARTICLE_COUNT];
- static S32* sVBSlotCursor;
+ static S32 sVBSlotCursor;
static void initClass();
static void restoreGL();
@@ -57,6 +56,7 @@ public:
LLVertexBuffer::MAP_NORMAL |
LLVertexBuffer::MAP_TEXCOORD0 |
LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_EMISSIVE |
LLVertexBuffer::MAP_TEXTURE_INDEX
};
@@ -69,20 +69,37 @@ public:
virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
virtual U32 getPartitionType() const;
+ /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ S32 face,
+ BOOL pick_transparent,
+ S32* face_hit,
+ LLVector4a* intersection,
+ LLVector2* tex_coord,
+ LLVector4a* normal,
+ LLVector4a* tangent);
+
/*virtual*/ void setPixelAreaAndAngle(LLAgent &agent);
/*virtual*/ void updateTextures();
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ void getGeometry(const LLViewerPart& part,
+ LLStrider<LLVector4a>& verticesp);
+
void getGeometry(S32 idx,
LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
+ LLStrider<LLColor4U>& emissivep,
LLStrider<U16>& indicesp);
void updateFaceSize(S32 idx) { }
F32 getPartSize(S32 idx);
+ void getBlendFunc(S32 idx, U32& src, U32& dst);
+ LLUUID getPartOwner(S32 idx);
+ LLUUID getPartSource(S32 idx);
+
void setViewerPartGroup(LLViewerPartGroup *part_groupp) { mViewerPartGroupp = part_groupp; }
LLViewerPartGroup* getViewerPartGroup() { return mViewerPartGroupp; }
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 685f854573..4835ffcd8f 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -101,6 +101,8 @@ static LLFastTimer::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles");
static LLFastTimer::DeclareTimer FTM_GEN_VOLUME("Generate Volumes");
static LLFastTimer::DeclareTimer FTM_VOLUME_TEXTURES("Volume Textures");
+extern BOOL gGLDebugLoggingEnabled;
+
// Implementation class of LLMediaDataClientObject. See llmediadataclient.h
class LLMediaDataClientObjectImpl : public LLMediaDataClientObject
{
@@ -384,7 +386,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
}
else
{
- // CORY TO DO: Figure out how to get the value here
if (update_type != OUT_TERSE_IMPROVED)
{
LLVolumeParams volume_params;
@@ -453,6 +454,11 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
mFaceMappingChanged = TRUE;
mTexAnimMode = 0;
}
+
+ if (value & 0x400)
+ { //particle system (new)
+ unpackParticleSource(*dp, mOwnerID, false);
+ }
}
else
{
@@ -1029,8 +1035,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
}
}
}
-
-
+
static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback");
bool cache_in_vram = use_transform_feedback && gTransformPositionProgram.mProgramObject &&
@@ -1047,7 +1052,9 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
break;
}
volume->genTangents(i);
+ //gGLDebugLoggingEnabled = TRUE;
LLFace::cacheFaceInVRAM(face);
+ //gGLDebugLoggingEnabled = FALSE;
}
}
@@ -1096,6 +1103,12 @@ void LLVOVolume::notifyMeshLoaded()
{
mSculptChanged = TRUE;
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE);
+
+ LLVOAvatar* avatar = getAvatar();
+ if (avatar)
+ {
+ avatar->updateVisualComplexity();
+ }
}
// sculpt replaces generate() for sculpted surfaces
@@ -1113,33 +1126,49 @@ void LLVOVolume::sculpt()
S32 max_discard = mSculptTexture->getMaxDiscardLevel();
if (discard_level > max_discard)
- discard_level = max_discard; // clamp to the best we can do
+ {
+ discard_level = max_discard; // clamp to the best we can do
+ }
+ if(discard_level > MAX_DISCARD_LEVEL)
+ {
+ return; //we think data is not ready yet.
+ }
S32 current_discard = getVolume()->getSculptLevel() ;
if(current_discard < -2)
{
- static S32 low_sculpty_discard_warning_count = 100;
- if (++low_sculpty_discard_warning_count >= 100)
- { // Log first time, then every 100 afterwards otherwise this can flood the logs
+ static S32 low_sculpty_discard_warning_count = 1;
+ S32 exponent = llmax(1, llfloor( log10((F64) low_sculpty_discard_warning_count) ));
+ S32 interval = pow(10.0, exponent);
+ if ( low_sculpty_discard_warning_count < 10 ||
+ (low_sculpty_discard_warning_count % interval) == 0)
+ { // Log first 10 time, then decreasing intervals afterwards otherwise this can flood the logs
llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
<< " at " << current_discard
- << " is less than -2." << llendl;
- low_sculpty_discard_warning_count = 0;
+ << " is less than -2."
+ << " Hit this " << low_sculpty_discard_warning_count << " times"
+ << llendl;
}
+ low_sculpty_discard_warning_count++;
// corrupted volume... don't update the sculpty
return;
}
else if (current_discard > MAX_DISCARD_LEVEL)
{
- static S32 high_sculpty_discard_warning_count = 100;
- if (++high_sculpty_discard_warning_count >= 100)
- { // Log first time, then every 100 afterwards otherwise this can flood the logs
+ static S32 high_sculpty_discard_warning_count = 1;
+ S32 exponent = llmax(1, llfloor( log10((F64) high_sculpty_discard_warning_count) ));
+ S32 interval = pow(10.0, exponent);
+ if ( high_sculpty_discard_warning_count < 10 ||
+ (high_sculpty_discard_warning_count % interval) == 0)
+ { // Log first 10 time, then decreasing intervals afterwards otherwise this can flood the logs
llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
<< " at " << current_discard
- << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl;
- high_sculpty_discard_warning_count = 0;
+ << " is more than than allowed max of " << MAX_DISCARD_LEVEL
+ << ". Hit this " << high_sculpty_discard_warning_count << " times"
+ << llendl;
}
+ high_sculpty_discard_warning_count++;
// corrupted volume... don't update the sculpty
return;
@@ -1232,7 +1261,7 @@ BOOL LLVOVolume::calcLOD()
else
{
distance = mDrawable->mDistanceWRTCamera;
- radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
+ radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length();
}
//hold onto unmodified distance for debugging
@@ -1262,7 +1291,7 @@ BOOL LLVOVolume::calcLOD()
{
//setDebugText(llformat("%.2f:%.2f, %d", debug_distance, radius, cur_detail));
- setDebugText(llformat("%d", mDrawable->getFace(0)->getTextureIndex()));
+ //setDebugText(llformat("%d", mDrawable->getFace(0)->getTextureIndex()));
}
if (cur_detail != mLOD)
@@ -1452,7 +1481,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
continue;
}
res &= face->genVolumeBBoxes(*volume, i,
- mRelativeXform, mRelativeXformInvTrans,
+ mRelativeXform,
(mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global);
if (rebuild)
@@ -3015,7 +3044,7 @@ void LLVOVolume::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_p
//transform view vector into volume space
view_vector -= getRenderPosition();
- mDrawable->mDistanceWRTCamera = view_vector.length();
+ //mDrawable->mDistanceWRTCamera = view_vector.length();
LLQuaternion worldRot = getRenderRotation();
view_vector = view_vector * ~worldRot;
if (!isVolumeGlobal())
@@ -3889,10 +3918,13 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
}
//build matrix palette
- LLMatrix4a mp[64];
+ static const size_t kMaxJoints = 64;
+
+ LLMatrix4a mp[kMaxJoints];
LLMatrix4* mat = (LLMatrix4*) mp;
- for (U32 j = 0; j < skin->mJointNames.size(); ++j)
+ U32 maxJoints = llmin(skin->mJointNames.size(), kMaxJoints);
+ for (U32 j = 0; j < maxJoints; ++j)
{
LLJoint* joint = avatar->getJoint(skin->mJointNames[j]);
if (joint)
@@ -3947,8 +3979,10 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
F32 w = wght[k];
LLMatrix4a src;
- src.setMul(mp[idx[k]], w);
-
+ // Insure ref'd bone is in our clamped array of mats
+ llassert(idx[k] < kMaxJoints);
+ // clamp k to kMaxJoints to avoid reading garbage off stack in release
+ src.setMul(mp[idx[(k < kMaxJoints) ? k : 0]], w);
final_mat.add(src);
}
@@ -4359,7 +4393,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
pAvatarVO->mAttachmentGeometryBytes -= group->mGeometryBytes;
+ pAvatarVO->mAttachmentGeometryBytes = llmax(pAvatarVO->mAttachmentGeometryBytes, 0);
pAvatarVO->mAttachmentSurfaceArea -= group->mSurfaceArea;
+ pAvatarVO->mAttachmentSurfaceArea = llmax(pAvatarVO->mAttachmentSurfaceArea, 0.f);
}
group->mGeometryBytes = 0;
@@ -4372,14 +4408,25 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
mFaceList.clear();
- std::vector<LLFace*> fullbright_faces;
- std::vector<LLFace*> bump_faces;
- std::vector<LLFace*> norm_faces;
- std::vector<LLFace*> spec_faces;
- std::vector<LLFace*> normspec_faces;
- std::vector<LLFace*> simple_faces;
+ const U32 MAX_FACE_COUNT = 4096;
+
+ static LLFace** fullbright_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
+ static LLFace** bump_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
+ static LLFace** simple_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
+ static LLFace** norm_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*), 64);
+ static LLFace** spec_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*), 64);
+ static LLFace** normspec_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*), 64);
+ static LLFace** alpha_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
+
+ U32 fullbright_count = 0;
+ U32 bump_count = 0;
+ U32 simple_count = 0;
+ U32 alpha_count = 0;
+ U32 norm_count = 0;
+ U32 spec_count = 0;
+ U32 normspec_count = 0;
- std::vector<LLFace*> alpha_faces;
+
U32 useage = group->mSpatialPartition->mBufferUsage;
U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
@@ -4390,6 +4437,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
bool emissive = false;
+
+
{
LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST);
@@ -4748,7 +4797,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
if (facep->canRenderAsMask())
{ //can be treated as alpha mask
- simple_faces.push_back(facep);
+ if (simple_count < MAX_FACE_COUNT)
+ {
+ simple_faces[simple_count++] = facep;
+ }
}
else
{
@@ -4756,7 +4808,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{ //only treat as alpha in the pipeline if < 100% transparent
drawablep->setState(LLDrawable::HAS_ALPHA);
}
- alpha_faces.push_back(facep);
+ if (alpha_count < MAX_FACE_COUNT)
+ {
+ alpha_faces[alpha_count++] = facep;
+ }
}
}
else
@@ -4776,51 +4831,81 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
if (mat->getSpecularID().notNull())
{ //has normal and specular maps (needs texcoord1, texcoord2, and tangent)
- normspec_faces.push_back(facep);
+ if (normspec_count < MAX_FACE_COUNT)
+ {
+ normspec_faces[normspec_count++] = facep;
+ }
}
else
{ //has normal map (needs texcoord1 and tangent)
- norm_faces.push_back(facep);
+ if (norm_count < MAX_FACE_COUNT)
+ {
+ norm_faces[norm_count++] = facep;
+ }
}
}
else if (mat->getSpecularID().notNull())
{ //has specular map but no normal map, needs texcoord2
- spec_faces.push_back(facep);
+ if (spec_count < MAX_FACE_COUNT)
+ {
+ spec_faces[spec_count++] = facep;
+ }
}
else
{ //has neither specular map nor normal map, only needs texcoord0
- simple_faces.push_back(facep);
+ if (simple_count < MAX_FACE_COUNT)
+ {
+ simple_faces[simple_count++] = facep;
+ }
}
}
else if (te->getBumpmap())
{ //needs normal + tangent
- bump_faces.push_back(facep);
+ if (bump_count < MAX_FACE_COUNT)
+ {
+ bump_faces[bump_count++] = facep;
+ }
}
else if (te->getShiny() || !te->getFullbright())
{ //needs normal
- simple_faces.push_back(facep);
+ if (simple_count < MAX_FACE_COUNT)
+ {
+ simple_faces[simple_count++] = facep;
+ }
}
else
{ //doesn't need normal
facep->setState(LLFace::FULLBRIGHT);
- fullbright_faces.push_back(facep);
+ if (fullbright_count < MAX_FACE_COUNT)
+ {
+ fullbright_faces[fullbright_count++] = facep;
+ }
}
}
else
{
if (te->getBumpmap() && LLPipeline::sRenderBump)
{ //needs normal + tangent
- bump_faces.push_back(facep);
+ if (bump_count < MAX_FACE_COUNT)
+ {
+ bump_faces[bump_count++] = facep;
+ }
}
else if ((te->getShiny() && LLPipeline::sRenderBump) ||
!(te->getFullbright() || bake_sunlight))
{ //needs normal
- simple_faces.push_back(facep);
+ if (simple_count < MAX_FACE_COUNT)
+ {
+ simple_faces[simple_count++] = facep;
+ }
}
else
{ //doesn't need normal
facep->setState(LLFace::FULLBRIGHT);
- fullbright_faces.push_back(facep);
+ if (fullbright_count < MAX_FACE_COUNT)
+ {
+ fullbright_faces[fullbright_count++] = facep;
+ }
}
}
}
@@ -4833,7 +4918,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (is_rigged)
{
- drawablep->setState(LLDrawable::RIGGED);
+ if (!drawablep->isState(LLDrawable::RIGGED))
+ {
+ drawablep->setState(LLDrawable::RIGGED);
+
+ //first time this is drawable is being marked as rigged,
+ // do another LoD update to use avatar bounding box
+ vobj->updateLOD();
+ }
}
else
{
@@ -4875,13 +4967,13 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
fullbright_mask = fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX;
}
- genDrawInfo(group, simple_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, simple_faces, FALSE, batch_textures, FALSE);
- genDrawInfo(group, fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, fullbright_faces, FALSE, batch_textures);
- genDrawInfo(group, alpha_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, alpha_faces, TRUE, batch_textures);
- genDrawInfo(group, bump_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, bump_faces, FALSE, FALSE);
- genDrawInfo(group, norm_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, norm_faces, FALSE, FALSE);
- genDrawInfo(group, spec_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, spec_faces, FALSE, FALSE);
- genDrawInfo(group, normspec_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, normspec_faces, FALSE, FALSE);
+ genDrawInfo(group, simple_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, simple_faces, simple_count, FALSE, batch_textures, FALSE);
+ genDrawInfo(group, fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, fullbright_faces, fullbright_count, FALSE, batch_textures);
+ genDrawInfo(group, alpha_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, alpha_faces, alpha_count, TRUE, batch_textures);
+ genDrawInfo(group, bump_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, bump_faces, bump_count, FALSE, FALSE);
+ genDrawInfo(group, norm_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, norm_faces, norm_count, FALSE, FALSE);
+ genDrawInfo(group, spec_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, spec_faces, spec_count, FALSE, FALSE);
+ genDrawInfo(group, normspec_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, normspec_faces, normspec_count, FALSE, FALSE);
if (!LLPipeline::sDelayVBUpdate)
{
@@ -4911,6 +5003,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
}
+static LLFastTimer::DeclareTimer FTM_REBUILD_MESH_FLUSH("Flush Mesh");
void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
{
@@ -4920,11 +5013,14 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
LLFastTimer ftm(FTM_REBUILD_VOLUME_VB);
LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers
- S32 num_mapped_veretx_buffer = LLVertexBuffer::sMappedCount ;
-
group->mBuilt = 1.f;
- std::set<LLVertexBuffer*> mapped_buffers;
+ S32 num_mapped_vertex_buffer = LLVertexBuffer::sMappedCount ;
+
+ const U32 MAX_BUFFER_COUNT = 4096;
+ LLVertexBuffer* locked_buffer[MAX_BUFFER_COUNT];
+
+ U32 buffer_count = 0;
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
@@ -4934,7 +5030,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
{
LLVOVolume* vobj = drawablep->getVOVolume();
vobj->preRebuild();
-
+
if (drawablep->isState(LLDrawable::ANIMATED_CHILD))
{
vobj->updateRelativeXform(true);
@@ -4959,9 +5055,9 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
}
- if (buff->isLocked())
+ if (buff->isLocked() && buffer_count < MAX_BUFFER_COUNT)
{
- mapped_buffers.insert(buff);
+ locked_buffer[buffer_count++] = buff;
}
}
}
@@ -4977,21 +5073,24 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
}
}
- for (std::set<LLVertexBuffer*>::iterator iter = mapped_buffers.begin(); iter != mapped_buffers.end(); ++iter)
- {
- (*iter)->flush();
- }
-
- // don't forget alpha
- if(group != NULL &&
- !group->mVertexBuffer.isNull() &&
- group->mVertexBuffer->isLocked())
{
- group->mVertexBuffer->flush();
+ LLFastTimer t(FTM_REBUILD_MESH_FLUSH);
+ for (LLVertexBuffer** iter = locked_buffer, ** end_iter = locked_buffer+buffer_count; iter != end_iter; ++iter)
+ {
+ (*iter)->flush();
+ }
+
+ // don't forget alpha
+ if(group != NULL &&
+ !group->mVertexBuffer.isNull() &&
+ group->mVertexBuffer->isLocked())
+ {
+ group->mVertexBuffer->flush();
+ }
}
//if not all buffers are unmapped
- if(num_mapped_veretx_buffer != LLVertexBuffer::sMappedCount)
+ if(num_mapped_vertex_buffer != LLVertexBuffer::sMappedCount)
{
llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ;
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
@@ -5058,12 +5157,22 @@ static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB");
-void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort, BOOL batch_textures, BOOL no_materials)
+void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures, BOOL no_materials)
{
LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO);
U32 buffer_usage = group->mBufferUsage;
+ static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback");
+
+ if (use_transform_feedback &&
+ gTransformPositionProgram.mProgramObject && //transform shaders are loaded
+ buffer_usage == GL_DYNAMIC_DRAW_ARB && //target buffer is in VRAM
+ !(mask & LLVertexBuffer::MAP_WEIGHT4)) //TODO: add support for weights
+ {
+ buffer_usage = GL_DYNAMIC_COPY_ARB;
+ }
+
#if LL_DARWIN
// HACK from Leslie:
// Disable VBO usage for alpha on Mac OS X because it kills the framerate
@@ -5084,17 +5193,18 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (!distance_sort)
{
//sort faces by things that break batches
- std::sort(faces.begin(), faces.end(), CompareBatchBreakerModified());
+ std::sort(faces, faces+face_count, CompareBatchBreakerModified());
}
else
{
//sort faces by distance
- std::sort(faces.begin(), faces.end(), LLFace::CompareDistanceGreater());
+ std::sort(faces, faces+face_count, LLFace::CompareDistanceGreater());
}
}
bool hud_group = group->isHUDGroup() ;
- std::vector<LLFace*>::iterator face_iter = faces.begin();
+ LLFace** face_iter = faces;
+ LLFace** end_faces = faces+face_count;
LLSpatialGroup::buffer_map_t buffer_map;
@@ -5123,7 +5233,9 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
//NEVER use more than 16 texture index channels (workaround for prevalent driver bug)
texture_index_channels = llmin(texture_index_channels, 16);
- while (face_iter != faces.end())
+ bool flexi = false;
+
+ while (face_iter != end_faces)
{
//pull off next face
LLFace* facep = *face_iter;
@@ -5150,11 +5262,16 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
U32 index_count = facep->getIndicesCount();
U32 geom_count = facep->getGeomCount();
+ flexi = flexi || facep->getViewerObject()->getVolume()->isUnique();
+
//sum up vertices needed for this render batch
- std::vector<LLFace*>::iterator i = face_iter;
+ LLFace** i = face_iter;
++i;
- std::vector<LLViewerTexture*> texture_list;
+ const U32 MAX_TEXTURE_COUNT = 32;
+ LLViewerTexture* texture_list[MAX_TEXTURE_COUNT];
+
+ U32 texture_count = 0;
{
LLFastTimer t(FTM_GEN_DRAW_INFO_FACE_SIZE);
@@ -5162,12 +5279,15 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
{
U8 cur_tex = 0;
facep->setTextureIndex(cur_tex);
- texture_list.push_back(tex);
-
+ if (texture_count < MAX_TEXTURE_COUNT)
+ {
+ texture_list[texture_count++] = tex;
+ }
+
if (can_batch_texture(facep))
{ //populate texture_list with any textures that can be batched
//move i to the next unbatchable face
- while (i != faces.end())
+ while (i != end_faces)
{
facep = *i;
@@ -5183,7 +5303,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (distance_sort)
{ //textures might be out of order, see if texture exists in current batch
bool found = false;
- for (U32 tex_idx = 0; tex_idx < texture_list.size(); ++tex_idx)
+ for (U32 tex_idx = 0; tex_idx < texture_count; ++tex_idx)
{
if (facep->getTexture() == texture_list[tex_idx])
{
@@ -5195,7 +5315,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (!found)
{
- cur_tex = texture_list.size();
+ cur_tex = texture_count;
}
}
else
@@ -5210,7 +5330,10 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
tex = facep->getTexture();
- texture_list.push_back(tex);
+ if (texture_count < MAX_TEXTURE_COUNT)
+ {
+ texture_list[texture_count++] = tex;
+ }
}
if (geom_count + facep->getGeomCount() > max_vertices)
@@ -5219,6 +5342,9 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
++i;
+
+ flexi = flexi || facep->getViewerObject()->getVolume()->isUnique();
+
index_count += facep->getIndicesCount();
geom_count += facep->getGeomCount();
@@ -5234,7 +5360,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
else
{
- while (i != faces.end() &&
+ while (i != end_faces &&
(LLPipeline::sTextureBindTest ||
(distance_sort ||
((*i)->getTexture() == tex &&
@@ -5255,8 +5381,16 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
++i;
index_count += facep->getIndicesCount();
geom_count += facep->getGeomCount();
+
+ flexi = flexi || facep->getViewerObject()->getVolume()->isUnique();
+ }
}
}
+
+
+ if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW_ARB)
+ {
+ buffer_usage = GL_STREAM_DRAW_ARB;
}
//create vertex buffer
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 4f52ff9778..548890b5b5 100755
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -188,13 +188,11 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader)
if (shader->mShaderGroup == LLGLSLShader::SG_WATER)
{
shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, LLWLParamManager::getInstance()->getRotatedLightDir().mV);
- shader->uniform3fv("camPosLocal", 1, LLViewerCamera::getInstance()->getOrigin().mV);
- shader->uniform4fv("waterFogColor", 1, LLDrawPoolWater::sWaterFogColor.mV);
- shader->uniform1f("waterFogEnd", LLDrawPoolWater::sWaterFogEnd);
- shader->uniform4fv("waterPlane", 1, mWaterPlane.mV);
- shader->uniform1f("waterFogDensity", getFogDensity());
- shader->uniform1f("waterFogKS", mWaterFogKS);
- shader->uniform1f("distance_multiplier", 0);
+ shader->uniform4fv(LLShaderMgr::WATER_FOGCOLOR, 1, LLDrawPoolWater::sWaterFogColor.mV);
+ shader->uniform4fv(LLShaderMgr::WATER_WATERPLANE, 1, mWaterPlane.mV);
+ shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, getFogDensity());
+ shader->uniform1f(LLShaderMgr::WATER_FOGKS, mWaterFogKS);
+ shader->uniform1f(LLViewerShaderMgr::DISTANCE_MULTIPLIER, 0);
}
}
diff --git a/indra/newview/llwaterparamset.h b/indra/newview/llwaterparamset.h
index b28585af59..368cb0ccba 100755
--- a/indra/newview/llwaterparamset.h
+++ b/indra/newview/llwaterparamset.h
@@ -33,6 +33,7 @@
#include "v4math.h"
#include "v4color.h"
#include "llviewershadermgr.h"
+#include "llstringtable.h"
class LLWaterParamSet;
@@ -47,6 +48,9 @@ public:
private:
LLSD mParamValues;
+ std::vector<LLStaticHashedString> mParamHashedNames;
+
+ void updateHashedNames();
public:
@@ -140,6 +144,17 @@ inline void LLWaterParamSet::setAll(const LLSD& val)
mParamValues[mIt->first] = mIt->second;
}
}
+ updateHashedNames();
+}
+
+inline void LLWaterParamSet::updateHashedNames()
+{
+ mParamHashedNames.clear();
+ // Iterate through values
+ for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter)
+ {
+ mParamHashedNames.push_back(LLStaticHashedString(iter->first));
+ }
}
inline const LLSD& LLWaterParamSet::getAll()
diff --git a/indra/newview/llwlanimator.h b/indra/newview/llwlanimator.h
index 5223b45343..810f4cf7e5 100755
--- a/indra/newview/llwlanimator.h
+++ b/indra/newview/llwlanimator.h
@@ -137,3 +137,4 @@ private:
};
#endif // LL_WL_ANIMATOR_H
+
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 6077208799..04d41a2512 100755
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -352,7 +352,7 @@ void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader)
if (shader->mShaderGroup == LLGLSLShader::SG_DEFAULT)
{
shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, mRotatedLightDir.mV);
- shader->uniform3fv("camPosLocal", 1, LLViewerCamera::getInstance()->getOrigin().mV);
+ shader->uniform3fv(LLShaderMgr::WL_CAMPOSLOCAL, 1, LLViewerCamera::getInstance()->getOrigin().mV);
}
else if (shader->mShaderGroup == LLGLSLShader::SG_SKY)
@@ -360,7 +360,7 @@ void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader)
shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, mClampedLightDir.mV);
}
- shader->uniform1f("scene_light_strength", mSceneLightStrength);
+ shader->uniform1f(LLShaderMgr::SCENE_LIGHT_STRENGTH, mSceneLightStrength);
}
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index 72422500fc..e13aed98ed 100755
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -412,3 +412,4 @@ inline LLVector4 LLWLParamManager::getRotatedLightDir(void) const
}
#endif
+
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index dba3970635..8529a4614b 100755
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -39,6 +39,22 @@
#include <sstream>
+static LLStaticHashedString sStarBrightness("star_brightness");
+static LLStaticHashedString sPresetNum("preset_num");
+static LLStaticHashedString sSunAngle("sun_angle");
+static LLStaticHashedString sEastAngle("east_angle");
+static LLStaticHashedString sEnableCloudScroll("enable_cloud_scroll");
+static LLStaticHashedString sCloudScrollRate("cloud_scroll_rate");
+static LLStaticHashedString sLightNorm("lightnorm");
+static LLStaticHashedString sCloudDensity("cloud_pos_density1");
+static LLStaticHashedString sCloudScale("cloud_scale");
+static LLStaticHashedString sCloudShadow("cloud_shadow");
+static LLStaticHashedString sDensityMultiplier("density_multiplier");
+static LLStaticHashedString sDistanceMultiplier("distance_multiplier");
+static LLStaticHashedString sHazeDensity("haze_density");
+static LLStaticHashedString sHazeHorizon("haze_horizon");
+static LLStaticHashedString sMaxY("max_y");
+
LLWLParamSet::LLWLParamSet(void) :
mName("Unnamed Preset"),
mCloudScrollXOffset(0.f), mCloudScrollYOffset(0.f)
@@ -49,21 +65,24 @@ static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
void LLWLParamSet::update(LLGLSLShader * shader) const
{
LLFastTimer t(FTM_WL_PARAM_UPDATE);
-
- for(LLSD::map_const_iterator i = mParamValues.beginMap();
- i != mParamValues.endMap();
- ++i)
+ LLSD::map_const_iterator i = mParamValues.beginMap();
+ std::vector<LLStaticHashedString>::const_iterator n = mParamHashedNames.begin();
+ for(;(i != mParamValues.endMap()) && (n != mParamHashedNames.end());++i, n++)
{
- const std::string& param = i->first;
+ const LLStaticHashedString& param = *n;
- if (param == "star_brightness" || param == "preset_num" || param == "sun_angle" ||
- param == "east_angle" || param == "enable_cloud_scroll" ||
- param == "cloud_scroll_rate" || param == "lightnorm" )
+ // check that our pre-hashed names are still tracking the mParamValues map correctly
+ //
+ llassert(param.String() == i->first);
+
+ if (param == sStarBrightness || param == sPresetNum || param == sSunAngle ||
+ param == sEastAngle || param == sEnableCloudScroll ||
+ param == sCloudScrollRate || param == sLightNorm )
{
continue;
}
- if (param == "cloud_pos_density1")
+ if (param == sCloudDensity)
{
LLVector4 val;
val.mV[0] = F32(i->second[0].asReal()) + mCloudScrollXOffset;
@@ -75,10 +94,10 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
shader->uniform4fv(param, 1, val.mV);
stop_glerror();
}
- else if (param == "cloud_scale" || param == "cloud_shadow" ||
- param == "density_multiplier" || param == "distance_multiplier" ||
- param == "haze_density" || param == "haze_horizon" ||
- param == "max_y" )
+ else if (param == sCloudScale || param == sCloudShadow ||
+ param == sDensityMultiplier || param == sDistanceMultiplier ||
+ param == sHazeDensity || param == sHazeHorizon ||
+ param == sMaxY )
{
F32 val = (F32) i->second[0].asReal();
@@ -386,3 +405,14 @@ void LLWLParamSet::updateCloudScrolling(void)
mCloudScrollYOffset += F32(delta_t * (getCloudScrollY() - 10.f) / 100.f);
}
}
+
+void LLWLParamSet::updateHashedNames()
+{
+ mParamHashedNames.clear();
+ // Iterate through values
+ for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter)
+ {
+ mParamHashedNames.push_back(LLStaticHashedString(iter->first));
+ }
+}
+
diff --git a/indra/newview/llwlparamset.h b/indra/newview/llwlparamset.h
index b087119dd5..6e5f1d3a4b 100755
--- a/indra/newview/llwlparamset.h
+++ b/indra/newview/llwlparamset.h
@@ -29,9 +29,11 @@
#include <string>
#include <map>
+#include <vector>
#include "v4math.h"
#include "v4color.h"
+#include "llstaticstringtable.h"
class LLWLParamSet;
class LLGLSLShader;
@@ -47,9 +49,12 @@ public:
private:
LLSD mParamValues;
-
+ std::vector<LLStaticHashedString> mParamHashedNames;
+
float mCloudScrollXOffset, mCloudScrollYOffset;
+ void updateHashedNames();
+
public:
LLWLParamSet();
@@ -177,6 +182,8 @@ inline void LLWLParamSet::setAll(const LLSD& val)
if(val.isMap()) {
mParamValues = val;
}
+
+ updateHashedNames();
}
inline const LLSD& LLWLParamSet::getAll()
@@ -236,3 +243,4 @@ inline F32 LLWLParamSet::getCloudScrollY() {
#endif // LL_WLPARAM_SET_H
+
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 1940cf541e..ae334d4bd2 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1792,3 +1792,5 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
}
return FALSE;
}
+
+
diff --git a/indra/newview/noise.h b/indra/newview/noise.h
index 0923bffcf2..b3efad73c5 100755
--- a/indra/newview/noise.h
+++ b/indra/newview/noise.h
@@ -310,6 +310,8 @@ static void normalize3(F32 v[3])
static void init(void)
{
+ // we want repeatable noise (e.g. for stable terrain texturing), so seed with known value
+ srand(42);
int i, j, k;
for (i = 0 ; i < B ; i++) {
@@ -340,6 +342,9 @@ static void init(void)
for (j = 0 ; j < 3 ; j++)
g3[B + i][j] = g3[i][j];
}
+
+ // reintroduce entropy
+ srand(time(NULL)); // Flawfinder: ignore
}
#undef B
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c9f8a4d9ee..231508e253 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -165,6 +165,7 @@ S32 LLPipeline::RenderGlowIterations;
F32 LLPipeline::RenderGlowWidth;
F32 LLPipeline::RenderGlowStrength;
BOOL LLPipeline::RenderDepthOfField;
+BOOL LLPipeline::RenderDepthOfFieldInEditMode;
F32 LLPipeline::CameraFocusTransitionTime;
F32 LLPipeline::CameraFNumber;
F32 LLPipeline::CameraFocalLength;
@@ -256,6 +257,17 @@ LLFastTimer::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading");
static LLFastTimer::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables");
static LLFastTimer::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort");
+static LLStaticHashedString sTint("tint");
+static LLStaticHashedString sAmbiance("ambiance");
+static LLStaticHashedString sAlphaScale("alpha_scale");
+static LLStaticHashedString sNormMat("norm_mat");
+static LLStaticHashedString sOffset("offset");
+static LLStaticHashedString sScreenRes("screenRes");
+static LLStaticHashedString sDelta("delta");
+static LLStaticHashedString sDistFactor("dist_factor");
+static LLStaticHashedString sKern("kern");
+static LLStaticHashedString sKernScale("kern_scale");
+
//----------------------------------------
std::string gPoolNames[] =
{
@@ -617,6 +629,7 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderGlowWidth");
connectRefreshCachedSettingsSafe("RenderGlowStrength");
connectRefreshCachedSettingsSafe("RenderDepthOfField");
+ connectRefreshCachedSettingsSafe("RenderDepthOfFieldInEditMode");
connectRefreshCachedSettingsSafe("CameraFocusTransitionTime");
connectRefreshCachedSettingsSafe("CameraFNumber");
connectRefreshCachedSettingsSafe("CameraFocalLength");
@@ -1127,6 +1140,7 @@ void LLPipeline::refreshCachedSettings()
RenderGlowWidth = gSavedSettings.getF32("RenderGlowWidth");
RenderGlowStrength = gSavedSettings.getF32("RenderGlowStrength");
RenderDepthOfField = gSavedSettings.getBOOL("RenderDepthOfField");
+ RenderDepthOfFieldInEditMode = gSavedSettings.getBOOL("RenderDepthOfFieldInEditMode");
CameraFocusTransitionTime = gSavedSettings.getF32("CameraFocusTransitionTime");
CameraFNumber = gSavedSettings.getF32("CameraFNumber");
CameraFocalLength = gSavedSettings.getF32("CameraFocalLength");
@@ -3078,7 +3092,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
llassert(vobj); // trying to catch a bad assumption
if (vobj) // this test may not be needed, see above
{
- const LLVOAvatar* av = vobj->asAvatar();
+ LLVOAvatar* av = vobj->asAvatar();
if (av && av->isImpostor())
{
return;
@@ -4872,18 +4886,6 @@ void LLPipeline::renderPhysicsDisplay()
}
}
- for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
- {
- LLSpatialBridge* bridge = *i;
- if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
- {
- gGL.pushMatrix();
- gGL.multMatrix((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
- bridge->renderPhysicsShapes();
- gGL.popMatrix();
- }
- }
-
gGL.flush();
if (LLGLSLShader::sNoFixedFunction)
@@ -4920,9 +4922,9 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
gPathfindingProgram.bind();
- gPathfindingProgram.uniform1f("tint", 1.f);
- gPathfindingProgram.uniform1f("ambiance", 1.f);
- gPathfindingProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingProgram.uniform1f(sTint, 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 1.f);
}
//Requried character physics capsule render parameters
@@ -4939,7 +4941,7 @@ void LLPipeline::renderDebug()
llPathingLibInstance->renderSimpleShapeCapsuleID( gGL, id, pos, rot );
gGL.setColorMask(true, false);
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.90f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.90f);
llPathingLibInstance->renderSimpleShapeCapsuleID( gGL, id, pos, rot );
gPathfindingProgram.bind();
}
@@ -4966,9 +4968,9 @@ void LLPipeline::renderDebug()
{
gPathfindingProgram.bind();
- gPathfindingProgram.uniform1f("tint", 1.f);
- gPathfindingProgram.uniform1f("ambiance", ambiance);
- gPathfindingProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingProgram.uniform1f(sTint, 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
+ gPathfindingProgram.uniform1f(sAlphaScale, 1.f);
}
if ( !pathfindingConsole->isRenderWorld() )
@@ -4992,7 +4994,7 @@ void LLPipeline::renderDebug()
if ( pathfindingConsole->isRenderWorld() )
{
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.66f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.66f);
llPathingLibInstance->renderNavMesh();
}
else
@@ -5004,8 +5006,8 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
gPathfindingNoNormalsProgram.bind();
- gPathfindingNoNormalsProgram.uniform1f("tint", 1.f);
- gPathfindingNoNormalsProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingNoNormalsProgram.uniform1f(sTint, 1.f);
+ gPathfindingNoNormalsProgram.uniform1f(sAlphaScale, 1.f);
llPathingLibInstance->renderNavMeshEdges();
gPathfindingProgram.bind();
}
@@ -5045,7 +5047,7 @@ void LLPipeline::renderDebug()
gGL.setColorMask(true, false);
//render the bookends
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.90f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.90f);
llPathingLibInstance->renderPathBookend( gGL, LLPathingLib::LLPL_START );
llPathingLibInstance->renderPathBookend( gGL, LLPathingLib::LLPL_END );
gPathfindingProgram.bind();
@@ -5063,7 +5065,7 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.90f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.90f);
llPathingLibInstance->renderSimpleShapes( gGL, gAgent.getRegion()->getWaterHeight() );
}
else
@@ -5111,7 +5113,7 @@ void LLPipeline::renderDebug()
LLGLEnable blend(GL_BLEND);
{
- gPathfindingProgram.uniform1f("ambiance", ambiance);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
{ //draw solid overlay
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
@@ -5126,8 +5128,8 @@ void LLPipeline::renderDebug()
if (pathfindingConsole->isRenderXRay())
{
- gPathfindingProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
- gPathfindingProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
+ gPathfindingProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint"));
+ gPathfindingProgram.uniform1f(sAlphaScale, gSavedSettings.getF32("PathfindingXRayOpacity"));
LLGLEnable blend(GL_BLEND);
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER);
@@ -5135,13 +5137,13 @@ void LLPipeline::renderDebug()
if (gSavedSettings.getBOOL("PathfindingXRayWireframe"))
{ //draw hidden wireframe as darker and less opaque
- gPathfindingProgram.uniform1f("ambiance", 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] );
}
else
{
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- gPathfindingProgram.uniform1f("ambiance", ambiance);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] );
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
@@ -5149,9 +5151,9 @@ void LLPipeline::renderDebug()
{ //draw visible wireframe as brighter, thicker and more opaque
glPolygonOffset(offset, offset);
- gPathfindingProgram.uniform1f("ambiance", 1.f);
- gPathfindingProgram.uniform1f("tint", 1.f);
- gPathfindingProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
+ gPathfindingProgram.uniform1f(sTint, 1.f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 1.f);
glLineWidth(gSavedSettings.getF32("PathfindingLineWidth"));
LLGLDisable blendOut(GL_BLEND);
@@ -5183,19 +5185,19 @@ void LLPipeline::renderDebug()
glLineWidth(2.0f);
LLGLEnable cull(GL_CULL_FACE);
- gPathfindingProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
- gPathfindingProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
+ gPathfindingProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint"));
+ gPathfindingProgram.uniform1f(sAlphaScale, gSavedSettings.getF32("PathfindingXRayOpacity"));
if (gSavedSettings.getBOOL("PathfindingXRayWireframe"))
{ //draw hidden wireframe as darker and less opaque
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
- gPathfindingProgram.uniform1f("ambiance", 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
llPathingLibInstance->renderNavMesh();
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
else
{
- gPathfindingProgram.uniform1f("ambiance", ambiance);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
llPathingLibInstance->renderNavMesh();
}
@@ -5203,8 +5205,8 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
gPathfindingNoNormalsProgram.bind();
- gPathfindingNoNormalsProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
- gPathfindingNoNormalsProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
+ gPathfindingNoNormalsProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint"));
+ gPathfindingNoNormalsProgram.uniform1f(sAlphaScale, gSavedSettings.getF32("PathfindingXRayOpacity"));
llPathingLibInstance->renderNavMeshEdges();
gPathfindingProgram.bind();
}
@@ -5331,6 +5333,42 @@ void LLPipeline::renderDebug()
gUIProgram.bind();
}
+ if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST) && !hud_only)
+ { //draw crosshairs on particle intersection
+ if (gDebugRaycastParticle)
+ {
+ if (LLGLSLShader::sNoFixedFunction)
+ { //this debug display requires shaders
+ gDebugProgram.bind();
+
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ LLVector3 center(gDebugRaycastParticleIntersection.getF32ptr());
+ LLVector3 size(0.1f, 0.1f, 0.1f);
+
+ LLVector3 p[6];
+
+ p[0] = center + size.scaledVec(LLVector3(1,0,0));
+ p[1] = center + size.scaledVec(LLVector3(-1,0,0));
+ p[2] = center + size.scaledVec(LLVector3(0,1,0));
+ p[3] = center + size.scaledVec(LLVector3(0,-1,0));
+ p[4] = center + size.scaledVec(LLVector3(0,0,1));
+ p[5] = center + size.scaledVec(LLVector3(0,0,-1));
+
+ gGL.begin(LLRender::LINES);
+ gGL.diffuseColor3f(1.f, 1.f, 0.f);
+ for (U32 i = 0; i < 6; i++)
+ {
+ gGL.vertex3fv(p[i].mV);
+ }
+ gGL.end();
+ gGL.flush();
+
+ gDebugProgram.unbind();
+ }
+ }
+ }
+
if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
{
LLVertexBuffer::unbind();
@@ -7011,6 +7049,48 @@ void LLPipeline::setRenderHighlightTextureChannel(LLRender::eTexIndex channel)
sRenderHighlightTextureChannel = channel;
}
+LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection,
+ S32* face_hit)
+{
+ LLVector4a local_end = end;
+
+ LLVector4a position;
+
+ LLDrawable* drawable = NULL;
+
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ {
+ LLViewerRegion* region = *iter;
+
+ LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE);
+ if (part && hasRenderType(part->mDrawableType))
+ {
+ LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, face_hit, &position, NULL, NULL, NULL);
+ if (hit)
+ {
+ drawable = hit;
+ local_end = position;
+ }
+ }
+ }
+
+ LLVOPartGroup* ret = NULL;
+ if (drawable)
+ {
+ //make sure we're returning an LLVOPartGroup
+ llassert(drawable->getVObj()->getPCode() == LLViewerObject::LL_VO_PART_GROUP);
+ ret = (LLVOPartGroup*) drawable->getVObj().get();
+ }
+
+ if (intersection)
+ {
+ *intersection = position;
+ }
+
+ return ret;
+}
+
LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
S32* face_hit,
@@ -7570,7 +7650,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater() &&
- !LLToolMgr::getInstance()->inBuildMode() &&
+ (RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) &&
RenderDepthOfField;
@@ -7624,7 +7704,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
else
{
//focus on alt-zoom target
- focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal());
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
+ {
+ focus_point = LLVector3(gAgentCamera.getFocusGlobal()-region->getOriginGlobal());
+ }
}
}
@@ -8245,13 +8329,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
shader.uniform2f(LLShaderMgr::DEFERRED_PROJ_SHADOW_RES, mShadow[4].getWidth(), mShadow[4].getHeight());
shader.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
-
-
- if (shader.getUniformLocation("norm_mat") >= 0)
- {
- glh::matrix4f norm_mat = glh_get_current_modelview().inverse().transpose();
- shader.uniformMatrix4fv("norm_mat", 1, FALSE, norm_mat.m);
- }
}
LLColor3 pow3f(LLColor3 v, F32 f)
@@ -8372,9 +8449,8 @@ void LLPipeline::renderDeferredLighting()
}
}
- gDeferredSunProgram.uniform3fv("offset", slice, offset);
- gDeferredSunProgram.uniform2f("screenRes", mDeferredLight.getWidth(), mDeferredLight.getHeight());
-
+ gDeferredSunProgram.uniform3fv(sOffset, slice, offset);
+
{
LLGLDisable blend(GL_BLEND);
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
@@ -8417,10 +8493,10 @@ void LLPipeline::renderDeferredLighting()
x += 1.f;
}
- gDeferredBlurLightProgram.uniform2f("delta", 1.f, 0.f);
- gDeferredBlurLightProgram.uniform1f("dist_factor", dist_factor);
- gDeferredBlurLightProgram.uniform3fv("kern", kern_length, gauss[0].mV);
- gDeferredBlurLightProgram.uniform1f("kern_scale", blur_size * (kern_length/2.f - 0.5f));
+ gDeferredBlurLightProgram.uniform2f(sDelta, 1.f, 0.f);
+ gDeferredBlurLightProgram.uniform1f(sDistFactor, dist_factor);
+ gDeferredBlurLightProgram.uniform3fv(sKern, kern_length, gauss[0].mV);
+ gDeferredBlurLightProgram.uniform1f(sKernScale, blur_size * (kern_length/2.f - 0.5f));
{
LLGLDisable blend(GL_BLEND);
@@ -8437,7 +8513,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
mDeferredLight.bindTarget();
- gDeferredBlurLightProgram.uniform2f("delta", 0.f, 1.f);
+ gDeferredBlurLightProgram.uniform2f(sDelta, 0.f, 1.f);
{
LLGLDisable blend(GL_BLEND);
@@ -10616,11 +10692,11 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
assertInitialized();
- bool muted = avatar->isVisuallyMuted();
+ bool visually_muted = avatar->isVisuallyMuted();
pushRenderTypeMask();
- if (muted)
+ if (visually_muted)
{
andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
}
@@ -10764,6 +10840,13 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->mImpostor.bindTarget();
}
+ F32 old_alpha = LLDrawPoolAvatar::sMinimumAlpha;
+
+ if (visually_muted)
+ { //disable alpha masking for muted avatars (get whole skin silhouette)
+ LLDrawPoolAvatar::sMinimumAlpha = 0.f;
+ }
+
if (LLPipeline::sRenderDeferred)
{
avatar->mImpostor.clear();
@@ -10778,6 +10861,8 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
renderGeom(camera);
}
+ LLDrawPoolAvatar::sMinimumAlpha = old_alpha;
+
{ //create alpha mask based on depth buffer (grey out if muted)
LLFastTimer t(FTM_IMPOSTOR_BACKGROUND);
if (LLPipeline::sRenderDeferred)
@@ -10788,9 +10873,10 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLGLDisable blend(GL_BLEND);
- if (muted)
+ if (visually_muted)
{
gGL.setColorMask(true, true);
+
}
else
{
@@ -10809,14 +10895,24 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
gGL.pushMatrix();
gGL.loadIdentity();
- static const F32 clip_plane = 0.99999f;
+ static const F32 clip_plane = 0.999f;
if (LLGLSLShader::sNoFixedFunction)
{
- gUIProgram.bind();
+ gDebugProgram.bind();
}
- gGL.color4ub(64,64,64,255);
+
+ if (LLMuteList::getInstance()->isMuted(avatar->getID()))
+ { //grey muted avatar
+ gGL.diffuseColor4ub(64,64,64,255);
+ }
+ else
+ { // Visually muted avatar
+ gGL.diffuseColor4fv( avatar->getMutedAVColor().mV );
+ }
+
+ {
gGL.begin(LLRender::QUADS);
gGL.vertex3f(-1, -1, clip_plane);
gGL.vertex3f(1, -1, clip_plane);
@@ -10824,10 +10920,11 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
gGL.vertex3f(-1, 1, clip_plane);
gGL.end();
gGL.flush();
+ }
if (LLGLSLShader::sNoFixedFunction)
{
- gUIProgram.unbind();
+ gDebugProgram.unbind();
}
gGL.popMatrix();
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 70dcf80407..f0bebbe20d 100755
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -58,6 +58,7 @@ class LLRenderFunc;
class LLCubeMap;
class LLCullResult;
class LLVOAvatar;
+class LLVOPartGroup;
class LLGLSLShader;
class LLCurlRequest;
class LLDrawPoolAlpha;
@@ -202,6 +203,12 @@ public:
LLVector4a* normal = NULL, // return the surface normal at the intersection point
LLVector4a* tangent = NULL // return the surface tangent at the intersection point
);
+
+ //get the closest particle to start between start and end, returns the LLVOPartGroup and particle index
+ LLVOPartGroup* lineSegmentIntersectParticle(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection,
+ S32* face_hit);
+
+
LLViewerObject* lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
S32* face_hit, // return the face hit
@@ -910,6 +917,7 @@ public:
static F32 RenderGlowWidth;
static F32 RenderGlowStrength;
static BOOL RenderDepthOfField;
+ static BOOL RenderDepthOfFieldInEditMode;
static F32 CameraFocusTransitionTime;
static F32 CameraFNumber;
static F32 CameraFocalLength;
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png
index 0631f16f3b..0631f16f3b 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png
index 578482f5ed..578482f5ed 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png
index 7676131790..7676131790 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png
index 2880eb766a..2880eb766a 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png
index d009c8f446..d009c8f446 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png
index 8d82960e28..8d82960e28 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png
index f718d3fc60..f718d3fc60 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png
index 315e2c581a..315e2c581a 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png
index 732ab02a20..732ab02a20 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png
index 25a32cb2ba..25a32cb2ba 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png
index 08debeb91f..08debeb91f 100755..100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index 46ba4bd29d..a73ea0cc05 100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -112,4 +112,50 @@
<menu_item_call.on_enable
function="Object.EnableInspect" />
</menu_item_call>
+
+ <menu_item_separator />
+
+ <menu_item_check
+ name="Normal"
+ label="Normal">
+ <menu_item_check.on_check
+ function="Avatar.CheckImposterMode"
+ parameter="0" />
+ <menu_item_check.on_click
+ function="Avatar.SetImposterMode"
+ parameter="0" />
+ </menu_item_check>
+ <menu_item_check
+ name="Always use imposter"
+ label="Always use imposter">
+ <menu_item_check.on_check
+ function="Avatar.CheckImposterMode"
+ parameter="1" />
+ <menu_item_check.on_click
+ function="Avatar.SetImposterMode"
+ parameter="1" />
+ </menu_item_check>
+ <menu_item_check
+ name="Never use imposter"
+ label="Never use imposter">
+ <menu_item_check.on_check
+ function="Avatar.CheckImposterMode"
+ parameter="2" />
+ <menu_item_check.on_click
+ function="Avatar.SetImposterMode"
+ parameter="2" />
+ </menu_item_check>
+
+ <menu_item_separator
+ layout="topleft" />
+
+ <menu_item_call
+ enabled="false"
+ label="Mute Particle Owner"
+ name="Mute Particle">
+ <menu_item_call.on_click
+ function="Particle.Mute" />
+ <menu_item_call.on_enable
+ function="EnableMuteParticle" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index 28e032ce5f..500a5dc6d1 100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -143,4 +143,15 @@ name="Edit Outfit">
<menu_item_call.on_enable
function="Attachment.EnableDrop" />
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ enabled="false"
+ label="Mute Particle Owner"
+ name="Mute Particle">
+ <menu_item_call.on_click
+ function="Particle.Mute" />
+ <menu_item_call.on_enable
+ function="EnableMuteParticle" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index e7c2b80da2..2ef18dbf90 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -39,8 +39,10 @@
<menu_item_call.on_click
function="Avatar.InviteToGroup" />
</menu_item_call>
+
<menu_item_separator />
- <menu_item_call
+
+ <menu_item_call
enabled="false"
label="Block"
name="Avatar Mute">
@@ -103,4 +105,50 @@
<menu_item_call.on_enable
function="EnablePayAvatar" />
</menu_item_call>
+
+ <menu_item_separator />
+
+ <menu_item_check
+ name="Normal"
+ label="Normal">
+ <menu_item_check.on_check
+ function="Avatar.CheckImposterMode"
+ parameter="0" />
+ <menu_item_check.on_click
+ function="Avatar.SetImposterMode"
+ parameter="0" />
+ </menu_item_check>
+ <menu_item_check
+ name="Always use imposter"
+ label="Always use imposter">
+ <menu_item_check.on_check
+ function="Avatar.CheckImposterMode"
+ parameter="1" />
+ <menu_item_check.on_click
+ function="Avatar.SetImposterMode"
+ parameter="1" />
+ </menu_item_check>
+ <menu_item_check
+ name="Never use imposter"
+ label="Never use imposter">
+ <menu_item_check.on_check
+ function="Avatar.CheckImposterMode"
+ parameter="2" />
+ <menu_item_check.on_click
+ function="Avatar.SetImposterMode"
+ parameter="2" />
+ </menu_item_check>
+
+ <menu_item_separator
+ layout="topleft" />
+
+ <menu_item_call
+ enabled="false"
+ label="Mute Particle Owner"
+ name="Mute Particle">
+ <menu_item_call.on_click
+ function="Particle.Mute" />
+ <menu_item_call.on_enable
+ function="EnableMuteParticle" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index c1ff026a74..362dca698f 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -269,4 +269,16 @@
<menu_item_call.on_visible
function="Advanced.EnableAppearanceToXML"/>
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ enabled="false"
+ label="Mute Particle Owner"
+ name="Mute Particle">
+ <menu_item_call.on_click
+ function="Particle.Mute" />
+
+ <menu_item_call.on_enable
+ function="EnableMuteParticle" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml
index cc6d8ad9c1..7b40e89535 100755
--- a/indra/newview/skins/default/xui/en/menu_land.xml
+++ b/indra/newview/skins/default/xui/en/menu_land.xml
@@ -61,4 +61,15 @@
<menu_item_call.on_enable
function="EnableEdit" />
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ enabled="false"
+ label="Mute Particle Owner"
+ name="Mute Particle">
+ <menu_item_call.on_click
+ function="Particle.Mute" />
+ <menu_item_call.on_enable
+ function="EnableMuteParticle" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_mute_particle.xml b/indra/newview/skins/default/xui/en/menu_mute_particle.xml
new file mode 100644
index 0000000000..41d5613623
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_mute_particle.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- *NOTE: See also menu_attachment_other.xml -->
+<context_menu
+ layout="topleft"
+ name="Mute Particle Pie">
+ <menu_item_call
+ enabled="false"
+ label="Mute Particle Owner"
+ name="Mute Particle">
+ <menu_item_call.on_click
+ function="Particle.Mute" />
+ <menu_item_call.on_enable
+ function="EnableMuteParticle" />
+ </menu_item_call>
+</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index f6004621a6..97b24d2aba 100755
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -196,4 +196,15 @@
<menu_item_call.on_enable
function="Object.EnableDelete" />
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ enabled="false"
+ label="Mute Particle Owner"
+ name="Mute Particle">
+ <menu_item_call.on_click
+ function="Particle.Mute" />
+ <menu_item_call.on_enable
+ function="EnableMuteParticle" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index b01c3067ff..39fd519c70 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2197,6 +2197,16 @@
function="ToggleControl"
parameter="DebugShowRenderInfo" />
</menu_item_check>
+ <menu_item_check
+ label="Show Avatar Render Info"
+ name="Show Avatar Render Info">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="DebugShowAvatarRenderInfo" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="DebugShowAvatarRenderInfo" />
+ </menu_item_check>
<menu_item_check
label="Show Texture Info"
name="Show Texture Info">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9e582cf0de..dc54e5e924 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6804,7 +6804,6 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
name="RegionRestartMinutes"
priority="high"
sound="UISndAlert"
- persist="true"
type="notify">
This region will restart in [MINUTES] minutes.
If you stay in this region you will be logged out.
@@ -6815,7 +6814,6 @@ If you stay in this region you will be logged out.
name="RegionRestartSeconds"
priority="high"
sound="UISndAlert"
- persist="true"
type="notify">
This region will restart in [SECONDS] seconds.
If you stay in this region you will be logged out.
@@ -10075,7 +10073,7 @@ An internal error prevented us from properly updating your viewer. The L$ balan
<tag>fail</tag>
Cannot create large prims that intersect other players. Please re-try when other players have moved.
</notification>
-
+
<notification
icon="alertmodal.tga"
name="PreferenceChatClearLog"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index d7db7caf66..3c9508bb74 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -47,7 +47,7 @@
Better
</text>
<icon
- color="0.12 0.12 0.12 1"
+ color="DkGray"
height="14"
image_name="Rounded_Square"
layout="topleft"
@@ -56,16 +56,15 @@
top_delta="-2"
width="2" />
<icon
- color="0.12 0.12 0.12 1"
+ color="DkGray"
height="14"
image_name="Rounded_Square"
layout="topleft"
left_pad="41"
- name="LowMidraphicsDivet"
- top_delta="-2"
+ name="LowMidGraphicsDivet"
width="2" />
<icon
- color="0.12 0.12 0.12 1"
+ color="DkGray"
height="14"
image_name="Rounded_Square"
layout="topleft"
@@ -74,7 +73,7 @@
top_delta="0"
width="2" />
<icon
- color="0.12 0.12 0.12 1"
+ color="DkGray"
height="14"
image_name="Rounded_Square"
layout="topleft"
@@ -83,7 +82,7 @@
top_delta="0"
width="2" />
<icon
- color="0.12 0.12 0.12 1"
+ color="DkGray"
height="14"
image_name="Rounded_Square"
layout="topleft"
@@ -92,7 +91,7 @@
top_delta="0"
width="2" />
<icon
- color="0.12 0.12 0.12 1"
+ color="DkGray"
height="14"
image_name="Rounded_Square"
layout="topleft"
@@ -101,7 +100,7 @@
top_delta="0"
width="2" />
<icon
- color="0.12 0.12 0.12 1"
+ color="DkGray"
height="14"
image_name="Rounded_Square"
layout="topleft"
@@ -178,10 +177,86 @@
width="80">
Ultra
</text>
+ <slider
+ control_name="RenderAvatarLODFactor"
+ invisiblity_control="ShowAdvancedGraphicsSettings"
+ follows="left|top"
+ height="16"
+ increment="0.125"
+ initial_value="160"
+ label="Avatar detail:"
+ label_width="90"
+ layout="topleft"
+ left="30"
+ name="AvatarMeshDetail2"
+ show_text="false"
+ top="72"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="AvatarMeshDetailText2" />
+ </slider>
+ <text
+ type="string"
+ invisiblity_control="ShowAdvancedGraphicsSettings"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ name="AvatarMeshDetailText2"
+ top_delta="0"
+ left_delta="304"
+ width="128">
+ Low
+ </text>
+ <slider
+ control_name="RenderFarClip"
+ invisiblity_control="ShowAdvancedGraphicsSettings"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="8"
+ initial_value="160"
+ label="Draw distance:"
+ label_width="90"
+ layout="topleft"
+ left="30"
+ max_val="512"
+ min_val="64"
+ name="DrawDistance"
+ top="110"
+ width="330" />
+ <text
+ type="string"
+ invisiblity_control="ShowAdvancedGraphicsSettings"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ left_delta="330"
+ name="DrawDistanceMeterText2"
+ top_delta="0"
+ width="128">
+ m
+ </text>
+ <check_box
+ control_name="RenderDeferred"
+ invisiblity_control="ShowAdvancedGraphicsSettings"
+ height="16"
+ initial_value="true"
+ label="Lighting and Shadows"
+ layout="topleft"
+ left="30"
+ name="UseLightShaders2"
+ top="148"
+ width="256">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
<panel
- visiblity_control="ShowAdvancedGraphicsSettings"
+ visiblity_control="ShowAdvancedGraphicsSettings"
border="false"
- follows="top|left"
+ follows="top|left"
height="300"
label="CustomGraphics"
layout="topleft"
@@ -225,13 +300,13 @@
function="Pref.VertexShaderEnable" />
</check_box>
<check_box
- control_name="RenderLocalLights"
- height="16"
- initial_value="true"
- label="Local Lights"
- layout="topleft"
- left_delta="0"
- name="LocalLights"
+ control_name="RenderLocalLights"
+ height="16"
+ initial_value="true"
+ label="Local Lights"
+ layout="topleft"
+ left_delta="0"
+ name="LocalLights"
top_pad="1"
width="256" />
<check_box
diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml
index 89aef57cca..0eeccbeac5 100755
--- a/indra/newview/skins/default/xui/en/role_actions.xml
+++ b/indra/newview/skins/default/xui/en/role_actions.xml
@@ -70,8 +70,8 @@
longdescription="Toggle &apos;Show Place in Search&apos; and setting a parcel&apos;s category in About Land &gt; Options tab."
name="land find places" value="17" />
<action
- description="Change parcel name, description, and &apos;Show Place in Search&apos; settings"
- longdescription="Change parcel name, description, and &apos;Show Place in Search&apos; settings. This is done in About Land &gt; Options tab."
+ description="Change parcel name, description, and &apos;Moderate Content&apos; settings"
+ longdescription="Change parcel name, description, and &apos;Moderate Content&apos; settings. This is done in About Land &gt; Options tab."
name="land change identity" value="18" />
<action description="Set landing point and set teleport routing"
longdescription="On a group-owned parcel, Members in a Role with this Ability can set a landing point to specify where incoming teleports arrive, and also set teleport routing for further control. This is done in About Land &gt; Options tab."
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index f7b33b0a4a..ef01f27da2 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -409,10 +409,13 @@ Please try logging in again in a minute.</string>
<string name="AddAndRemoveJoints">Add and remove joints with other objects</string>
<string name="ChangePermissions">Change its permissions</string>
<string name="TrackYourCamera">Track your camera</string>
- <string name="ControlYourCamera">Control your camera</string>
+ <string name="ControlYourCamera">Control your camera</string>
+ <string name="TeleportYourAgent">Teleport you</string>
+ <string name="ManageEstateSilently">Manage your estates silently</string>
+ <string name="ChangeYourDefaultAnimations">Change your default animations</string>
+
<string name="NotConnected">Not Connected</string>
<string name="AgentNameSubst">(You)</string> <!-- Substitution for agent name -->
- <string name="TeleportYourAgent">Teleport you</string>
<string name="JoinAnExperience">Join an experience</string> <!-- not used -->
<string name="SilentlyManageEstateAccess">Suppress alerts when managing estate access lists</string>
<string name="OverrideYourAnimations">Replace your default animations</string>
@@ -2515,6 +2518,8 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
<string name="ATTACH_HUD_BOTTOM_LEFT">HUD Bottom Left</string>
<string name="ATTACH_HUD_BOTTOM">HUD Bottom</string>
<string name="ATTACH_HUD_BOTTOM_RIGHT">HUD Bottom Right</string>
+ <string name="ATTACH_NECK">Neck</string>
+ <string name="ATTACH_AVATAR_CENTER">Avatar Center</string>
<!-- script editor -->
<string name="CursorPos">Line [LINE], Column [COLUMN]</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
index b83d9122f7..b83d9122f7 100755..100644
--- a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
+++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index 3ba25f3c10..05289f0309 100755
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -40,7 +40,7 @@
static U32 test_preferred_maturity = SIM_ACCESS_PG;
LLControlGroup::LLControlGroup(const std::string& name)
- : LLInstanceTracker<LLControlGroup, std::string>(name)
+: LLInstanceTracker<LLControlGroup, std::string>(name)
{
}