summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2023-04-28 09:48:02 -0700
committerGitHub <noreply@github.com>2023-04-28 09:48:02 -0700
commitb21e16f27d215cd2e564af7c48cba86459d07645 (patch)
treeebccf636e37fd64fd08435f20c220f037ceec97d /indra/newview/llvovolume.cpp
parentf5cf0cf876c3e69aa9b378b3f363f39679f4b7a4 (diff)
parent97c6bf8f743ef4956d7d706e26f25ce6f32182b4 (diff)
Merge pull request #198 from secondlife/DRTVWR-559-merge-539
DRTVWR-559 merge 539
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 b482ded121..12ceb86e52 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"
#include "llgltfmateriallist.h"
const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
@@ -5454,7 +5455,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);
}
@@ -5656,6 +5657,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)
{
@@ -5691,6 +5693,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
continue;
}
+ if(vobj->isAttachment())
+ {
+ trackAttachments( vobj, drawablep->isState(LLDrawable::RIGGED),&ratPtr);
+ }
+
LLVolume* volume = vobj->getVolume();
if (volume)
{
@@ -6088,6 +6095,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();
@@ -6097,6 +6105,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"))
{
@@ -6466,10 +6479,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