Add more profiler events and naming for particles/animations jobs events

This commit is contained in:
Wojtek Figat
2021-08-30 20:24:38 +02:00
parent d654d2d0ac
commit 2e5491604b
5 changed files with 54 additions and 2 deletions

View File

@@ -149,6 +149,7 @@ Variant AnimGraphExecutor::SampleAnimation(AnimGraphNode* node, bool loop, float
// Skip if animation is not ready to use
if (anim == nullptr || !anim->IsLoaded())
return Value::Null;
PROFILE_CPU_ASSET(anim);
// Calculate actual time position within the animation node (defined by length and loop mode)
const float pos = GetAnimPos(newTimePos, startTimePos, loop, length);
@@ -607,8 +608,6 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
// Animation
case 0:
{
ANIM_GRAPH_PROFILE_EVENT("Sample");
const float length = anim ? anim->GetLength() : 0.0f;
// Calculate new time position