From 9fdca96f8bd2211a99fe88e57b70cbecefa20b6d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 8 Jul 2024 20:27:14 +0200 Subject: Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now --- indra/newview/llspatialpartition.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 782d57aed8..dd5916818c 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2035,7 +2035,7 @@ void renderNormals(LLDrawable *drawablep) obj_scale.normalize3(); // Create inverse-scale vector for normals - inv_scale.set(1.0 / scale_v3.mV[VX], 1.0 / scale_v3.mV[VY], 1.0 / scale_v3.mV[VZ], 0.0); + inv_scale.set(1.0f / scale_v3.mV[VX], 1.0f / scale_v3.mV[VY], 1.0f/ scale_v3.mV[VZ], 0.0f); inv_scale.mul(inv_scale); // Squared, to apply inverse scale twice inv_scale.normalize3fast(); @@ -2763,7 +2763,7 @@ void renderTexelDensity(LLDrawable* drawable) break; } - checkerboard_matrix.initScale(LLVector3(texturep->getWidth(discard_level) / 8, texturep->getHeight(discard_level) / 8, 1.f)); + checkerboard_matrix.initScale(LLVector3((F32)texturep->getWidth(discard_level) / 8.f, (F32)texturep->getHeight(discard_level) / 8.f, 1.f)); gGL.getTexUnit(0)->bind(LLViewerTexture::sCheckerBoardImagep, true); gGL.matrixMode(LLRender::MM_TEXTURE); -- cgit v1.2.3 From 2a7030992faa12c362d3eb9365080efd8265e15f Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Tue, 9 Jul 2024 17:53:43 -0400 Subject: Update tracy profiler to 0.10 (#1946) --- indra/newview/llspatialpartition.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index dd5916818c..05c5bb14c6 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -409,7 +409,7 @@ LLSpatialGroup* LLSpatialGroup::getParent() bool LLSpatialGroup::removeObject(LLDrawable *drawablep, bool from_octree) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL + LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; if(!drawablep) { @@ -634,7 +634,7 @@ void LLSpatialGroup::updateDistance(LLCamera &camera) F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL + LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; LLVector4a eye; LLVector4a origin; @@ -729,7 +729,7 @@ F32 LLSpatialGroup::getUpdateUrgency() const bool LLSpatialGroup::changeLOD() { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL + LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; if (hasState(ALPHA_DIRTY | OBJECT_DIRTY)) { @@ -818,7 +818,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node) void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL + LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; if (child->getListenerCount() == 0) { -- cgit v1.2.3 From 7679c76144057c85faabc196e0d189cebda75875 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 11 Jul 2024 12:23:17 -0500 Subject: Fix for tracy build. --- indra/newview/llspatialpartition.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 05c5bb14c6..85683a544b 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -498,7 +498,7 @@ public: void LLSpatialGroup::setState(U32 state, S32 mode) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL + LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; llassert(state <= LLSpatialGroup::STATE_MASK); @@ -547,7 +547,7 @@ public: void LLSpatialGroup::clearState(U32 state, S32 mode) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL + LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; llassert(state <= LLSpatialGroup::STATE_MASK); -- cgit v1.2.3 From 631379cbc0a3a48bc578ce2e2d9ccef31c8cfc23 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 16 Jul 2024 12:21:47 +0200 Subject: #2034 BugSplat Crash #1494883: LLCullResult::clear(3983) --- indra/newview/llspatialpartition.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 05c5bb14c6..2ff9ef1544 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3978,12 +3978,14 @@ void LLCullResult::clear() for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++) { - for (U32 j = 0; j < mRenderMapSize[i]; j++) + drawinfo_list_t& render_map = mRenderMap[i]; + U32 render_map_size = llmin((U32)render_map.size(), mRenderMapSize[i]); + for (U32 j = 0; j < render_map_size; j++) { - mRenderMap[i][j] = 0; + render_map[j] = 0; } mRenderMapSize[i] = 0; - mRenderMapEnd[i] = &(mRenderMap[i][0]); + mRenderMapEnd[i] = &render_map.front(); } } -- cgit v1.2.3 From 3f9a38bb4bf7514e575315c3c304e04e9b828c8b Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 12 Aug 2024 15:20:46 +0200 Subject: #2255 BugSplat Crash #1503774: SecondLifeViewer!LLViewerOctreeGroup::hasState(227) --- indra/newview/llspatialpartition.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index ffe5fa394f..b1f80e48af 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1051,7 +1051,8 @@ public: LLSpatialGroup* group = (LLSpatialGroup*)base_group; group->checkOcclusion(); - if (group->getOctreeNode()->getParent() && //never occlusion cull the root node + if (group->getOctreeNode() && + group->getOctreeNode()->getParent() && //never occlusion cull the root node LLPipeline::sUseOcclusion && //ignore occlusion if disabled group->isOcclusionState(LLSpatialGroup::OCCLUDED)) { -- cgit v1.2.3 From 8fef55b3b22678729d7dbd07933c0600ec7f4db8 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Thu, 22 Aug 2024 00:43:50 -0400 Subject: Remove or suppress left over debug messages in hot paths (#2392) --- indra/newview/llspatialpartition.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index b1f80e48af..8ae6073a53 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -755,14 +755,6 @@ bool LLSpatialGroup::changeLOD() if (fabsf(ratio) >= getSpatialPartition()->mSlopRatio) { - LL_DEBUGS("RiggedBox") << "changeLOD true because of ratio compare " - << fabsf(ratio) << " " << getSpatialPartition()->mSlopRatio << LL_ENDL; - LL_DEBUGS("RiggedBox") << "sg " << this << "\nmDistance " << mDistance - << " mLastUpdateDistance " << mLastUpdateDistance - << " mRadius " << mRadius - << " fab ratio " << fabsf(ratio) - << " slop " << getSpatialPartition()->mSlopRatio << LL_ENDL; - return true; } } -- cgit v1.2.3 From 1743fe92d6c6ed2615d3336ab86062fbe845c1be Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Thu, 22 Aug 2024 09:11:28 -0700 Subject: secondlife/viewer#2391: Remove avatar rigging "callstack" logging --- indra/newview/llspatialpartition.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 8ae6073a53..c2cce8c5ec 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -29,7 +29,6 @@ #include "llspatialpartition.h" #include "llappviewer.h" -#include "llcallstack.h" #include "lltexturecache.h" #include "lltexturefetch.h" #include "llimageworker.h" -- cgit v1.2.3 From 2c4fe4ff454490454d0bb71c1e5359747524048a Mon Sep 17 00:00:00 2001 From: cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:45:14 -0700 Subject: secondlife/viewer#2349: Avatar/animesh rendering correctness pass (#2364) * secondlife/viewer#2349: Blinn-Phong avatar/animesh rendering optimization/correctness pass * secondlife/viewer#2349: General avatar/animesh rendering optimization/correctness pass --- indra/newview/llspatialpartition.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index c2cce8c5ec..e517d009f5 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1667,8 +1667,9 @@ void renderOctree(LLSpatialGroup* group) glLineWidth(1.f); gGL.flush(); - LLVOAvatar* lastAvatar = nullptr; + const LLVOAvatar* lastAvatar = nullptr; U64 lastMeshId = 0; + bool skipLastSkin = false; for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { @@ -1697,15 +1698,9 @@ void renderOctree(LLSpatialGroup* group) { gGL.pushMatrix(); gGL.loadMatrix(gGLModelView); - if (lastAvatar != face->mAvatar || - lastMeshId != face->mSkinInfo->mHash) + if (!LLRenderPass::uploadMatrixPalette(face->mAvatar, face->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin)) { - if (!LLRenderPass::uploadMatrixPalette(face->mAvatar, face->mSkinInfo)) - { - continue; - } - lastAvatar = face->mAvatar; - lastMeshId = face->mSkinInfo->mHash; + continue; } } for (S32 j = 0; j < drawable->getNumFaces(); j++) -- cgit v1.2.3