From d7603ffc9c94a6cdab94bc23745903c7fff25ff1 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 24 Jan 2022 16:33:44 +0200 Subject: SL-16627 AutoFPS first pass --- indra/newview/pipeline.cpp | 120 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 118 insertions(+), 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index dd9999d73a..96dd0b895d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -43,6 +43,7 @@ #include "llui.h" #include "llglheaders.h" #include "llrender.h" +#include "llstartup.h" #include "llwindow.h" // swapBuffers() // newview includes @@ -405,7 +406,8 @@ LLPipeline::LLPipeline() : mLightMovingMask(0), mLightingDetail(0), mScreenWidth(0), - mScreenHeight(0) + mScreenHeight(0), + mUpdateTimer(new LLTimer()) { mNoiseMap = 0; mTrueNoiseMap = 0; @@ -613,7 +615,7 @@ void LLPipeline::init() LLPipeline::~LLPipeline() { - + delete mUpdateTimer; } void LLPipeline::cleanup() @@ -11428,3 +11430,117 @@ void LLPipeline::restoreHiddenObject( const LLUUID& id ) } } +const F32 MIN_DRAW_DISTANCE = 64; +const F32 MAX_DRAW_DISTANCE = 256; + +void update_far_clip(F32 fps_dif) +{ + F32 DIST_PER_FRAME_DIF = 16; + + F32 new_far_clip = llclamp(LLPipeline::RenderFarClip - llmin(fps_dif * DIST_PER_FRAME_DIF, (F32)128), MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE); + gSavedSettings.setF32("RenderFarClip", new_far_clip); +} + +void update_max_non_impostors(F32 fps_dif, S32 max_avatars) +{ + const F32 IMPOSTORS_PER_FRAME_DIF = 0.5; + + U32 new_non_imp = (U32)llclamp((S32)(LLVOAvatar::sMaxNonImpostors - llmin((S32)(fps_dif / IMPOSTORS_PER_FRAME_DIF), 10)), 1, max_avatars); + gSavedSettings.setU32("RenderAvatarMaxNonImpostors", new_non_imp); +} + +void LLPipeline::autoAdjustSettings() +{ + static LLCachedControl use_auto_adjustment(gSavedSettings,"AutoFPS"); + if (!use_auto_adjustment) + { + return; + } + + if (LLStartUp::getStartupState() < STATE_STARTED || LLApp::isExiting()) + { + return; + } + + static LLCachedControl adjustment_timeout(gSavedSettings, "AutoAdjustmentTimeout"); + static LLCachedControl initial_adjustment_timeout(gSavedSettings, "InitialAdjustmentTimeout"); + + static LLCachedControl fps_lower_boundary(gSavedSettings, "AutoFPSLowerBoundary"); + static LLCachedControl fps_upper_boundary(gSavedSettings, "AutoFPSUpperBoundary"); + + if (gViewerWindow && gViewerWindow->getWindow()->getVisible() + && gFocusMgr.getAppHasFocus() && !gTeleportDisplay) + { + static bool is_init = false; + if (!is_init) + { + //wait for FPS to stabilize after login in-world + mUpdateTimer->setTimerExpirySec((F32)initial_adjustment_timeout); + is_init = true; + } + if (mUpdateTimer->hasExpired()) + { + mUpdateTimer->setTimerExpirySec((F32)adjustment_timeout); + + const S32 FPS_STAT_PERIODS = 50; + S32 fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, FPS_STAT_PERIODS)); + if (fps < fps_lower_boundary) + { + S32 fps_dif = fps_lower_boundary - fps; + + if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0) + { + S32 shadow_detail = RenderShadowDetail - 1; + gSavedSettings.setS32("RenderShadowDetail", shadow_detail); + return; + } + + if (RenderFarClip > MIN_DRAW_DISTANCE) + { + update_far_clip(fps_dif); + } + + std::vector valid_nearby_avs; + LLWorld::getInstance()->getNearbyAvatarsAndCompl(valid_nearby_avs); + + if (valid_nearby_avs.size() > 1 && LLVOAvatar::sMaxNonImpostors > 1) + { + update_max_non_impostors(fps_dif, valid_nearby_avs.size()); + } + } + else if (fps > fps_upper_boundary) + { + S32 fps_dif = fps_upper_boundary - fps; + + std::vector valid_nearby_avs; + LLWorld::getInstance()->getNearbyAvatarsAndCompl(valid_nearby_avs); + if (valid_nearby_avs.size() > 1 && (LLVOAvatar::sMaxNonImpostors < valid_nearby_avs.size())) + { + update_max_non_impostors(fps_dif, valid_nearby_avs.size()); + return; + } + + if (RenderFarClip < MAX_DRAW_DISTANCE) + { + update_far_clip(fps_dif); + } + + if (LLPipeline::sRenderDeferred && RenderShadowDetail < 2) + { + S32 shadow_detail = RenderShadowDetail + 1; + gSavedSettings.setS32("RenderShadowDetail", shadow_detail); + } + } + } + } + else + { + //wait for FPS to stabilize if the window was minimized or not focused before + mUpdateTimer->setTimerExpirySec((F32)initial_adjustment_timeout); + } +} + +void LLPipeline::setAdjustmentTimerExpiry(F32 expiration) +{ + mUpdateTimer->setTimerExpirySec(expiration); +} -- cgit v1.2.3 From 95f7b552adf179b47cb74a4e39581e8d9c58dddc Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 14 Feb 2022 18:59:55 +0200 Subject: SL-16841 Skip rendering shadows when decreasing shadow detail setting to avoid stalls --- indra/newview/pipeline.cpp | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 96dd0b895d..c895c8a227 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -10215,14 +10215,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (mSunDiffuse == LLColor4::black) { //sun diffuse is totally black, shadows don't matter - LLGLDepthTest depth(GL_TRUE); - - for (S32 j = 0; j < 4; j++) - { - mShadow[j].bindTarget(); - mShadow[j].clear(); - mShadow[j].flush(); - } + skipRenderingShadows(); } else { @@ -11430,6 +11423,30 @@ void LLPipeline::restoreHiddenObject( const LLUUID& id ) } } +void LLPipeline::skipRenderingShadows() +{ + LLGLDepthTest depth(GL_TRUE); + + for (S32 j = 0; j < 4; j++) + { + mShadow[j].bindTarget(); + mShadow[j].clear(); + mShadow[j].flush(); + } +} + +void LLPipeline::handleShadowDetailChanged() +{ + if (RenderShadowDetail > gSavedSettings.getS32("RenderShadowDetail")) + { + skipRenderingShadows(); + } + else + { + LLViewerShaderMgr::instance()->setShaders(); + } +} + const F32 MIN_DRAW_DISTANCE = 64; const F32 MAX_DRAW_DISTANCE = 256; -- cgit v1.2.3 From 808684ee4fe0d9ed3868d0ee86d9cc28f32fcfcb Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 18 Feb 2022 12:34:38 +0200 Subject: SL-16841 Disable shadow splits one by one to improve FPS instead of disabling all shadows at once --- indra/newview/pipeline.cpp | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c895c8a227..d3936fabcf 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -150,6 +150,7 @@ U32 LLPipeline::RenderFSAASamples; U32 LLPipeline::RenderResolutionDivisor; bool LLPipeline::RenderUIBuffer; S32 LLPipeline::RenderShadowDetail; +S32 LLPipeline::RenderShadowSplits; bool LLPipeline::RenderDeferredSSAO; F32 LLPipeline::RenderShadowResolutionScale; bool LLPipeline::RenderLocalLights; @@ -544,6 +545,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderResolutionDivisor"); connectRefreshCachedSettingsSafe("RenderUIBuffer"); connectRefreshCachedSettingsSafe("RenderShadowDetail"); + connectRefreshCachedSettingsSafe("RenderShadowSplits"); connectRefreshCachedSettingsSafe("RenderDeferredSSAO"); connectRefreshCachedSettingsSafe("RenderShadowResolutionScale"); connectRefreshCachedSettingsSafe("RenderLocalLights"); @@ -611,6 +613,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("CameraDoFResScale"); connectRefreshCachedSettingsSafe("RenderAutoHideSurfaceAreaLimit"); gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); + gSavedSettings.getControl("AutoFPS")->getCommitSignal()->connect(boost::bind(&LLPipeline::onToggleAutoFPS)); } LLPipeline::~LLPipeline() @@ -1073,6 +1076,7 @@ void LLPipeline::refreshCachedSettings() RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor"); RenderUIBuffer = gSavedSettings.getBOOL("RenderUIBuffer"); RenderShadowDetail = gSavedSettings.getS32("RenderShadowDetail"); + RenderShadowSplits = gSavedSettings.getS32("RenderShadowSplits"); RenderDeferredSSAO = gSavedSettings.getBOOL("RenderDeferredSSAO"); RenderShadowResolutionScale = gSavedSettings.getF32("RenderShadowResolutionScale"); RenderLocalLights = gSavedSettings.getBOOL("RenderLocalLights"); @@ -10270,7 +10274,8 @@ void LLPipeline::generateSunShadow(LLCamera& camera) std::vector fp; - if (!gPipeline.getVisiblePointCloud(shadow_cam, min, max, fp, lightDir)) + if (!gPipeline.getVisiblePointCloud(shadow_cam, min, max, fp, lightDir) + || j > RenderShadowSplits) { //no possible shadow receivers if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)) @@ -11505,10 +11510,10 @@ void LLPipeline::autoAdjustSettings() { S32 fps_dif = fps_lower_boundary - fps; - if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0) + if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits > 0) { - S32 shadow_detail = RenderShadowDetail - 1; - gSavedSettings.setS32("RenderShadowDetail", shadow_detail); + S32 shadow_splits = llclamp(RenderShadowSplits - 1, 0, 3); + gSavedSettings.setS32("RenderShadowSplits", shadow_splits); return; } @@ -11542,10 +11547,10 @@ void LLPipeline::autoAdjustSettings() update_far_clip(fps_dif); } - if (LLPipeline::sRenderDeferred && RenderShadowDetail < 2) + if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits < 3) { - S32 shadow_detail = RenderShadowDetail + 1; - gSavedSettings.setS32("RenderShadowDetail", shadow_detail); + S32 shadow_splits = llclamp(RenderShadowSplits + 1, 0, 3); + gSavedSettings.setS32("RenderShadowSplits", shadow_splits); } } } @@ -11561,3 +11566,13 @@ void LLPipeline::setAdjustmentTimerExpiry(F32 expiration) { mUpdateTimer->setTimerExpirySec(expiration); } + +void LLPipeline::onToggleAutoFPS() +{ + if (!gSavedSettings.getBOOL("AutoFPS")) + { + //reset the number of shadow map splits rendered, when disabling auto-fps + //probably should be removed, if we'll have actual UI control for this setting + gSavedSettings.setS32("RenderShadowSplits", 3); + } +} -- cgit v1.2.3 From 882600de2afa366729be870355767282247be0ef Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 18 Feb 2022 18:30:59 +0200 Subject: SL-16627 water reflection detail settings should be affected by auto-adjustment --- indra/newview/pipeline.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index d3936fabcf..6738532bc3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -132,7 +132,7 @@ // NOTE: Keep in sync with indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml // NOTE: Unused consts are commented out since some compilers (on macOS) may complain about unused variables. -// const S32 WATER_REFLECT_NONE_WATER_OPAQUE = -2; + const S32 WATER_REFLECT_NONE_WATER_OPAQUE = -2; const S32 WATER_REFLECT_NONE_WATER_TRANSPARENT = -1; const S32 WATER_REFLECT_MINIMAL = 0; // const S32 WATER_REFLECT_TERRAIN = 1; @@ -11510,6 +11510,13 @@ void LLPipeline::autoAdjustSettings() { S32 fps_dif = fps_lower_boundary - fps; + if (sWaterReflections && RenderReflectionDetail > WATER_REFLECT_NONE_WATER_OPAQUE) + { + S32 reflection_detail = llclamp(RenderReflectionDetail - 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL); + gSavedSettings.setS32("RenderReflectionDetail", reflection_detail); + return; + } + if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits > 0) { S32 shadow_splits = llclamp(RenderShadowSplits - 1, 0, 3); @@ -11551,6 +11558,13 @@ void LLPipeline::autoAdjustSettings() { S32 shadow_splits = llclamp(RenderShadowSplits + 1, 0, 3); gSavedSettings.setS32("RenderShadowSplits", shadow_splits); + return; + } + + if (sWaterReflections && RenderReflectionDetail < WATER_REFLECT_MINIMAL) + { + S32 reflection_detail = llclamp(RenderReflectionDetail + 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL); + gSavedSettings.setS32("RenderReflectionDetail", reflection_detail); } } } -- cgit v1.2.3 From 81c287f877a48381bfa212ad00fe23aef260ef5f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 22 Sep 2022 20:34:29 +0300 Subject: SL-18202 WIP merging autotune contribution and updating UI #2 --- indra/newview/pipeline.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7044d27430..2a059e5db4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -10853,10 +10853,12 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar) << " is " << ( too_complex ? "" : "not ") << "too complex" << LL_ENDL; - pushRenderTypeMask(); - - if (visually_muted || too_complex) - { + bool too_slow = avatar->isTooSlowWithoutShadows(); // only if we really have to do we imposter. + + pushRenderTypeMask(); + + if ( !too_slow && ( visually_muted || too_complex ) ) + { // only show jelly doll geometry andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, LLPipeline::RENDER_TYPE_CONTROL_AV, -- cgit v1.2.3 From 3098d315a34f6d9e1bdf0f0de4e695a89626282f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 23 Sep 2022 16:49:47 +0300 Subject: SL-18202 remove old autofps --- indra/newview/pipeline.cpp | 143 +-------------------------------------------- 1 file changed, 1 insertion(+), 142 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2a059e5db4..3110a1cbe5 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -409,8 +409,7 @@ LLPipeline::LLPipeline() : mLightMovingMask(0), mLightingDetail(0), mScreenWidth(0), - mScreenHeight(0), - mUpdateTimer(new LLTimer()) + mScreenHeight(0) { mNoiseMap = 0; mTrueNoiseMap = 0; @@ -615,12 +614,10 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("CameraDoFResScale"); connectRefreshCachedSettingsSafe("RenderAutoHideSurfaceAreaLimit"); gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); - gSavedSettings.getControl("AutoFPS")->getCommitSignal()->connect(boost::bind(&LLPipeline::onToggleAutoFPS)); } LLPipeline::~LLPipeline() { - delete mUpdateTimer; } void LLPipeline::cleanup() @@ -11522,141 +11519,3 @@ void LLPipeline::handleShadowDetailChanged() } } -const F32 MIN_DRAW_DISTANCE = 64; -const F32 MAX_DRAW_DISTANCE = 256; - -void update_far_clip(F32 fps_dif) -{ - F32 DIST_PER_FRAME_DIF = 16; - - F32 new_far_clip = llclamp(LLPipeline::RenderFarClip - llmin(fps_dif * DIST_PER_FRAME_DIF, (F32)128), MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE); - gSavedSettings.setF32("RenderFarClip", new_far_clip); -} - -void update_max_non_impostors(F32 fps_dif, S32 max_avatars) -{ - const F32 IMPOSTORS_PER_FRAME_DIF = 0.5; - - U32 new_non_imp = (U32)llclamp((S32)(LLVOAvatar::sMaxNonImpostors - llmin((S32)(fps_dif / IMPOSTORS_PER_FRAME_DIF), 10)), 1, max_avatars); - gSavedSettings.setU32("RenderAvatarMaxNonImpostors", new_non_imp); -} - -void LLPipeline::autoAdjustSettings() -{ - static LLCachedControl use_auto_adjustment(gSavedSettings,"AutoFPS"); - if (!use_auto_adjustment) - { - return; - } - - if (LLStartUp::getStartupState() < STATE_STARTED || LLApp::isExiting()) - { - return; - } - - static LLCachedControl adjustment_timeout(gSavedSettings, "AutoAdjustmentTimeout"); - static LLCachedControl initial_adjustment_timeout(gSavedSettings, "InitialAdjustmentTimeout"); - - static LLCachedControl fps_lower_boundary(gSavedSettings, "AutoFPSLowerBoundary"); - static LLCachedControl fps_upper_boundary(gSavedSettings, "AutoFPSUpperBoundary"); - - if (gViewerWindow && gViewerWindow->getWindow()->getVisible() - && gFocusMgr.getAppHasFocus() && !gTeleportDisplay) - { - static bool is_init = false; - if (!is_init) - { - //wait for FPS to stabilize after login in-world - mUpdateTimer->setTimerExpirySec((F32)initial_adjustment_timeout); - is_init = true; - } - if (mUpdateTimer->hasExpired()) - { - mUpdateTimer->setTimerExpirySec((F32)adjustment_timeout); - - const S32 FPS_STAT_PERIODS = 50; - S32 fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, FPS_STAT_PERIODS)); - if (fps < fps_lower_boundary) - { - S32 fps_dif = fps_lower_boundary - fps; - - if (sWaterReflections && RenderReflectionDetail > WATER_REFLECT_NONE_WATER_OPAQUE) - { - S32 reflection_detail = llclamp(RenderReflectionDetail - 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL); - gSavedSettings.setS32("RenderReflectionDetail", reflection_detail); - return; - } - - if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits > 0) - { - S32 shadow_splits = llclamp(RenderShadowSplits - 1, 0, 3); - gSavedSettings.setS32("RenderShadowSplits", shadow_splits); - return; - } - - if (RenderFarClip > MIN_DRAW_DISTANCE) - { - update_far_clip(fps_dif); - } - - std::vector valid_nearby_avs; - LLWorld::getInstance()->getNearbyAvatarsAndCompl(valid_nearby_avs); - - if (valid_nearby_avs.size() > 1 && LLVOAvatar::sMaxNonImpostors > 1) - { - update_max_non_impostors(fps_dif, valid_nearby_avs.size()); - } - } - else if (fps > fps_upper_boundary) - { - S32 fps_dif = fps_upper_boundary - fps; - - std::vector valid_nearby_avs; - LLWorld::getInstance()->getNearbyAvatarsAndCompl(valid_nearby_avs); - if (valid_nearby_avs.size() > 1 && (LLVOAvatar::sMaxNonImpostors < valid_nearby_avs.size())) - { - update_max_non_impostors(fps_dif, valid_nearby_avs.size()); - return; - } - - if (RenderFarClip < MAX_DRAW_DISTANCE) - { - update_far_clip(fps_dif); - } - - if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits < 3) - { - S32 shadow_splits = llclamp(RenderShadowSplits + 1, 0, 3); - gSavedSettings.setS32("RenderShadowSplits", shadow_splits); - return; - } - - if (sWaterReflections && RenderReflectionDetail < WATER_REFLECT_MINIMAL) - { - S32 reflection_detail = llclamp(RenderReflectionDetail + 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL); - gSavedSettings.setS32("RenderReflectionDetail", reflection_detail); - } - } - } - } - else - { - //wait for FPS to stabilize if the window was minimized or not focused before - mUpdateTimer->setTimerExpirySec((F32)initial_adjustment_timeout); - } -} - -void LLPipeline::setAdjustmentTimerExpiry(F32 expiration) -{ - mUpdateTimer->setTimerExpirySec(expiration); -} - -void LLPipeline::onToggleAutoFPS() -{ - if (!gSavedSettings.getBOOL("AutoFPS")) - { - //reset the number of shadow map splits rendered, when disabling auto-fps - //probably should be removed, if we'll have actual UI control for this setting - gSavedSettings.setS32("RenderShadowSplits", 3); - } -} -- cgit v1.2.3 From dcd74c98dc5ab1373f1e7f692fd30dee92472acf Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 27 Sep 2022 19:35:49 +0300 Subject: SL-18202 impostor too slow avatars and add autotune settings button to Preference --- 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 3110a1cbe5..ba5e35fd3e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -132,7 +132,7 @@ // NOTE: Keep in sync with indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml // NOTE: Unused consts are commented out since some compilers (on macOS) may complain about unused variables. - const S32 WATER_REFLECT_NONE_WATER_OPAQUE = -2; +// const S32 WATER_REFLECT_NONE_WATER_OPAQUE = -2; const S32 WATER_REFLECT_NONE_WATER_TRANSPARENT = -1; const S32 WATER_REFLECT_MINIMAL = 0; // const S32 WATER_REFLECT_TERRAIN = 1; @@ -5993,7 +5993,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) LLDrawable* drawable = light->drawable; const LLViewerObject *vobj = light->drawable->getVObj(); if(vobj && vobj->getAvatar() - && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList()) + && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList() || vobj->getAvatar()->isTooSlowWithShadows()) ) { drawable->clearState(LLDrawable::NEARBY_LIGHT); @@ -6072,7 +6072,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) continue; } LLVOAvatar * av = light->getAvatar(); - if (av && (av->isTooComplex() || av->isInMuteList())) + if (av && (av->isTooComplex() || av->isInMuteList() || av->isTooSlowWithShadows())) { // avatars that are already in the list will be removed by removeMutedAVsLights continue; @@ -10850,7 +10850,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar) << " is " << ( too_complex ? "" : "not ") << "too complex" << LL_ENDL; - bool too_slow = avatar->isTooSlowWithoutShadows(); // only if we really have to do we imposter. + bool too_slow = avatar->isTooSlowWithShadows(); pushRenderTypeMask(); -- cgit v1.2.3 From 0ee82f5264067e22013c49abf19344172c2f658b Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 17 Nov 2022 15:04:38 +0200 Subject: SL-18641 fix for 'Always display friends in full detail' setting --- indra/newview/pipeline.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 500cea98fb..3e78c9b82c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -5993,7 +5993,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) LLDrawable* drawable = light->drawable; const LLViewerObject *vobj = light->drawable->getVObj(); if(vobj && vobj->getAvatar() - && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList() || vobj->getAvatar()->isTooSlowWithShadows()) + && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList() || vobj->getAvatar()->isTooSlow()) ) { drawable->clearState(LLDrawable::NEARBY_LIGHT); @@ -6072,7 +6072,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) continue; } LLVOAvatar * av = light->getAvatar(); - if (av && (av->isTooComplex() || av->isInMuteList() || av->isTooSlowWithShadows())) + if (av && (av->isTooComplex() || av->isInMuteList() || av->isTooSlow())) { // avatars that are already in the list will be removed by removeMutedAVsLights continue; @@ -10856,7 +10856,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar) << " is " << ( too_complex ? "" : "not ") << "too complex" << LL_ENDL; - bool too_slow = avatar->isTooSlowWithShadows(); + bool too_slow = avatar->isTooSlow(); pushRenderTypeMask(); -- cgit v1.2.3 From 495e34b84fa34ae5394f33f6f1175e959c56e769 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 10 Jan 2023 16:29:28 +0200 Subject: SL-18922 FIXED Imposters load with attachments using Perf floater --- indra/newview/pipeline.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ad47b3d154..51d7082b40 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -10871,11 +10871,9 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar) << " is " << ( too_complex ? "" : "not ") << "too complex" << LL_ENDL; - bool too_slow = avatar->isTooSlow(); - pushRenderTypeMask(); - if ( !too_slow && ( visually_muted || too_complex ) ) + if (visually_muted || too_complex) { // only show jelly doll geometry andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, -- cgit v1.2.3