summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-06-01 09:56:41 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-06-01 09:56:41 -0400
commit7d05ade3f10563e8c202106e00cb3d273ab13338 (patch)
tree349ecda36a5a561d6e564e2cc3db39121fd8946b /indra/newview/llvovolume.cpp
parented92f1d8034dcaa84f808b3267c772202e7ce113 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
SL-18330: Merge branch 'main' of secondlife/viewer into xcode-14.3
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 97b129db18..e9a1724639 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -88,6 +88,7 @@
#include "llcallstack.h"
#include "llsculptidsize.h"
#include "llavatarappearancedefines.h"
+#include "llperfstats.h"
const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
const F32 FORCE_CULL_AREA = 8.f;
@@ -5436,7 +5437,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
}
}
- if (type == LLRenderPass::PASS_ALPHA)
+ // if (type == LLRenderPass::PASS_ALPHA) // always populate the draw_info ptr
{ //for alpha sorting
facep->setDrawInfo(draw_info);
}
@@ -5637,6 +5638,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
LL_PROFILE_ZONE_NAMED("rebuildGeom - face list");
//get all the faces into a list
+ std::unique_ptr<LLPerfStats::RecordAttachmentTime> ratPtr{};
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin();
drawable_iter != group->getDataEnd(); ++drawable_iter)
{
@@ -5668,6 +5670,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
continue;
}
+ if(vobj->isAttachment())
+ {
+ trackAttachments( vobj, drawablep->isState(LLDrawable::RIGGED),&ratPtr);
+ }
+
LLVolume* volume = vobj->getVolume();
if (volume)
{
@@ -6058,6 +6065,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
U32 buffer_count = 0;
+ std::unique_ptr<LLPerfStats::RecordAttachmentTime> ratPtr{};
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
@@ -6067,6 +6075,11 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
LLVOVolume* vobj = drawablep->getVOVolume();
if (!vobj) continue;
+
+ if (vobj->isAttachment())
+ {
+ trackAttachments( vobj, drawablep->isState(LLDrawable::RIGGED), &ratPtr );
+ }
if (debugLoggingEnabled("AnimatedObjectsLinkset"))
{
@@ -6492,10 +6505,16 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
U32 indices_index = 0;
U16 index_offset = 0;
- while (face_iter < i)
+ std::unique_ptr<LLPerfStats::RecordAttachmentTime> ratPtr;
+ while (face_iter < i)
{
//update face indices for new buffer
facep = *face_iter;
+ LLViewerObject* vobj = facep->getViewerObject();
+ if(vobj && vobj->isAttachment())
+ {
+ trackAttachments(vobj, LLPipeline::sShadowRender, &ratPtr);
+ }
if (buffer.isNull())
{
// Bulk allocation failed