Deprecate profiler categories based on global enum
(to be supplanted by registered budgets in the future) Signed-off-by: Jeremy Ong <jcong@amazon.com>
This commit is contained in:
@@ -233,7 +233,7 @@ namespace NvCloth
|
||||
|
||||
void ActorClothSkinningLinear::UpdateSkinning()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
m_skinningMatrices = Internal::ObtainSkinningMatrices(m_entityId);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ namespace NvCloth
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
const size_t vertexCount = m_simulatedVertices.size();
|
||||
for (size_t index = 0; index < vertexCount; ++index)
|
||||
@@ -274,7 +274,7 @@ namespace NvCloth
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
for (const AZ::u32 index : m_nonSimulatedVertices)
|
||||
{
|
||||
@@ -342,7 +342,7 @@ namespace NvCloth
|
||||
|
||||
void ActorClothSkinningDualQuaternion::UpdateSkinning()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
m_skinningDualQuaternions = Internal::ObtainSkinningDualQuaternions(m_entityId, m_jointIndices);
|
||||
}
|
||||
@@ -359,7 +359,7 @@ namespace NvCloth
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
const size_t vertexCount = m_simulatedVertices.size();
|
||||
for (size_t index = 0; index < vertexCount; ++index)
|
||||
@@ -383,7 +383,7 @@ namespace NvCloth
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
for (const AZ::u32 index : m_nonSimulatedVertices)
|
||||
{
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace NvCloth
|
||||
[[maybe_unused]] ClothId clothId,
|
||||
float deltaTime)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
UpdateSimulationCollisions();
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace NvCloth
|
||||
[[maybe_unused]] float deltaTime,
|
||||
const AZStd::vector<SimParticleFormat>& updatedParticles)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
// Next buffer index of the render data
|
||||
m_renderDataBufferIndex = (m_renderDataBufferIndex + 1) % RenderDataBufferSize;
|
||||
@@ -326,7 +326,7 @@ namespace NvCloth
|
||||
{
|
||||
if (m_actorClothColliders)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
m_actorClothColliders->Update();
|
||||
|
||||
@@ -342,7 +342,7 @@ namespace NvCloth
|
||||
{
|
||||
if (m_actorClothSkinning)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
m_actorClothSkinning->UpdateSkinning();
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace NvCloth
|
||||
|
||||
void ClothComponentMesh::UpdateSimulationConstraints()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
m_motionConstraints = m_clothConstraints->GetMotionConstraints();
|
||||
m_separationConstraints = m_clothConstraints->GetSeparationConstraints();
|
||||
@@ -396,7 +396,7 @@ namespace NvCloth
|
||||
|
||||
void ClothComponentMesh::UpdateRenderData(const AZStd::vector<SimParticleFormat>& particles)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
if (!m_cloth)
|
||||
{
|
||||
@@ -449,7 +449,7 @@ namespace NvCloth
|
||||
|
||||
void ClothComponentMesh::CopyRenderDataToModel()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
// Previous buffer index of the render data
|
||||
const AZ::u32 previousBufferIndex = (m_renderDataBufferIndex + RenderDataBufferSize - 1) % RenderDataBufferSize;
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace NvCloth
|
||||
|
||||
void Cloth::Update()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
ResolveStaticParticles();
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Debug/Profiler.h>
|
||||
#include <AzCore/std/smart_ptr/unique_ptr.h>
|
||||
#include <AzCore/std/containers/map.h>
|
||||
#include <AzCore/std/containers/set.h>
|
||||
@@ -304,7 +305,7 @@ namespace NvCloth
|
||||
const AZ::Vector3& fabricGravity,
|
||||
bool useGeodesicTether)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
return Internal::Cook(particles, indices, fabricGravity, useGeodesicTether);
|
||||
}
|
||||
@@ -317,7 +318,7 @@ namespace NvCloth
|
||||
AZStd::vector<int>& remappedVertices,
|
||||
bool removeStaticTriangles)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
// Weld vertices together
|
||||
AZStd::vector<SimParticleFormat> weldedParticles;
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace NvCloth
|
||||
|
||||
AZ_Assert(!m_isSimulating, "Please make sure the ongoing simulation is finished before attempting to start a new one");
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
m_deltaTime = deltaTime;
|
||||
m_simulationCompletion.Reset(true /*isClearDependent*/);
|
||||
@@ -147,7 +147,7 @@ namespace NvCloth
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
// Waiting for the simulation pass completition.
|
||||
m_simulationCompletion.StartAndWaitForCompletion();
|
||||
@@ -191,14 +191,14 @@ namespace NvCloth
|
||||
|
||||
void Solver::ClothsSimulationJob::Process()
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Cloth, "NvCloth::BeginSimulationJob");
|
||||
AZ_PROFILE_SCOPE(Cloth, "NvCloth::BeginSimulationJob");
|
||||
|
||||
if (m_solver->beginSimulation(m_deltaTime))
|
||||
{
|
||||
// Setup the end simulation job.
|
||||
AZ::Job* endSimulationJob = AZ::CreateJobFunction([solver = m_solver]
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Cloth, "NvCloth::EndSimulationJob");
|
||||
AZ_PROFILE_SCOPE(Cloth, "NvCloth::EndSimulationJob");
|
||||
solver->endSimulation();
|
||||
}, true /*isAutoDelete*/);
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace NvCloth
|
||||
{
|
||||
AZ::Job* chunkSimulationJob = AZ::CreateJobFunction([solver = m_solver, chunkIndex]
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Cloth, "NvCloth::ChunkSimulationJob");
|
||||
AZ_PROFILE_SCOPE(Cloth, "NvCloth::ChunkSimulationJob");
|
||||
solver->simulateChunk(chunkIndex);
|
||||
}, true /*isAutoDelete*/);
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace NvCloth
|
||||
{
|
||||
AZ::Job* eventSignalJob = AZ::CreateJobFunction([cloth, deltaTime = m_deltaTime]
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Cloth, "NvCloth::PostSimulationJob");
|
||||
AZ_PROFILE_SCOPE(Cloth, "NvCloth::PostSimulationJob");
|
||||
|
||||
// Update the cloth data after the simulation
|
||||
cloth->Update();
|
||||
@@ -270,7 +270,7 @@ namespace NvCloth
|
||||
{
|
||||
AZ::Job* eventSignalJob = AZ::CreateJobFunction([cloth, deltaTime = m_deltaTime]
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Cloth, "NvCloth::PreSimulationJob");
|
||||
AZ_PROFILE_SCOPE(Cloth, "NvCloth::PreSimulationJob");
|
||||
|
||||
// Issue pre-simulation events
|
||||
cloth->m_preSimulationEvent.Signal(cloth->GetId(), deltaTime);
|
||||
|
||||
@@ -106,11 +106,11 @@ namespace NvCloth
|
||||
{
|
||||
if (detached)
|
||||
{
|
||||
AZ_PROFILE_INTERVAL_START(AZ::Debug::ProfileCategory::Cloth, AZ::Crc32(eventName), eventName);
|
||||
AZ_PROFILE_INTERVAL_START(Cloth, AZ::Crc32(eventName), eventName);
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_PROFILE_EVENT_BEGIN(AZ::Debug::ProfileCategory::Cloth, eventName);
|
||||
AZ_PROFILE_BEGIN(Cloth, eventName);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -121,11 +121,11 @@ namespace NvCloth
|
||||
{
|
||||
if (detached)
|
||||
{
|
||||
AZ_PROFILE_INTERVAL_END(AZ::Debug::ProfileCategory::Cloth, AZ::Crc32(eventName));
|
||||
AZ_PROFILE_INTERVAL_END(Cloth, AZ::Crc32(eventName));
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_PROFILE_EVENT_END(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_END();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -309,7 +309,7 @@ namespace NvCloth
|
||||
const AZStd::vector<SimParticleFormat>& initialParticles,
|
||||
const FabricCookedData& fabricCookedData)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
FabricId fabricId = FindOrCreateFabric(fabricCookedData);
|
||||
if (!fabricId.IsValid())
|
||||
@@ -403,7 +403,7 @@ namespace NvCloth
|
||||
float deltaTime,
|
||||
[[maybe_unused]] AZ::ScriptTimePoint time)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
for (auto& solverIt : m_solvers)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <System/TangentSpaceHelper.h>
|
||||
|
||||
#include <AzCore/Debug/Profiler.h>
|
||||
|
||||
namespace NvCloth
|
||||
{
|
||||
namespace
|
||||
@@ -20,7 +22,7 @@ namespace NvCloth
|
||||
const AZStd::vector<SimIndexType>& indices,
|
||||
AZStd::vector<AZ::Vector3>& outNormals)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
if ((indices.size() % 3) != 0)
|
||||
{
|
||||
@@ -86,7 +88,7 @@ namespace NvCloth
|
||||
AZStd::vector<AZ::Vector3>& outTangents,
|
||||
AZStd::vector<AZ::Vector3>& outBitangents)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
if ((indices.size() % 3) != 0)
|
||||
{
|
||||
@@ -174,7 +176,7 @@ namespace NvCloth
|
||||
AZStd::vector<AZ::Vector3>& outBitangents,
|
||||
AZStd::vector<AZ::Vector3>& outNormals)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
if ((indices.size() % 3) != 0)
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace NvCloth
|
||||
MeshNodeInfo& meshNodeInfo,
|
||||
MeshClothInfo& meshClothInfo)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
AZ_PROFILE_FUNCTION(Cloth);
|
||||
|
||||
AZ::Data::Asset<AZ::RPI::ModelAsset> modelDataAsset;
|
||||
AZ::Render::MeshComponentRequestBus::EventResult(
|
||||
|
||||
Reference in New Issue
Block a user