Add PROFILE_CPU_ASSET for asset related profiler scoped zone

This commit is contained in:
Wojtek Figat
2021-08-28 12:49:02 +02:00
parent 610763b637
commit d654d2d0ac
2 changed files with 3 additions and 5 deletions

View File

@@ -480,11 +480,7 @@ bool Asset::onLoad(LoadAssetTask* task)
// Load asset
LoadResult result;
{
#if TRACY_ENABLE
ZoneScoped;
const StringView name(GetPath());
ZoneName(*name, name.Length());
#endif
PROFILE_CPU_ASSET(this);
result = loadAsset();
}
const bool isLoaded = result == LoadResult::Ok;