From bf0643e28ae67c46dd1fa4f01874907a60ab038f Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 13 Jan 2022 12:52:28 -0800 Subject: SL-16606: Add profiler category TEXTURE --- indra/newview/llviewertexturelist.cpp | 80 +++++++++++++++++------------------ 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index db59976be2..dd18cdc9e8 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -111,7 +111,7 @@ void LLViewerTextureList::init() void LLViewerTextureList::doPreloadImages() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL; llassert_always(mInitialized) ; @@ -203,7 +203,7 @@ static std::string get_texture_list_name() void LLViewerTextureList::doPrefetchImages() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (LLAppViewer::instance()->getPurgeCache()) { // cache was purged, no point @@ -257,7 +257,7 @@ LLViewerTextureList::~LLViewerTextureList() void LLViewerTextureList::shutdown() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // clear out preloads mImagePreloads.clear(); @@ -333,7 +333,7 @@ void LLViewerTextureList::shutdown() void LLViewerTextureList::dump() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LL_INFOS() << "LLViewerTextureList::dump()" << LL_ENDL; for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it) { @@ -378,7 +378,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& LLGLenum primary_format, const LLUUID& force_id) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(!mInitialized) { return NULL ; @@ -406,7 +406,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& LLGLenum primary_format, const LLUUID& force_id) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(!mInitialized) { return NULL ; @@ -495,7 +495,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, LLGLenum primary_format, LLHost request_from_host) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(!mInitialized) { return NULL ; @@ -558,7 +558,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, LLGLenum primary_format, LLHost request_from_host) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; static LLCachedControl fast_cache_fetching_enabled(gSavedSettings, "FastCacheFetchEnabled", true); LLPointer imagep ; @@ -614,7 +614,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector &output) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLTextureKey search_key(image_id, TEX_LIST_STANDARD); uuid_map_t::iterator iter = mUUIDMap.lower_bound(search_key); while (iter != mUUIDMap.end() && iter->first.textureId == image_id) @@ -626,7 +626,7 @@ void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vectorhasCallbacks()) @@ -761,7 +761,7 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) void LLViewerTextureList::updateImages(F32 max_time) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; static BOOL cleared = FALSE; if(gTeleportDisplay) { @@ -829,7 +829,7 @@ void LLViewerTextureList::updateImages(F32 max_time) void LLViewerTextureList::clearFetchingRequests() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) { return; @@ -847,7 +847,7 @@ void LLViewerTextureList::clearFetchingRequests() void LLViewerTextureList::updateImagesDecodePriorities() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // Update the decode priority for N images each frame { F32 lazy_flush_timeout = 30.f; // stop decoding @@ -963,7 +963,7 @@ void LLViewerTextureList::updateImagesDecodePriorities() void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(!tex->setDebugFetching(debug_level)) { return; @@ -1012,7 +1012,7 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (gGLManager.mIsDisabled) return 0.0f; // @@ -1041,7 +1041,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (gGLManager.mIsDisabled) return 0.0f; if(mFastCacheList.empty()) { @@ -1072,7 +1072,7 @@ F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time) void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(!imagep) { return ; @@ -1092,7 +1092,7 @@ void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep) F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLTimer image_op_timer; // Update fetch for N images each frame @@ -1168,7 +1168,7 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) void LLViewerTextureList::updateImagesUpdateStats() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (mForceResetTextureStats) { for (image_priority_list_t::iterator iter = mImageList.begin(); @@ -1183,7 +1183,7 @@ void LLViewerTextureList::updateImagesUpdateStats() void LLViewerTextureList::decodeAllImages(F32 max_time) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLTimer timer; //loading from fast cache @@ -1253,7 +1253,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, const std::string& out_filename, const U8 codec) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // Load the image LLPointer image = LLImageFormatted::createFromType(codec); if (image.isNull()) @@ -1307,7 +1307,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, // note: modifies the argument raw_image!!!! LLPointer LLViewerTextureList::convertToUploadFile(LLPointer raw_image) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; raw_image->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT); LLPointer compressedImage = new LLImageJ2C(); @@ -1341,7 +1341,7 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointer U32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; @@ -1351,7 +1351,7 @@ S32Megabytes LLViewerTextureList::getMinVideoRamSetting() // Returns max setting for TextureMemory (in MB) S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_multiplier) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; S32Megabytes max_texmem; if (gGLManager.mVRAM != 0) { @@ -1405,7 +1405,7 @@ const S32Megabytes VIDEO_CARD_FRAMEBUFFER_MEM(12); const S32Megabytes MIN_MEM_FOR_NON_TEXTURE(512); void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // Initialize the image pipeline VRAM settings S32Megabytes cur_mem(gSavedSettings.getS32("TextureMemory")); F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); @@ -1468,7 +1468,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { static LLCachedControl log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ; - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // Receive image header, copy into image object and decompresses // if this is a one-packet image. @@ -1540,7 +1540,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { static LLCachedControl log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ; - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // Receives image packet, copy into image object, // checks if all packets received, decompresses if so. @@ -1613,7 +1613,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d // static void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLUUID image_id; msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); @@ -1646,7 +1646,7 @@ void LLUIImageList::cleanUp() LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // use id as image name std::string image_name = image_id.asString(); @@ -1665,7 +1665,7 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority) LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // look for existing image uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name); if (found_it != mUIImages.end()) @@ -1683,7 +1683,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, LLUIImage::EScaleStyle scale_style) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (boost_priority == LLGLTexture::BOOST_NONE) { boost_priority = LLGLTexture::BOOST_UI; @@ -1696,7 +1696,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, LLUIImage::EScaleStyle scale_style) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (boost_priority == LLGLTexture::BOOST_NONE) { boost_priority = LLGLTexture::BOOST_UI; @@ -1708,7 +1708,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if (!imagep) return NULL; imagep->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -1746,7 +1746,7 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // look for existing image uuid_ui_image_map_t::iterator found_it = mUIImages.find(name); if (found_it != mUIImages.end()) @@ -1761,7 +1761,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s //static void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* user_data ) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(!success || !user_data) { return; @@ -1863,7 +1863,7 @@ struct UIImageDeclarations : public LLInitParam::Block bool LLUIImageList::initFromFile() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // Look for textures.xml in all the right places. Pass // constraint=LLDir::ALL_SKINS because we want to overlay textures.xml // from all the skins directories. -- cgit v1.2.3