#2431 Fix for redundant searching for pixeismall.j2c causing frame stalls

meow-7.2.2
RunitaiLinden 2024-08-27 15:59:41 -05:00
parent 5c16ae1375
commit feecf09573
6 changed files with 17 additions and 6 deletions

View File

@ -721,6 +721,8 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
const std::string& filename,
ESkinConstraint constraint) const
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
// Recognize subdirs that have no localization.
static const std::set<std::string> sUnlocalized = list_of
("") // top-level directory not localized

View File

@ -6020,6 +6020,7 @@ bool LLViewerObject::isParticleSource() const
void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
if (mPartSourcep)
{
deleteParticleSource();
@ -6051,6 +6052,7 @@ void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters,
void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& owner_id)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
if (!mPartSourcep.isNull() && mPartSourcep->isDead())
{
mPartSourcep = NULL;
@ -6086,7 +6088,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
LLViewerTexture* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
image = LLViewerFetchedTexture::sDefaultParticleImagep;
}
else
{
@ -6099,6 +6101,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
if (!mPartSourcep.isNull() && mPartSourcep->isDead())
{
mPartSourcep = NULL;
@ -6133,7 +6136,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
LLViewerTexture* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
image = LLViewerFetchedTexture::sDefaultParticleImagep;
}
else
{

View File

@ -114,7 +114,7 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
llassert(source_objp);
mSourceObjectp = source_objp;
mPosAgent = mSourceObjectp->getPositionAgent();
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
mImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@ -619,7 +619,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
{
if (!mImagep)
{
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
}
const F32 RATE = 0.025f;
@ -789,7 +789,7 @@ void LLViewerPartSourceBeam::update(const F32 dt)
if (!mImagep)
{
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
}
LLViewerPart* part = new LLViewerPart();
@ -876,7 +876,7 @@ void LLViewerPartSourceChat::update(const F32 dt)
{
if (!mImagep)
{
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
}

View File

@ -70,6 +70,7 @@ LLPointer<LLViewerTexture> LLViewerTexture::sBlackImagep = nullptr;
LLPointer<LLViewerTexture> LLViewerTexture::sCheckerBoardImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultParticleImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = nullptr;

View File

@ -507,6 +507,7 @@ public:
static LLPointer<LLViewerFetchedTexture> sDefaultImagep; // "Default" texture for error cases, the only case of fetched texture which is generated in local.
static LLPointer<LLViewerFetchedTexture> sFlatNormalImagep; // Flat normal map denoting no bumpiness on a surface
static LLPointer<LLViewerFetchedTexture> sDefaultIrradiancePBRp; // PBR: irradiance
static LLPointer<LLViewerFetchedTexture> sDefaultParticleImagep; // Default particle texture
// not sure why, but something is iffy about the loading of this particular texture, use the accessor instead of accessing directly
static LLPointer<LLViewerFetchedTexture> sSmokeImagep; // Old "Default" translucent texture

View File

@ -123,6 +123,9 @@ void LLViewerTextureList::doPreloadImages()
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
LLUIImageList* image_list = LLUIImageList::getInstance();
// Set default particle texture
LLViewerFetchedTexture::sDefaultParticleImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
// Set the default flat normal map
// BLANK_OBJECT_NORMAL has a version on dataserver, but it has compression artifacts
LLViewerFetchedTexture::sFlatNormalImagep =
@ -403,6 +406,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
const LLUUID& force_id)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LL_PROFILE_ZONE_TEXT(filename.c_str(), filename.size());
if(!mInitialized)
{
return NULL ;