From 3cf8a1ce6e81c30cf7231a5ab045bbc45c6757e2 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 20 Feb 2015 12:56:45 -0500 Subject: Clean up impostors and visual muting Rename the settings that control them to be more descriptive Remove the separate boolean setting (RenderUseImpostors) that governed both Establish default values based on gpu class for impostors and visual muting --- indra/newview/pipeline.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 03712c1065..6002b5a4eb 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -569,7 +569,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaDeferred"); connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred"); connectRefreshCachedSettingsSafe("RenderUseFarClip"); - connectRefreshCachedSettingsSafe("RenderAvatarMaxVisible"); + connectRefreshCachedSettingsSafe("RenderAvatarMaxNonImpostors"); connectRefreshCachedSettingsSafe("RenderDelayVBUpdate"); connectRefreshCachedSettingsSafe("UseOcclusion"); connectRefreshCachedSettingsSafe("VertexShaderEnable"); @@ -1081,7 +1081,8 @@ void LLPipeline::refreshCachedSettings() LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred"); LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred"); LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip"); - LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLVOAvatar::sMaxNonImpostors = gSavedSettings.getU32("RenderAvatarMaxNonImpostors"); + LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors); LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate"); LLPipeline::sUseOcclusion = @@ -11357,7 +11358,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) { LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE); markVisible(avatar->mDrawable, *viewer_camera); - LLVOAvatar::sUseImpostors = FALSE; + LLVOAvatar::sUseImpostors = false; // @TODO why? LLVOAvatar::attachment_map_t::iterator iter; for (iter = avatar->mAttachmentPoints.begin(); @@ -11594,7 +11595,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) avatar->setImpostorDim(tdim); - LLVOAvatar::sUseImpostors = TRUE; + LLVOAvatar::sUseImpostors = true; // @TODO why? sUseOcclusion = occlusion; sReflectionRender = FALSE; sImpostorRender = FALSE; -- cgit v1.2.3 From 1da60c1d92e7af7d9f3de141574179717cf1e9cd Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 17 Apr 2015 13:37:46 -0400 Subject: reorganize visual muting, impostors, and complexity criteria [does not render correctly yet] --- indra/newview/pipeline.cpp | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6002b5a4eb..0536a2bbcf 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -11294,6 +11294,17 @@ static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { + LL_WARNS("AvatarRenderPipeline"); + if (avatar) + { + LL_CONT << "Avatar " << avatar->getID() << " is " << (avatar->mDrawable?"":"not ") << "drawable"; + } + else + { + LL_CONT << " is null"; + } + LL_CONT << LL_ENDL; + LLGLState::checkStates(); LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); @@ -11310,10 +11321,17 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) assertInitialized(); bool visually_muted = avatar->isVisuallyMuted(); + LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() + << " is " << ( visually_muted ? "" : "not ") << "visually muted" + << LL_ENDL; + bool too_complex = avatar->isTooComplex(); + LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() + << " is " << ( too_complex ? "" : "not ") << "too complex" + << LL_ENDL; pushRenderTypeMask(); - if (visually_muted) + if (visually_muted || too_complex) { andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES); } @@ -11358,7 +11376,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) { LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE); markVisible(avatar->mDrawable, *viewer_camera); - LLVOAvatar::sUseImpostors = false; // @TODO why? + LLVOAvatar::sUseImpostors = false; // @TODO ??? LLVOAvatar::attachment_map_t::iterator iter; for (iter = avatar->mAttachmentPoints.begin(); @@ -11471,7 +11489,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) F32 old_alpha = LLDrawPoolAvatar::sMinimumAlpha; - if (visually_muted) + if (visually_muted || too_complex) { //disable alpha masking for muted avatars (get whole skin silhouette) LLDrawPoolAvatar::sMinimumAlpha = 0.f; } @@ -11533,7 +11551,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLGLDisable blend(GL_BLEND); - if (visually_muted) + if (too_complex) { gGL.setColorMask(true, true); } @@ -11562,14 +11580,16 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) } - if (LLMuteList::getInstance()->isMuted(avatar->getID())) - { //grey muted avatar - gGL.diffuseColor4ub(64,64,64,255); - } - else + if (avatar->isTooComplex()) { // Visually muted avatar + LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set jellybaby" << LL_ENDL; gGL.diffuseColor4fv( avatar->getMutedAVColor().mV ); } + else + { //grey muted avatar + LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set grey" << LL_ENDL; + gGL.diffuseColor4ub(64,64,64,255); + } { gGL.begin(LLRender::QUADS); @@ -11595,7 +11615,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) avatar->setImpostorDim(tdim); - LLVOAvatar::sUseImpostors = true; // @TODO why? + LLVOAvatar::sUseImpostors = true; // @TODO ??? sUseOcclusion = occlusion; sReflectionRender = FALSE; sImpostorRender = FALSE; -- cgit v1.2.3 From 91d6b088279443abf08285e225b29317d90c8e95 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 15 May 2015 15:31:29 -0400 Subject: additional debugging code for the problem with rendering too-complex avatars --- indra/newview/pipeline.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0536a2bbcf..801422b83b 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -11294,7 +11294,7 @@ static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { - LL_WARNS("AvatarRenderPipeline"); + LL_WARNS_ONCE("AvatarRenderPipeline"); if (avatar) { LL_CONT << "Avatar " << avatar->getID() << " is " << (avatar->mDrawable?"":"not ") << "drawable"; @@ -11321,11 +11321,11 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) assertInitialized(); bool visually_muted = avatar->isVisuallyMuted(); - LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() + LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is " << ( visually_muted ? "" : "not ") << "visually muted" << LL_ENDL; bool too_complex = avatar->isTooComplex(); - LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() + LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is " << ( too_complex ? "" : "not ") << "too complex" << LL_ENDL; @@ -11580,14 +11580,15 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) } - if (avatar->isTooComplex()) + if (too_complex) { // Visually muted avatar - LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set jellybaby" << LL_ENDL; - gGL.diffuseColor4fv( avatar->getMutedAVColor().mV ); + LLColor4 muted_color(avatar->getMutedAVColor()); + LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set jellybaby " << muted_color << LL_ENDL; + gGL.diffuseColor4fv( muted_color.mV ); } else { //grey muted avatar - LL_DEBUGS("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set grey" << LL_ENDL; + LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set grey" << LL_ENDL; gGL.diffuseColor4ub(64,64,64,255); } -- cgit v1.2.3 From c8d98358a6291282510cd1be014017c63d547375 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 20 May 2015 16:37:29 -0400 Subject: correct logging to avoid linux compiler finikieness --- indra/newview/pipeline.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 801422b83b..945ba3993a 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -11294,17 +11294,6 @@ static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { - LL_WARNS_ONCE("AvatarRenderPipeline"); - if (avatar) - { - LL_CONT << "Avatar " << avatar->getID() << " is " << (avatar->mDrawable?"":"not ") << "drawable"; - } - else - { - LL_CONT << " is null"; - } - LL_CONT << LL_ENDL; - LLGLState::checkStates(); LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); @@ -11315,8 +11304,10 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) if (!avatar || !avatar->mDrawable) { + LL_WARNS_ONCE("AvatarRenderPipeline") << "Avatar is " << (avatar ? "not drawable" : "null") << LL_ENDL; return; } + LL_DEBUG_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is drawable" << LL_ENDL; assertInitialized(); -- cgit v1.2.3 From 96d16928600dbf3666221a19575af9330840cfd5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 21 May 2015 10:21:59 -0400 Subject: log macro typo --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 945ba3993a..6aae95967a 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -11307,7 +11307,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LL_WARNS_ONCE("AvatarRenderPipeline") << "Avatar is " << (avatar ? "not drawable" : "null") << LL_ENDL; return; } - LL_DEBUG_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is drawable" << LL_ENDL; + LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is drawable" << LL_ENDL; assertInitialized(); -- cgit v1.2.3 From 0dba9289203080fe420d3112a8c3f0a01a2450dd Mon Sep 17 00:00:00 2001 From: Drake Arconis Date: Tue, 30 Jun 2015 10:48:34 -0400 Subject: Fix impostors. --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6aae95967a..4365c28a5e 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -11542,7 +11542,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLGLDisable blend(GL_BLEND); - if (too_complex) + if (visually_muted || too_complex) { gGL.setColorMask(true, true); } -- cgit v1.2.3 From 58db3502238db8c1580783d6d89bf8946bc863da Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 11 Sep 2015 17:59:29 -0400 Subject: MAINT-5622: correct rendering of explicitly derendered and blocked avatars --- indra/newview/pipeline.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4365c28a5e..46e25b8b04 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -11571,16 +11571,16 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) } - if (too_complex) + if (visually_muted) { // Visually muted avatar LLColor4 muted_color(avatar->getMutedAVColor()); - LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set jellybaby " << muted_color << LL_ENDL; + LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set solid color " << muted_color << LL_ENDL; gGL.diffuseColor4fv( muted_color.mV ); } else { //grey muted avatar - LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set grey" << LL_ENDL; - gGL.diffuseColor4ub(64,64,64,255); + LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set grey" << LL_ENDL; + gGL.diffuseColor4fv(LLColor4::pink.mV ); } { -- cgit v1.2.3 From c8726aba303bcf1207b730a344536e25491420bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 10 Nov 2015 09:48:56 -0500 Subject: remove execute permission from many files that should not have it --- indra/newview/pipeline.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 indra/newview/pipeline.cpp (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp old mode 100755 new mode 100644 -- cgit v1.2.3 From d3b4f34eb7ff80315f1d714aa50bc7d7d33f9855 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 27 Nov 2015 17:07:37 +0200 Subject: MAINT-5685 FIXED light still renders when complexity threshold is reached --- indra/newview/pipeline.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 46e25b8b04..64308afdc2 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6112,6 +6112,13 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) { const Light* light = &(*iter); LLDrawable* drawable = light->drawable; + const LLViewerObject *vobj = light->drawable->getVObj(); + if(vobj && vobj->getAvatar() && vobj->getAvatar()->isTooComplex()) + { + drawable->clearState(LLDrawable::NEARBY_LIGHT); + continue; + } + LLVOVolume* volight = drawable->getVOVolume(); if (!volight || !drawable->isState(LLDrawable::LIGHT)) { -- cgit v1.2.3 From 0ffc4f2667806653d1f0548fdda7eb91bdea5025 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 2 Mar 2016 18:35:43 +0200 Subject: MAINT-5700 [QuickGraphics-RC] Blocked avatars should always be derendered --- indra/newview/pipeline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4d1725e927..a4d41164e5 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3114,7 +3114,9 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) if (vobj) // this test may not be needed, see above { LLVOAvatar* av = vobj->asAvatar(); - if (av && av->isImpostor()) + if (av && (av->isImpostor() + || av->isInMuteList() + || (LLVOAvatar::AV_DO_NOT_RENDER == av->getVisualMuteSettings() && !av->needsImpostorUpdate()) )) { return; } -- cgit v1.2.3