From 6339eb7393e6c84a1651f71ebea6be4ce44ccbcf Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 21 Oct 2021 16:50:09 -0700 Subject: SL-16127: Cleanup trailing whitespace --- indra/newview/llvosky.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 878d7287ed..8a4958ac06 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1,25 +1,25 @@ -/** +/** * @file llvosky.cpp * @brief LLVOSky class implementation * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -468,7 +468,7 @@ void LLVOSky::init() LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); // invariants across whole sky tex process... - m_atmosphericsVars.blue_density = psky->getBlueDensity(); + m_atmosphericsVars.blue_density = psky->getBlueDensity(); m_atmosphericsVars.blue_horizon = psky->getBlueHorizon(); m_atmosphericsVars.haze_density = psky->getHazeDensity(); m_atmosphericsVars.haze_horizon = psky->getHazeHorizon(); @@ -476,7 +476,7 @@ void LLVOSky::init() m_atmosphericsVars.max_y = psky->getMaxY(); m_atmosphericsVars.sun_norm = LLEnvironment::instance().getClampedSunNorm(); m_atmosphericsVars.sunlight = psky->getIsSunUp() ? psky->getSunlightColor() : psky->getMoonlightColor(); - m_atmosphericsVars.ambient = psky->getAmbientColor(); + m_atmosphericsVars.ambient = psky->getAmbientColor(); m_atmosphericsVars.glow = psky->getGlow(); m_atmosphericsVars.cloud_shadow = psky->getCloudShadow(); m_atmosphericsVars.dome_radius = psky->getDomeRadius(); @@ -514,7 +514,7 @@ void LLVOSky::calc() LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); // invariants across whole sky tex process... - m_atmosphericsVars.blue_density = psky->getBlueDensity(); + m_atmosphericsVars.blue_density = psky->getBlueDensity(); m_atmosphericsVars.blue_horizon = psky->getBlueHorizon(); m_atmosphericsVars.haze_density = psky->getHazeDensity(); m_atmosphericsVars.haze_horizon = psky->getHazeHorizon(); @@ -523,7 +523,7 @@ void LLVOSky::calc() m_atmosphericsVars.max_y = psky->getMaxY(); m_atmosphericsVars.sun_norm = LLEnvironment::instance().getClampedSunNorm(); m_atmosphericsVars.sunlight = psky->getIsSunUp() ? psky->getSunlightColor() : psky->getMoonlightColor(); - m_atmosphericsVars.ambient = psky->getAmbientColor(); + m_atmosphericsVars.ambient = psky->getAmbientColor(); m_atmosphericsVars.glow = psky->getGlow(); m_atmosphericsVars.cloud_shadow = psky->getCloudShadow(); m_atmosphericsVars.dome_radius = psky->getDomeRadius(); @@ -541,7 +541,7 @@ void LLVOSky::calc() mMoon.renewColor(); } -void LLVOSky::initCubeMap() +void LLVOSky::initCubeMap() { std::vector > images; for (S32 side = 0; side < NUM_CUBEMAP_FACES; side++) @@ -925,7 +925,7 @@ void LLVOSky::setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_textur { if (mSunTexturep[1]) { - mSunTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); + mSunTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); } mFace[FACE_SUN]->setTexture(LLRender::ALTERNATE_DIFFUSE_MAP, mSunTexturep[1]); } @@ -1033,7 +1033,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) for (S32 side = 0; side < NUM_CUBEMAP_FACES; ++side) { - face = mFace[FACE_SIDE0 + side]; + face = mFace[FACE_SIDE0 + side]; if (!face->getVertexBuffer()) { @@ -1164,7 +1164,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const hb.setVisible(TRUE); - facep = mFace[f]; + facep = mFace[f]; if (!facep->getVertexBuffer()) { @@ -1402,7 +1402,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, dt_clip = -0.1f; } - LLFace *face = mFace[FACE_REFLECTION]; + LLFace *face = mFace[FACE_REFLECTION]; if (face) { -- cgit v1.2.3 From 76487ce707d042cdb937dc1fe610896ef9421e80 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 21 Oct 2021 17:10:51 -0700 Subject: SL-16127: Use cache psky when possible --- indra/newview/llvosky.cpp | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 8a4958ac06..0799d63cbb 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -461,11 +461,10 @@ void LLVOSky::init() llassert(!mInitialized); // Update sky at least once to get correct initial sun/moon directions and lighting calcs performed - LLEnvironment::instance().getCurrentSky()->update(); - - updateDirections(); - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + psky->update(); + + updateDirections(psky); // invariants across whole sky tex process... m_atmosphericsVars.blue_density = psky->getBlueDensity(); @@ -592,7 +591,7 @@ void LLVOSky::restoreGL() setMoonTextures(psky->getMoonTextureId(), psky->getNextMoonTextureId()); } - updateDirections(); + updateDirections(psky); if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) { @@ -661,16 +660,14 @@ void LLVOSky::createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 } } -void LLVOSky::updateDirections(void) +void LLVOSky::updateDirections(LLSettingsSky::ptr_t psky) { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - mSun.setDirection(psky->getSunDirection()); - mMoon.setDirection(psky->getMoonDirection()); + mMoon.setDirection(psky->getMoonDirection()); mSun.setRotation(psky->getSunRotation()); - mMoon.setRotation(psky->getMoonRotation()); - mSun.renewDirection(); - mMoon.renewDirection(); + mMoon.setRotation(psky->getMoonRotation()); + mSun.renewDirection(); + mMoon.renewDirection(); } void LLVOSky::idleUpdate(LLAgent &agent, const F64 &time) @@ -717,7 +714,7 @@ bool LLVOSky::updateSky() mInterpVal = (!mInitialized) ? 1 : (F32)next_frame / cycle_frame_no; LLHeavenBody::setInterpVal( mInterpVal ); - updateDirections(); + updateDirections(psky); if (!mCubeMap) { @@ -1579,16 +1576,17 @@ void LLVOSky::setSunAndMoonDirectionsCFR(const LLVector3 &sun_dir_cfr, const LLV F32 sunDot = llmax(0.f, sun_dir_cfr.mV[2]); sunDot *= sunDot; - // Create normalized vector that has the sunDir pushed south about an hour and change. - LLVector3 adjustedDir = (sun_dir_cfr + LLVector3(0.f, -0.70711f, 0.70711f)) * 0.5f; - - // Blend between normal sun dir and adjusted sun dir based on how close we are - // to having the sun overhead. - mBumpSunDir = adjustedDir * sunDot + sun_dir_cfr * (1.0f - sunDot); - mBumpSunDir.normalize(); - } - updateDirections(); - } + // Create normalized vector that has the sunDir pushed south about an hour and change. + LLVector3 adjustedDir = (sun_dir_cfr + LLVector3(0.f, -0.70711f, 0.70711f)) * 0.5f; + + // Blend between normal sun dir and adjusted sun dir based on how close we are + // to having the sun overhead. + mBumpSunDir = adjustedDir * sunDot + sun_dir_cfr * (1.0f - sunDot); + mBumpSunDir.normalize(); + + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + updateDirections(psky); +} void LLVOSky::setSunDirectionCFR(const LLVector3 &sun_dir_cfr) { @@ -1604,16 +1602,18 @@ void LLVOSky::setSunDirectionCFR(const LLVector3 &sun_dir_cfr) // Create normalized vector that has the sunDir pushed south about an hour and change. LLVector3 adjustedDir = (sun_dir_cfr + LLVector3(0.f, -0.70711f, 0.70711f)) * 0.5f; - // Blend between normal sun dir and adjusted sun dir based on how close we are - // to having the sun overhead. - mBumpSunDir = adjustedDir * sunDot + sun_dir_cfr * (1.0f - sunDot); - mBumpSunDir.normalize(); - } - updateDirections(); + // Blend between normal sun dir and adjusted sun dir based on how close we are + // to having the sun overhead. + mBumpSunDir = adjustedDir * sunDot + sun_dir_cfr * (1.0f - sunDot); + mBumpSunDir.normalize(); + + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + updateDirections(psky); } void LLVOSky::setMoonDirectionCFR(const LLVector3 &moon_dir_cfr) { - mMoon.setDirection(moon_dir_cfr); - updateDirections(); + mMoon.setDirection(moon_dir_cfr); + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + updateDirections(psky); } -- cgit v1.2.3 From ee724fecdc1c3285cfa1a260a2fdf8f2355a68fa Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 21 Oct 2021 17:11:42 -0700 Subject: SL-16127: Cleanup indentation and whitespace to match coding style --- indra/newview/llvosky.cpp | 118 +++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 60 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 0799d63cbb..cb2b2e8dfb 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -113,7 +113,7 @@ void LLSkyTex::init(bool isShiny) mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE); mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP); mImageRaw[i] = new LLImageRaw(sResolution, sResolution, sComponents); - + initEmpty(i); } } @@ -208,7 +208,7 @@ void LLSkyTex::create() } void LLSkyTex::createGLImage(S32 which) -{ +{ mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA); mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL); mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -433,7 +433,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) { mFace[i] = NULL; } - + mCameraPosAgent = gAgentCamera.getCameraPositionAgent(); mAtmHeight = ATM_HEIGHT; mEarthCenter = LLVector3(mCameraPosAgent.mV[0], mCameraPosAgent.mV[1], -EARTH_RADIUS); @@ -547,7 +547,7 @@ void LLVOSky::initCubeMap() { images.push_back(mShinyTex[side].getImageRaw()); } - + if (!mCubeMap && gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) { mCubeMap = new LLCubeMap(false); @@ -594,9 +594,9 @@ void LLVOSky::restoreGL() updateDirections(psky); if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) - { + { initCubeMap(); - } + } forceSkyUpdate(); @@ -706,7 +706,7 @@ bool LLVOSky::updateSky() static S32 next_frame = 0; const S32 total_no_tiles = NUM_CUBEMAP_FACES * NUM_TILES; const S32 cycle_frame_no = total_no_tiles + 1; - + mNeedUpdate = mForceUpdate; ++next_frame; @@ -722,7 +722,7 @@ bool LLVOSky::updateSky() mForceUpdate = FALSE; return TRUE; } - + if (mCubeMapUpdateStage < 0) { LL_RECORD_BLOCK_TIME(FTM_VOSKY_CALC); @@ -886,10 +886,10 @@ void LLVOSky::setSunScale(F32 sun_scale) void LLVOSky::setMoonScale(F32 moon_scale) { mMoonScale = moon_scale; - } - +} + void LLVOSky::setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_texture_next) - { +{ // We test the UUIDs here because we explicitly do not want the default image returned by getFetchedTexture in that case... mSunTexturep[0] = sun_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); mSunTexturep[1] = sun_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); @@ -907,32 +907,32 @@ void LLVOSky::setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_textur LLViewerTexture* current_tex1 = mFace[FACE_SUN]->getTexture(LLRender::ALTERNATE_DIFFUSE_MAP); if (current_tex0 && (mSunTexturep[0] != current_tex0) && current_tex0->isViewerMediaTexture()) - { + { static_cast(current_tex0)->removeMediaFromFace(mFace[FACE_SUN]); } if (current_tex1 && (mSunTexturep[1] != current_tex1) && current_tex1->isViewerMediaTexture()) - { + { static_cast(current_tex1)->removeMediaFromFace(mFace[FACE_SUN]); - } + } mFace[FACE_SUN]->setTexture(LLRender::DIFFUSE_MAP, mSunTexturep[0]); if (can_use_wl) { if (mSunTexturep[1]) - { - mSunTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); - } + { + mSunTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); + } mFace[FACE_SUN]->setTexture(LLRender::ALTERNATE_DIFFUSE_MAP, mSunTexturep[1]); - } - } - } + } + } +} void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_texture_next) - { +{ LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - + bool can_use_wl = gPipeline.canUseWindLightShaders(); mMoonTexturep[0] = moon_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); @@ -941,17 +941,17 @@ void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_tex if (mFace[FACE_MOON]) { if (mMoonTexturep[0]) - { - mMoonTexturep[0]->setAddressMode(LLTexUnit::TAM_CLAMP); - } + { + mMoonTexturep[0]->setAddressMode(LLTexUnit::TAM_CLAMP); + } mFace[FACE_MOON]->setTexture(LLRender::DIFFUSE_MAP, mMoonTexturep[0]); if (mMoonTexturep[1] && can_use_wl) - { - mMoonTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); + { + mMoonTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); mFace[FACE_MOON]->setTexture(LLRender::ALTERNATE_DIFFUSE_MAP, mMoonTexturep[1]); - } - } + } + } } void LLVOSky::setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLUUID& cloud_noise_texture_next) @@ -960,7 +960,7 @@ void LLVOSky::setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLU mCloudNoiseTexturep[0] = cloud_noise_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); mCloudNoiseTexturep[1] = cloud_noise_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - + if (mCloudNoiseTexturep[0]) { mCloudNoiseTexturep[0]->setAddressMode(LLTexUnit::TAM_WRAP); @@ -983,15 +983,15 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_ mBloomTexturep[1] = bloom_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); if (mBloomTexturep[0]) -{ - mBloomTexturep[0]->setAddressMode(LLTexUnit::TAM_CLAMP); + { + mBloomTexturep[0]->setAddressMode(LLTexUnit::TAM_CLAMP); } if (mBloomTexturep[1]) - { - mBloomTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); + { + mBloomTexturep[1]->setAddressMode(LLTexUnit::TAM_CLAMP); } - } +} static LLTrace::BlockTimerStatHandle FTM_GEO_SKY("Sky Geometry"); @@ -1026,7 +1026,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) LLStrider texCoordsp; LLStrider indicesp; U16 index_offset; - LLFace *face; + LLFace *face; for (S32 side = 0; side < NUM_CUBEMAP_FACES; ++side) { @@ -1042,7 +1042,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) face->setVertexBuffer(buff); index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp); - + S32 vtx = 0; S32 curr_bit = side >> 1; // 0/1 = Z axis, 2/3 = Y, 4/5 = X S32 side_dir = side & 1; // even - 0, odd - 1 @@ -1165,7 +1165,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const if (!facep->getVertexBuffer()) { - facep->setSize(4, 6); + facep->setSize(4, 6); LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); if (!buff->allocateBuffer(facep->getGeomCount(), facep->getIndicesCount(), TRUE)) { @@ -1417,13 +1417,13 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, face->setGeomIndex(0); face->setVertexBuffer(buff); } - + LLStrider verticesp; LLStrider normalsp; LLStrider texCoordsp; LLStrider indicesp; S32 index_offset; - + index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp); if (-1 == index_offset) { @@ -1441,7 +1441,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, LLColor4 hb_refl_col = (1 - attenuation) * hb_col + attenuation * getSkyFogColor(); face->setFaceColor(hb_refl_col); - + LLVector3 v_far[2]; v_far[0] = v_refl_corner[1]; v_far[1] = v_refl_corner[3]; @@ -1565,16 +1565,15 @@ void LLVOSky::updateFog(const F32 distance) } void LLVOSky::setSunAndMoonDirectionsCFR(const LLVector3 &sun_dir_cfr, const LLVector3 &moon_dir_cfr) - { - mSun.setDirection(sun_dir_cfr); - mMoon.setDirection(moon_dir_cfr); +{ + mSun.setDirection(sun_dir_cfr); + mMoon.setDirection(moon_dir_cfr); - // Push the sun "South" as it approaches directly overhead so that we can always see bump mapping - // on the upward facing faces of cubes. - { - // Same as dot product with the up direction + clamp. - F32 sunDot = llmax(0.f, sun_dir_cfr.mV[2]); - sunDot *= sunDot; + // Push the sun "South" as it approaches directly overhead so that we can always see bump mapping + // on the upward facing faces of cubes. + // Same as dot product with the up direction + clamp. + F32 sunDot = llmax(0.f, sun_dir_cfr.mV[2]); + sunDot *= sunDot; // Create normalized vector that has the sunDir pushed south about an hour and change. LLVector3 adjustedDir = (sun_dir_cfr + LLVector3(0.f, -0.70711f, 0.70711f)) * 0.5f; @@ -1589,18 +1588,17 @@ void LLVOSky::setSunAndMoonDirectionsCFR(const LLVector3 &sun_dir_cfr, const LLV } void LLVOSky::setSunDirectionCFR(const LLVector3 &sun_dir_cfr) - { - mSun.setDirection(sun_dir_cfr); +{ + mSun.setDirection(sun_dir_cfr); - // Push the sun "South" as it approaches directly overhead so that we can always see bump mapping - // on the upward facing faces of cubes. - { - // Same as dot product with the up direction + clamp. - F32 sunDot = llmax(0.f, sun_dir_cfr.mV[2]); - sunDot *= sunDot; + // Push the sun "South" as it approaches directly overhead so that we can always see bump mapping + // on the upward facing faces of cubes. + // Same as dot product with the up direction + clamp. + F32 sunDot = llmax(0.f, sun_dir_cfr.mV[2]); + sunDot *= sunDot; - // Create normalized vector that has the sunDir pushed south about an hour and change. - LLVector3 adjustedDir = (sun_dir_cfr + LLVector3(0.f, -0.70711f, 0.70711f)) * 0.5f; + // Create normalized vector that has the sunDir pushed south about an hour and change. + LLVector3 adjustedDir = (sun_dir_cfr + LLVector3(0.f, -0.70711f, 0.70711f)) * 0.5f; // Blend between normal sun dir and adjusted sun dir based on how close we are // to having the sun overhead. -- cgit v1.2.3 From 94d08a13d5737f072231584d9f135dc44e8c6750 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 21 Oct 2021 18:40:24 -0700 Subject: SL-16127: Use cached sky --- indra/newview/llvosky.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index cb2b2e8dfb..1fd10a231a 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -491,7 +491,7 @@ void LLVOSky::init() for (S32 tile = 0; tile < NUM_TILES; ++tile) { initSkyTextureDirs(side, tile); - createSkyTexture(m_atmosphericsVars, side, tile); + createSkyTexture(psky, m_atmosphericsVars, side, tile); } mSkyTex[side].create(); mShinyTex[side].create(); @@ -639,10 +639,8 @@ void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile) } } -void LLVOSky::createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile) +void LLVOSky::createSkyTexture(LLSettingsSky::ptr_t psky, AtmosphericsVars& vars, const S32 side, const S32 tile) { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - S32 tile_x = tile % NUM_TILES_X; S32 tile_y = tile / NUM_TILES_X; @@ -812,7 +810,7 @@ bool LLVOSky::updateSky() // instead of executing per face, or may be can be moved to shaders) for (S32 tile = 0; tile < NUM_TILES; tile++) { - createSkyTexture(m_atmosphericsVars, side, tile); + createSkyTexture(psky, m_atmosphericsVars, side, tile); } mCubeMapUpdateStage++; } -- cgit v1.2.3 From de2c6826073ab1fbc83ac8a486157c177aa1f5dc Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 21 Oct 2021 18:43:35 -0700 Subject: SL-16127: Fix bug in int() not calling getDistanceMultiplier(), calc() not calling getTotalDensity() --- indra/newview/llvosky.cpp | 62 +++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 37 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 1fd10a231a..882bfe6f7d 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -466,24 +466,7 @@ void LLVOSky::init() updateDirections(psky); - // invariants across whole sky tex process... - m_atmosphericsVars.blue_density = psky->getBlueDensity(); - m_atmosphericsVars.blue_horizon = psky->getBlueHorizon(); - m_atmosphericsVars.haze_density = psky->getHazeDensity(); - m_atmosphericsVars.haze_horizon = psky->getHazeHorizon(); - m_atmosphericsVars.density_multiplier = psky->getDensityMultiplier(); - m_atmosphericsVars.max_y = psky->getMaxY(); - m_atmosphericsVars.sun_norm = LLEnvironment::instance().getClampedSunNorm(); - m_atmosphericsVars.sunlight = psky->getIsSunUp() ? psky->getSunlightColor() : psky->getMoonlightColor(); - m_atmosphericsVars.ambient = psky->getAmbientColor(); - m_atmosphericsVars.glow = psky->getGlow(); - m_atmosphericsVars.cloud_shadow = psky->getCloudShadow(); - m_atmosphericsVars.dome_radius = psky->getDomeRadius(); - m_atmosphericsVars.dome_offset = psky->getDomeOffset(); - m_atmosphericsVars.light_atten = psky->getLightAttenuation(m_atmosphericsVars.max_y); - m_atmosphericsVars.light_transmittance = psky->getLightTransmittance(m_atmosphericsVars.max_y); - m_atmosphericsVars.total_density = psky->getTotalDensity(); - m_atmosphericsVars.gamma = psky->getGamma(); + cacheEnvironment(psky,m_atmosphericsVars); // Initialize the cached normalized direction vectors for (S32 side = 0; side < NUM_CUBEMAP_FACES; ++side) @@ -508,28 +491,33 @@ void LLVOSky::init() } +void LLVOSky::cacheEnvironment(LLSettingsSky::ptr_t psky,AtmosphericsVars& atmosphericsVars) +{ + // invariants across whole sky tex process... + atmosphericsVars.blue_density = psky->getBlueDensity(); + atmosphericsVars.blue_horizon = psky->getBlueHorizon(); + atmosphericsVars.haze_density = psky->getHazeDensity(); + atmosphericsVars.haze_horizon = psky->getHazeHorizon(); + atmosphericsVars.density_multiplier = psky->getDensityMultiplier(); + atmosphericsVars.distance_multiplier = psky->getDistanceMultiplier(); + atmosphericsVars.max_y = psky->getMaxY(); + atmosphericsVars.sun_norm = LLEnvironment::instance().getClampedSunNorm(); + atmosphericsVars.sunlight = psky->getIsSunUp() ? psky->getSunlightColor() : psky->getMoonlightColor(); + atmosphericsVars.ambient = psky->getAmbientColor(); + atmosphericsVars.glow = psky->getGlow(); + atmosphericsVars.cloud_shadow = psky->getCloudShadow(); + atmosphericsVars.dome_radius = psky->getDomeRadius(); + atmosphericsVars.dome_offset = psky->getDomeOffset(); + atmosphericsVars.light_atten = psky->getLightAttenuation(atmosphericsVars.max_y); + atmosphericsVars.light_transmittance = psky->getLightTransmittance(atmosphericsVars.max_y); + atmosphericsVars.total_density = psky->getTotalDensity(); + atmosphericsVars.gamma = psky->getGamma(); +} + void LLVOSky::calc() { LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - - // invariants across whole sky tex process... - m_atmosphericsVars.blue_density = psky->getBlueDensity(); - m_atmosphericsVars.blue_horizon = psky->getBlueHorizon(); - m_atmosphericsVars.haze_density = psky->getHazeDensity(); - m_atmosphericsVars.haze_horizon = psky->getHazeHorizon(); - m_atmosphericsVars.density_multiplier = psky->getDensityMultiplier(); - m_atmosphericsVars.distance_multiplier = psky->getDistanceMultiplier(); - m_atmosphericsVars.max_y = psky->getMaxY(); - m_atmosphericsVars.sun_norm = LLEnvironment::instance().getClampedSunNorm(); - m_atmosphericsVars.sunlight = psky->getIsSunUp() ? psky->getSunlightColor() : psky->getMoonlightColor(); - m_atmosphericsVars.ambient = psky->getAmbientColor(); - m_atmosphericsVars.glow = psky->getGlow(); - m_atmosphericsVars.cloud_shadow = psky->getCloudShadow(); - m_atmosphericsVars.dome_radius = psky->getDomeRadius(); - m_atmosphericsVars.dome_offset = psky->getDomeOffset(); - m_atmosphericsVars.light_atten = psky->getLightAttenuation(m_atmosphericsVars.max_y); - m_atmosphericsVars.light_transmittance = psky->getLightTransmittance(m_atmosphericsVars.max_y); - m_atmosphericsVars.gamma = psky->getGamma(); + cacheEnvironment(psky,m_atmosphericsVars); mSun.setColor(psky->getSunDiffuse()); mMoon.setColor(LLColor3(1.0f, 1.0f, 1.0f)); -- cgit v1.2.3 From de3568f1fdab50b3bdbbb1a6b67d552c97c86464 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 21 Oct 2021 18:46:31 -0700 Subject: SL-16127: Cleanup consts --- indra/newview/llvosky.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 882bfe6f7d..9b929cda8c 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -64,7 +64,9 @@ namespace const S32 NUM_TILES_X = 8; const S32 NUM_TILES_Y = 4; const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y; - const S32 NUM_CUBEMAP_FACES = 6; + const S32 NUM_CUBEMAP_FACES = 6; // See sResolution for face dimensions + const S32 TOTAL_TILES = NUM_CUBEMAP_FACES * NUM_TILES; + const S32 MAX_TILES = TOTAL_TILES + 1; // Heavenly body constants const F32 SUN_DISK_RADIUS = 0.5f; @@ -690,15 +692,13 @@ bool LLVOSky::updateSky() } static S32 next_frame = 0; - const S32 total_no_tiles = NUM_CUBEMAP_FACES * NUM_TILES; - const S32 cycle_frame_no = total_no_tiles + 1; mNeedUpdate = mForceUpdate; ++next_frame; - next_frame = next_frame % cycle_frame_no; + next_frame = next_frame % MAX_TILES; - mInterpVal = (!mInitialized) ? 1 : (F32)next_frame / cycle_frame_no; + mInterpVal = (!mInitialized) ? 1 : (F32)next_frame / MAX_TILES; LLHeavenBody::setInterpVal( mInterpVal ); updateDirections(psky); -- cgit v1.2.3 From 4463d01aa96712ed41d5d8b074a19d892e2d1480 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 21 Oct 2021 18:46:55 -0700 Subject: SL-16127: More cleanup --- indra/newview/llvosky.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 9b929cda8c..edf8c40bd3 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -642,8 +642,8 @@ void LLVOSky::createSkyTexture(LLSettingsSky::ptr_t psky, AtmosphericsVars& vars { for (x = tile_x_pos; x < (tile_x_pos + sTileResX); ++x) { - mSkyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mSkyTex[side].getDir(x, y), false), x, y); - mShinyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mShinyTex[side].getDir(x, y), true), x, y); + mSkyTex [side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mSkyTex [side].getDir(x, y), false), x, y); + mShinyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mShinyTex[side].getDir(x, y), true ), x, y); } } } @@ -676,11 +676,6 @@ bool LLVOSky::updateSky() LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))) - { - return TRUE; - } - - if (mDead) { // It's dead. Don't update it. return TRUE; -- cgit v1.2.3 From ad91d0fd92bdcb6b4dcd24fda1cdb08d4b9ad97e Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 26 Oct 2021 22:09:27 -0700 Subject: SL-16127: Make another pass removing redundant LLSD op [] calls, unused vars, and use atmospheric already calculated --- indra/newview/llvosky.cpp | 63 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index edf8c40bd3..322e4f110a 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -64,7 +64,7 @@ namespace const S32 NUM_TILES_X = 8; const S32 NUM_TILES_Y = 4; const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y; - const S32 NUM_CUBEMAP_FACES = 6; // See sResolution for face dimensions + const S32 NUM_CUBEMAP_FACES = 6; // See SKYTEX_RESOLUTION for face dimensions const S32 TOTAL_TILES = NUM_CUBEMAP_FACES * NUM_TILES; const S32 MAX_TILES = TOTAL_TILES + 1; @@ -92,8 +92,6 @@ namespace SkyTex ***************************************/ -S32 LLSkyTex::sComponents = 4; -S32 LLSkyTex::sResolution = 64; S32 LLSkyTex::sCurrent = 0; @@ -107,14 +105,14 @@ LLSkyTex::LLSkyTex() : void LLSkyTex::init(bool isShiny) { mIsShiny = isShiny; - mSkyData = new LLColor4[sResolution * sResolution]; - mSkyDirs = new LLVector3[sResolution * sResolution]; + mSkyData = new LLColor4[SKYTEX_RESOLUTION * SKYTEX_RESOLUTION]; + mSkyDirs = new LLVector3[SKYTEX_RESOLUTION * SKYTEX_RESOLUTION]; for (S32 i = 0; i < 2; ++i) { mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE); mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP); - mImageRaw[i] = new LLImageRaw(sResolution, sResolution, sComponents); + mImageRaw[i] = new LLImageRaw(SKYTEX_RESOLUTION, SKYTEX_RESOLUTION, SKYTEX_COMPONENTS); initEmpty(i); } @@ -146,7 +144,7 @@ LLSkyTex::~LLSkyTex() S32 LLSkyTex::getResolution() { - return sResolution; + return SKYTEX_RESOLUTION; } S32 LLSkyTex::getCurrent() @@ -174,12 +172,12 @@ S32 LLSkyTex::getWhich(const BOOL curr) void LLSkyTex::initEmpty(const S32 tex) { U8* data = mImageRaw[tex]->getData(); - for (S32 i = 0; i < sResolution; ++i) + for (S32 i = 0; i < SKYTEX_RESOLUTION; ++i) { - for (S32 j = 0; j < sResolution; ++j) + for (S32 j = 0; j < SKYTEX_RESOLUTION; ++j) { - const S32 basic_offset = (i * sResolution + j); - S32 offset = basic_offset * sComponents; + const S32 basic_offset = (i * SKYTEX_RESOLUTION + j); + S32 offset = basic_offset * SKYTEX_COMPONENTS; data[offset] = 0; data[offset+1] = 0; data[offset+2] = 0; @@ -195,12 +193,12 @@ void LLSkyTex::initEmpty(const S32 tex) void LLSkyTex::create() { U8* data = mImageRaw[sCurrent]->getData(); - for (S32 i = 0; i < sResolution; ++i) + for (S32 i = 0; i < SKYTEX_RESOLUTION; ++i) { - for (S32 j = 0; j < sResolution; ++j) + for (S32 j = 0; j < SKYTEX_RESOLUTION; ++j) { - const S32 basic_offset = (i * sResolution + j); - S32 offset = basic_offset * sComponents; + const S32 basic_offset = (i * SKYTEX_RESOLUTION + j); + S32 offset = basic_offset * SKYTEX_COMPONENTS; U32* pix = (U32*)(data + offset); LLColor4U temp = LLColor4U(mSkyData[basic_offset]); *pix = temp.asRGBA(); @@ -397,10 +395,8 @@ const LLVector3* LLHeavenBody::corners() const Sky ***************************************/ - -S32 LLVOSky::sResolution = LLSkyTex::getResolution(); -S32 LLVOSky::sTileResX = sResolution/NUM_TILES_X; -S32 LLVOSky::sTileResY = sResolution/NUM_TILES_Y; +const S32 SKYTEX_TILE_RES_X = SKYTEX_RESOLUTION / NUM_TILES_X; +const S32 SKYTEX_TILE_RES_Y = SKYTEX_RESOLUTION / NUM_TILES_Y; LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) : LLStaticViewerObject(id, pcode, regionp, TRUE), @@ -495,6 +491,7 @@ void LLVOSky::init() void LLVOSky::cacheEnvironment(LLSettingsSky::ptr_t psky,AtmosphericsVars& atmosphericsVars) { + // NOTE: Also see: LLAtmospherics::updateFog() // invariants across whole sky tex process... atmosphericsVars.blue_density = psky->getBlueDensity(); atmosphericsVars.blue_horizon = psky->getBlueHorizon(); @@ -602,8 +599,8 @@ void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile) S32 tile_x = tile % NUM_TILES_X; S32 tile_y = tile / NUM_TILES_X; - S32 tile_x_pos = tile_x * sTileResX; - S32 tile_y_pos = tile_y * sTileResY; + S32 tile_x_pos = tile_x * SKYTEX_TILE_RES_X; + S32 tile_y_pos = tile_y * SKYTEX_TILE_RES_Y; F32 coeff[3] = {0, 0, 0}; const S32 curr_coef = side >> 1; // 0/1 = Z axis, 2/3 = Y, 4/5 = X @@ -613,11 +610,11 @@ void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile) coeff[curr_coef] = (F32)side_dir; - F32 inv_res = 1.f/sResolution; + F32 inv_res = 1.f/SKYTEX_RESOLUTION; S32 x, y; - for (y = tile_y_pos; y < (tile_y_pos + sTileResY); ++y) + for (y = tile_y_pos; y < (tile_y_pos + SKYTEX_TILE_RES_Y); ++y) { - for (x = tile_x_pos; x < (tile_x_pos + sTileResX); ++x) + for (x = tile_x_pos; x < (tile_x_pos + SKYTEX_TILE_RES_X); ++x) { coeff[x_coef] = F32((x<<1) + 1) * inv_res - 1.f; coeff[y_coef] = F32((y<<1) + 1) * inv_res - 1.f; @@ -629,21 +626,23 @@ void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile) } } -void LLVOSky::createSkyTexture(LLSettingsSky::ptr_t psky, AtmosphericsVars& vars, const S32 side, const S32 tile) +void LLVOSky::createSkyTexture(const LLSettingsSky::ptr_t &psky, AtmosphericsVars& vars, const S32 side, const S32 tile) { + const bool low_end = !gPipeline.canUseWindLightShaders(); + S32 tile_x = tile % NUM_TILES_X; S32 tile_y = tile / NUM_TILES_X; - S32 tile_x_pos = tile_x * sTileResX; - S32 tile_y_pos = tile_y * sTileResY; + S32 tile_x_pos = tile_x * SKYTEX_TILE_RES_X; + S32 tile_y_pos = tile_y * SKYTEX_TILE_RES_Y; S32 x, y; - for (y = tile_y_pos; y < (tile_y_pos + sTileResY); ++y) + for (y = tile_y_pos; y < (tile_y_pos + SKYTEX_TILE_RES_Y); ++y) { - for (x = tile_x_pos; x < (tile_x_pos + sTileResX); ++x) + for (x = tile_x_pos; x < (tile_x_pos + SKYTEX_TILE_RES_X); ++x) { - mSkyTex [side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mSkyTex [side].getDir(x, y), false), x, y); - mShinyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mShinyTex[side].getDir(x, y), true ), x, y); + mSkyTex [side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mSkyTex [side].getDir(x, y), false, low_end), x, y); + mShinyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(psky, vars, mShinyTex[side].getDir(x, y), true , low_end), x, y); } } } @@ -783,7 +782,7 @@ bool LLVOSky::updateSky() } // run 0 to 5 faces, each face in own frame else if (mCubeMapUpdateStage >= 0 && mCubeMapUpdateStage < NUM_CUBEMAP_FACES) - { + { LL_RECORD_BLOCK_TIME(FTM_VOSKY_CREATETEXTURES); S32 side = mCubeMapUpdateStage; // CPU hungry part, createSkyTexture() is math heavy -- cgit v1.2.3 From 8d20480c5f77fe1fab8149d3cda79bdd61e77656 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 28 Oct 2021 18:06:21 +0000 Subject: SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton --- indra/newview/llvosky.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index edf8c40bd3..1e546861b9 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -79,11 +79,6 @@ namespace const LLVector2 TEX10 = LLVector2(1.f, 0.f); const LLVector2 TEX11 = LLVector2(1.f, 1.f); - LLTrace::BlockTimerStatHandle FTM_VOSKY_UPDATETIMER("VOSky Update Timer Tick"); - LLTrace::BlockTimerStatHandle FTM_VOSKY_CALC("VOSky Update Calculations"); - LLTrace::BlockTimerStatHandle FTM_VOSKY_CREATETEXTURES("VOSky Update Textures"); - LLTrace::BlockTimerStatHandle FTM_VOSKY_UPDATEFORCED("VOSky Update Forced"); - F32Seconds UPDATE_EXPRY(0.25f); const F32 UPDATE_MIN_DELTA_THRESHOLD = 0.0005f; @@ -518,6 +513,7 @@ void LLVOSky::cacheEnvironment(LLSettingsSky::ptr_t psky,AtmosphericsVars& atmos void LLVOSky::calc() { + LL_PROFILE_ZONE_SCOPED; LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); cacheEnvironment(psky,m_atmosphericsVars); @@ -686,6 +682,8 @@ bool LLVOSky::updateSky() return TRUE; } + LL_PROFILE_ZONE_SCOPED; + static S32 next_frame = 0; mNeedUpdate = mForceUpdate; @@ -706,7 +704,6 @@ bool LLVOSky::updateSky() if (mCubeMapUpdateStage < 0) { - LL_RECORD_BLOCK_TIME(FTM_VOSKY_CALC); calc(); bool same_atmospherics = approximatelyEqual(m_lastAtmosphericsVars, m_atmosphericsVars, UPDATE_MIN_DELTA_THRESHOLD); @@ -723,7 +720,7 @@ bool LLVOSky::updateSky() } else if (mCubeMapUpdateStage == NUM_CUBEMAP_FACES) { - LL_RECORD_BLOCK_TIME(FTM_VOSKY_UPDATEFORCED); + LL_PROFILE_ZONE_NAMED("updateSky - forced"); LLSkyTex::stepCurrent(); bool is_alm_wl_sky = gPipeline.canUseWindLightShaders(); @@ -783,8 +780,8 @@ bool LLVOSky::updateSky() } // run 0 to 5 faces, each face in own frame else if (mCubeMapUpdateStage >= 0 && mCubeMapUpdateStage < NUM_CUBEMAP_FACES) - { - LL_RECORD_BLOCK_TIME(FTM_VOSKY_CREATETEXTURES); + { + LL_PROFILE_ZONE_NAMED("updateSky - create"); S32 side = mCubeMapUpdateStage; // CPU hungry part, createSkyTexture() is math heavy // Prior to EEP it was mostly per tile, but since EPP it is per face. @@ -974,11 +971,9 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_ } } -static LLTrace::BlockTimerStatHandle FTM_GEO_SKY("Sky Geometry"); - BOOL LLVOSky::updateGeometry(LLDrawable *drawable) { - LL_RECORD_BLOCK_TIME(FTM_GEO_SKY); + LL_PROFILE_ZONE_SCOPED; if (mFace[FACE_REFLECTION] == NULL) { LLDrawPoolWater *poolp = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); -- cgit v1.2.3 From 352b820258709489360ac8606983aff8a97f97da Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 13 Jan 2022 11:37:38 -0800 Subject: SL-16606: Add profiler category DRAWABLE --- indra/newview/llvosky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 72ec8390a4..2e6d8adc05 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -972,7 +972,7 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE; if (mFace[FACE_REFLECTION] == NULL) { LLDrawPoolWater *poolp = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); -- cgit v1.2.3 From 2178d9fa57acddc62123a764e8313b835140748d Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 13 Jan 2022 11:59:34 -0800 Subject: SL-16606: Add profiler category ENVIRONMENT --- indra/newview/llvosky.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 2e6d8adc05..01312d65cc 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -510,7 +510,7 @@ void LLVOSky::cacheEnvironment(LLSettingsSky::ptr_t psky,AtmosphericsVars& atmos void LLVOSky::calc() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT; LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); cacheEnvironment(psky,m_atmosphericsVars); @@ -681,7 +681,7 @@ bool LLVOSky::updateSky() return TRUE; } - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT; static S32 next_frame = 0; -- cgit v1.2.3