[development] Migrated Atom CPU profiler to utilize new AzCore Profiler interface and related macros (#4160)

- Added new interface type AZ::Debug::Profiler to externally register profiler systems
 - Modified the Atom CPU profiler to register as an AzCore profiler
 -- This allows full engine markers to be visualized in the associated ImGui tool
 - Converted all AZ_ATOM_PROFILE_* macros to use AZ_PROFILE_* macros instead

Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
This commit is contained in:
Scott Romero
2021-09-20 11:40:57 -07:00
committed by GitHub
parent 6565b91854
commit 36bcf5849a
72 changed files with 239 additions and 336 deletions
@@ -145,7 +145,7 @@ namespace AZ
void DecalTextureArrayFeatureProcessor::Simulate(const RPI::FeatureProcessor::SimulatePacket& packet)
{
AZ_PROFILE_FUNCTION(AzRender);
AZ_PROFILE_SCOPE(AzRender, "DecalTextureArrayFeatureProcessor: Simulate");
AZ_UNUSED(packet);
if (m_deviceBufferNeedsUpdate)
@@ -158,7 +158,7 @@ namespace AZ
void DecalTextureArrayFeatureProcessor::Render(const RPI::FeatureProcessor::RenderPacket& packet)
{
// Note that decals are rendered as part of the forward shading pipeline. We only need to bind the decal buffers/textures in here.
AZ_PROFILE_FUNCTION(AzRender);
AZ_PROFILE_SCOPE(AzRender, "DecalTextureArrayFeatureProcessor: Render");
for (const RPI::ViewPtr& view : packet.m_views)
{
@@ -294,7 +294,7 @@ namespace AZ
void DecalTextureArrayFeatureProcessor::SetDecalMaterial(const DecalHandle handle, const AZ::Data::AssetId material)
{
AZ_PROFILE_FUNCTION(AzRender);
AZ_PROFILE_SCOPE(AzRender, "DecalTextureArrayFeatureProcessor: SetDecalMaterial");
if (handle.IsNull())
{
AZ_Warning("DecalTextureArrayFeatureProcessor", false, "Invalid handle passed to DecalTextureArrayFeatureProcessor::SetDecalMaterial().");
@@ -364,7 +364,7 @@ namespace AZ
void DecalTextureArrayFeatureProcessor::OnAssetReady(const Data::Asset<Data::AssetData> asset)
{
AZ_PROFILE_FUNCTION(AzRender);
AZ_PROFILE_SCOPE(AzRender, "DecalTextureArrayFeatureProcessor: OnAssetReady");
const Data::AssetId& assetId = asset->GetId();
const RPI::MaterialAsset* materialAsset = asset.GetAs<AZ::RPI::MaterialAsset>();