summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolmaterials.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/lldrawpoolmaterials.cpp
parented92f1d8034dcaa84f808b3267c772202e7ce113 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
SL-18330: Merge branch 'main' of secondlife/viewer into xcode-14.3
Diffstat (limited to 'indra/newview/lldrawpoolmaterials.cpp')
-rw-r--r--indra/newview/lldrawpoolmaterials.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index 2b05f4c453..f2408a3294 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -32,6 +32,7 @@
#include "pipeline.h"
#include "llglcommonfunc.h"
#include "llvoavatar.h"
+#include "llperfstats.h"
S32 diffuse_channel = -1;
@@ -164,9 +165,20 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type);
- for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i)
+ std::unique_ptr<LLPerfStats::RecordAttachmentTime> ratPtr{};
+ for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i)
{
LLDrawInfo& params = **i;
+
+ if(params.mFace)
+ {
+ LLViewerObject* vobj = (LLViewerObject *)params.mFace->getViewerObject();
+
+ if( vobj && vobj->isAttachment() )
+ {
+ trackAttachments( vobj, params.mFace->isState(LLFace::RIGGED), &ratPtr );
+ }
+ }
mShader->uniform4f(LLShaderMgr::SPECULAR_COLOR, params.mSpecColor.mV[0], params.mSpecColor.mV[1], params.mSpecColor.mV[2], params.mSpecColor.mV[3]);
mShader->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, params.mEnvIntensity);