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:
Jeremy Ong
2021-08-17 12:10:57 -06:00
parent d15d40fec6
commit df9b4d4a2f
274 changed files with 1435 additions and 1965 deletions
+1 -1
View File
@@ -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;
+7 -7
View File
@@ -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)
{