Merge pull request #3272 from aws-lumberyard-dev/PIX

Profiler spring cleaning
This commit is contained in:
Jeremy Ong
2021-08-19 08:48:23 -06:00
committed by GitHub
319 changed files with 1550 additions and 3404 deletions
@@ -94,3 +94,4 @@ namespace ImageProcessingAtom
AZStd::vector<AZStd::unique_ptr<AZ::Data::AssetHandler>> m_assetHandlers;
};
}// namespace ImageProcessingAtom
@@ -649,7 +649,7 @@ namespace AZ
AZ::u8 width,
int32_t viewProjOverrideIndex)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
// grab a mutex lock for the rest of this function so that a commit cannot happen during it and
// other threads can't add geometry during it
@@ -720,7 +720,7 @@ namespace AZ
AZ::u8 width,
int32_t viewProjOverrideIndex)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("AuxGeom", "AuxGeomDrawQueue: DrawPrimitiveWithSharedVerticesCommon");
AZ_Assert(indexCount >= verticesPerPrimitiveType && (indexCount % verticesPerPrimitiveType == 0),
@@ -127,7 +127,7 @@ namespace AZ
void FixedShapeProcessor::ProcessObjects(const AuxGeomBufferData* bufferData, const RPI::FeatureProcessor::RenderPacket& fpPacket)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("AuxGeom", "FixedShapeProcessor: ProcessObjects");
RHI::DrawPacketBuilder drawPacketBuilder;
@@ -145,7 +145,7 @@ namespace AZ
void DecalTextureArrayFeatureProcessor::Simulate(const RPI::FeatureProcessor::SimulatePacket& packet)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender)
AZ_PROFILE_FUNCTION(AzRender);
AZ_UNUSED(packet);
if (m_deviceBufferNeedsUpdate)
@@ -159,7 +159,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(Debug::ProfileCategory::AzRender)
AZ_PROFILE_FUNCTION(AzRender);
for (const RPI::ViewPtr& view : packet.m_views)
{
@@ -295,7 +295,7 @@ namespace AZ
void DecalTextureArrayFeatureProcessor::SetDecalMaterial(const DecalHandle handle, const AZ::Data::AssetId material)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Renderer);
AZ_PROFILE_FUNCTION(AzRender);
if (handle.IsNull())
{
AZ_Warning("DecalTextureArrayFeatureProcessor", false, "Invalid handle passed to DecalTextureArrayFeatureProcessor::SetDecalMaterial().");
@@ -365,7 +365,7 @@ namespace AZ
void DecalTextureArrayFeatureProcessor::OnAssetReady(const Data::Asset<Data::AssetData> asset)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Renderer);
AZ_PROFILE_FUNCTION(AzRender);
const Data::AssetId& assetId = asset->GetId();
const RPI::MaterialAsset* materialAsset = asset.GetAs<AZ::RPI::MaterialAsset>();
@@ -111,7 +111,7 @@ namespace AZ
void DiffuseProbeGridFeatureProcessor::Simulate([[maybe_unused]] const FeatureProcessor::SimulatePacket& packet)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
// update pipeline states
if (m_needUpdatePipelineStates)
@@ -149,7 +149,7 @@ namespace AZ
// if the volumes changed we need to re-sort the probe list
if (m_probeGridSortRequired)
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "Sort diffuse probe grids");
AZ_PROFILE_SCOPE(AzRender, "Sort diffuse probe grids");
// sort the probes by descending inner volume size, so the smallest volumes are rendered last
auto sortFn = [](AZStd::shared_ptr<DiffuseProbeGrid> const& probe1, AZStd::shared_ptr<DiffuseProbeGrid> const& probe2) -> bool
@@ -582,7 +582,7 @@ namespace AZ
void ImGuiPass::BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("Pass", "ImGuiPass: Execute");
context.GetCommandList()->SetViewport(m_viewportState);
@@ -612,7 +612,7 @@ namespace AZ
uint32_t ImGuiPass::UpdateImGuiResources()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("Pass", "ImGuiPass: UpdateImGuiResources");
auto imguiContextScope = ImguiContextScope(m_imguiContext);
@@ -75,7 +75,7 @@ namespace AZ
void MeshFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RPI", "MeshFeatureProcessor: Simulate");
AZ_UNUSED(packet);
@@ -87,7 +87,7 @@ namespace AZ
{
const auto jobLambda = [&]() -> void
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "MeshFP::Simulate() Lambda");
AZ_PROFILE_SCOPE(AzRender, "MeshFP::Simulate() Lambda");
for (auto meshDataIter = iteratorRange.first; meshDataIter != iteratorRange.second; ++meshDataIter)
{
if (!meshDataIter->m_model)
@@ -149,7 +149,7 @@ namespace AZ
const MeshHandleDescriptor& descriptor,
const MaterialAssignmentMap& materials)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
// don't need to check the concurrency during emplace() because the StableDynamicArray won't move the other elements during insertion
MeshHandle meshDataHandle = m_meshData.emplace();
@@ -478,7 +478,7 @@ namespace AZ
: m_modelAsset(modelAsset)
, m_parent(parent)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (!m_modelAsset.GetId().IsValid())
{
@@ -507,7 +507,7 @@ namespace AZ
//! AssetBus::Handler overrides...
void MeshDataInstance::MeshLoader::OnAssetReady(Data::Asset<Data::AssetData> asset)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
Data::Asset<RPI::ModelAsset> modelAsset = asset;
// Assign the fully loaded asset back to the mesh handle to not only hold asset id, but the actual data as well.
@@ -579,7 +579,7 @@ namespace AZ
void MeshDataInstance::Init(Data::Instance<RPI::Model> model)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
m_model = model;
const size_t modelLodCount = m_model->GetLodCount();
@@ -611,7 +611,7 @@ namespace AZ
void MeshDataInstance::BuildDrawPacketList(size_t modelLodIndex)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
RPI::ModelLod& modelLod = *m_model->GetLods()[modelLodIndex];
const size_t meshCount = modelLod.GetMeshes().size();
@@ -985,7 +985,7 @@ namespace AZ
void MeshDataInstance::UpdateDrawPackets(bool forceUpdate /*= false*/)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
for (auto& drawPacketList : m_drawPacketListsByLod)
{
for (auto& drawPacket : drawPacketList)
@@ -1000,7 +1000,7 @@ namespace AZ
void MeshDataInstance::BuildCullable()
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_Assert(m_cullableNeedsRebuild, "This function only needs to be called if the cullable to be rebuilt");
AZ_Assert(m_model, "The model has not finished loading yet");
@@ -1079,7 +1079,7 @@ namespace AZ
void MeshDataInstance::UpdateCullBounds(const TransformServiceFeatureProcessor* transformService)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_Assert(m_cullBoundsNeedsUpdate, "This function only needs to be called if the culling bounds need to be rebuilt");
AZ_Assert(m_model, "The model has not finished loading yet");
@@ -154,7 +154,7 @@ namespace AZ
void ReflectionProbeFeatureProcessor::Simulate([[maybe_unused]] const FeatureProcessor::SimulatePacket& packet)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("ReflectionProbe", "ReflectionProbeFeatureProcessor: Simulate");
// update pipeline states
@@ -193,7 +193,7 @@ namespace AZ
// if the volumes changed we need to re-sort the probe list
if (m_probeSortRequired)
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "Sort reflection probes");
AZ_PROFILE_SCOPE(AzRender, "Sort reflection probes");
AZ_ATOM_PROFILE_FUNCTION("ReflectionProbe", "ReflectionProbeFeatureProcessor: Sort reflection probes");
// sort the probes by descending inner volume size, so the smallest volumes are rendered last
@@ -69,13 +69,13 @@ namespace AZ
void SkinnedMeshFeatureProcessor::Render(const FeatureProcessor::RenderPacket& packet)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("SkinnedMesh", "SkinnedMeshFeatureProcessor: Render");
#if 0 //[GFX_TODO][ATOM-13564] Temporarily disable skinning culling until we figure out how to hook up visibility & lod selection with skinning:
//Setup the culling workgroup (it will be re-used for each view)
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "set up skinned culling workgroup");
AZ_PROFILE_SCOPE(AzRender, "set up skinned culling workgroup");
azsnprintf(m_workgroup.m_name, AZ_ARRAY_SIZE(m_workgroup.m_name), "SkinnedMeshFP workgroup");
m_workgroup.m_drawListMask.reset();
m_workgroup.m_cullPackets.clear();
@@ -118,11 +118,11 @@ namespace AZ
Job* processWorkgroupJob = AZ::CreateJobFunction(
[this, cullingSystem, viewPtr](AZ::Job& thisJob)
{
AZ_PROFILE_SCOPE_DYNAMIC(Debug::ProfileCategory::AzRender, "skinningMeshFP processWorkgroupJob - View: %s", viewPtr->GetName().GetCStr());
AZ_PROFILE_SCOPE(AzRender, "skinningMeshFP processWorkgroupJob - View: %s", viewPtr->GetName().GetCStr());
auto dispatchSkinningComputeProgramsCallback = [this](AZStd::shared_ptr<RPI::CullingBatchResults> results) -> void
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "dispatchSkinningComputePrograms");
AZ_PROFILE_SCOPE(AzRender, "dispatchSkinningComputePrograms");
//the [1][1] element of a projection matrix stores cot(FovY/2) (equal to 2*nearPlaneDistance/nearPlaneHeight),
//which is used to determine the (vertical) projected size in screen space
@@ -532,7 +532,7 @@ namespace AZ
// lod0 Positions[^ ^] lod0Normals[^ ^] lod1Positions[^ ^] lod1Normals[^ ^]
// lod0 subMesh0+1 Positions[^ ^^ ^] lod0 subMesh0+1 Normals[^ ^^ ^] lod1 sm0+1 pos[^ ^^ ^] lod1 sm0+1 norm[^ ^^ ^]
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZStd::intrusive_ptr<SkinnedMeshInstance> instance = aznew SkinnedMeshInstance;
// Each model gets a unique, random ID, so if the same source model is used for multiple instances, multiple target models will be created.
@@ -7,6 +7,8 @@
*/
#include <Atom/RHI/AsyncWorkQueue.h>
#include <AzCore/Debug/Profiler.h>
namespace AZ
{
namespace RHI
@@ -124,7 +126,7 @@ namespace AZ
return;
}
AZ_PROFILE_FUNCTION_IDLE(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZStd::unique_lock<AZStd::mutex> lock(m_waitWorkItemMutex);
m_waitWorkItemCondition.wait(lock, [&]() {return HasFinishedWork(workHandle); });
@@ -22,7 +22,7 @@ namespace AZ
ResultCode CommandQueue::Init(Device& device, const CommandQueueDescriptor& descriptor)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
#if defined (AZ_RHI_ENABLE_VALIDATION)
if (IsInitialized())
@@ -116,7 +116,7 @@ namespace AZ
//run a command
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "RHI::CommandQueue - Execute Command");
AZ_PROFILE_SCOPE(AzRender, "RHI::CommandQueue - Execute Command");
command(GetNativeQueue());
}
}
+1 -1
View File
@@ -81,7 +81,7 @@ namespace AZ
return ResultCode::InvalidOperation;
}
AZ_PROFILE_FUNCTION_IDLE(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
WaitOnCpuInternal();
return ResultCode::Success;
}
@@ -137,7 +137,7 @@ namespace AZ
ResultCode FrameScheduler::ImportScopeProducer(ScopeProducer& scopeProducer)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (!ValidateIsProcessing())
{
@@ -216,7 +216,7 @@ namespace AZ
void FrameScheduler::PrepareProducers()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: PrepareProducers");
for (ScopeProducer* scopeProducer : m_scopeProducers)
@@ -237,7 +237,7 @@ namespace AZ
void FrameScheduler::CompileProducers()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: CompileProducers");
for (ScopeProducer* scopeProducer : m_scopeProducers)
@@ -249,12 +249,12 @@ namespace AZ
void FrameScheduler::CompileShaderResourceGroups()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: CompileShaderResourceGroups");
// Execute all queued resource invalidations, which will mark SRG's for compilation.
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Invalidate Resources");
AZ_PROFILE_SCOPE(AzRender, "Invalidate Resources");
ResourceInvalidateBus::ExecuteQueuedEvents();
}
@@ -322,7 +322,7 @@ namespace AZ
void FrameScheduler::BuildRayTracingShaderTables()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: BuildRayTracingShaderTables");
for (auto rayTracingShaderTable : m_rayTracingShaderTablesToBuild)
@@ -341,7 +341,7 @@ namespace AZ
ResultCode FrameScheduler::BeginFrame()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: BeginFrame");
if (!ValidateIsInitialized())
@@ -376,7 +376,7 @@ namespace AZ
ResultCode FrameScheduler::EndFrame()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: EndFrame");
if (Validation::IsEnabled())
@@ -417,13 +417,13 @@ namespace AZ
void FrameScheduler::ExecuteContextInternal(FrameGraphExecuteGroup& group, uint32_t index)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
FrameGraphExecuteContext* executeContext = group.BeginContext(index);
{
ScopeProducer* scopeProducer = FindScopeProducer(executeContext->GetScopeId());
AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::AzRender, "ScopeProducer: %s", scopeProducer->GetScopeId().GetCStr());
AZ_PROFILE_SCOPE(AzRender, "ScopeProducer: %s", scopeProducer->GetScopeId().GetCStr());
scopeProducer->BuildCommandList(*executeContext);
}
@@ -432,7 +432,7 @@ namespace AZ
void FrameScheduler::ExecuteGroupInternal(AZ::Job* parentJob, uint32_t groupIndex)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: ExecuteGroupInternal");
FrameGraphExecuteGroup* executeGroup = m_frameGraphExecuter->BeginGroup(groupIndex);
@@ -475,7 +475,7 @@ namespace AZ
void FrameScheduler::Execute(JobPolicy overrideJobPolicy)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "FrameScheduler: Execute");
const uint32_t groupCount = m_frameGraphExecuter->GetGroupCount();
@@ -272,7 +272,7 @@ namespace AZ
const PipelineState* PipelineStateCache::AcquirePipelineState(PipelineLibraryHandle handle, const PipelineStateDescriptor& descriptor)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (handle.IsNull())
{
+2 -2
View File
@@ -209,11 +209,11 @@ namespace AZ
void RHISystem::FrameUpdate(FrameGraphCallback frameGraphCallback)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RHI", "RHISystem: FrameUpdate");
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "main per-frame work");
AZ_PROFILE_SCOPE(AzRender, "main per-frame work");
m_frameScheduler.BeginFrame();
frameGraphCallback(m_frameScheduler);
-20
View File
@@ -1,20 +0,0 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
file(TO_CMAKE_PATH "$ENV{ATOM_PIX_PATH}" ATOM_PIX_PATH_CMAKE_FORMATTED)
if(EXISTS "${ATOM_PIX_PATH_CMAKE_FORMATTED}/include/WinPixEventRuntime/pix3.h")
ly_add_external_target(
NAME pix
VERSION
3RDPARTY_ROOT_DIRECTORY ${ATOM_PIX_PATH_CMAKE_FORMATTED}
INCLUDE_DIRECTORIES include
)
endif()
@@ -1,14 +0,0 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
if(LY_MONOLITHIC_GAME)
set(PIX_LIBS ${BASE_PATH}/bin/x64/WinPixEventRuntime.lib)
else()
set(PIX_LIBS ${BASE_PATH}/bin/x64/WinPixEventRuntime.lib)
set(PIX_RUNTIME_DEPENDENCIES ${BASE_PATH}/bin/x64/WinPixEventRuntime.dll)
endif()
-19
View File
@@ -11,15 +11,6 @@ ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Sourc
include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # PAL_TRAIT_ATOM_RHI_DX12_SUPPORTED
if(PAL_TRAIT_PIX_AVAILABLE)
set(USE_PIX_DEFINE "USE_PIX")
set(PIX_BUILD_DEPENDENCY "3rdParty::pix")
else()
set(USE_PIX_DEFINE "")
set(PIX_BUILD_DEPENDENCY "")
endif()
if(PAL_TRAIT_AFTERMATH_AVAILABLE)
set(USE_NSIGHT_AFTERMATH_DEFINE $<IF:$<CONFIG:release>,"","USE_NSIGHT_AFTERMATH">)
set(AFTERMATH_BUILD_DEPENDENCY "3rdParty::Aftermath")
@@ -92,11 +83,7 @@ ly_add_target(
BUILD_DEPENDENCIES
PRIVATE
AZ::AzCore
${PIX_BUILD_DEPENDENCY}
Gem::Atom_RHI.Reflect
COMPILE_DEFINITIONS
PRIVATE
${USE_PIX_DEFINE}
)
ly_add_target(
@@ -121,10 +108,8 @@ ly_add_target(
Gem::Atom_RHI_DX12.Reflect
3rdParty::d3dx12
${AFTERMATH_BUILD_DEPENDENCY}
${PIX_BUILD_DEPENDENCY}
COMPILE_DEFINITIONS
PRIVATE
${USE_PIX_DEFINE}
${USE_NSIGHT_AFTERMATH_DEFINE}
)
@@ -148,10 +133,6 @@ ly_add_target(
Gem::Atom_RHI.Public
Gem::Atom_RHI_DX12.Reflect
Gem::Atom_RHI_DX12.Private.Static
${PIX_BUILD_DEPENDENCY}
COMPILE_DEFINITIONS
PRIVATE
${USE_PIX_DEFINE}
)
if(PAL_TRAIT_BUILD_HOST_TOOLS)
@@ -7,5 +7,4 @@
#
set(PAL_TRAIT_ATOM_RHI_DX12_SUPPORTED FALSE)
set(PAL_TRAIT_PIX_AVAILABLE FALSE)
set(PAL_TRAIT_AFTERMATH_AVAILABLE FALSE)
@@ -7,5 +7,4 @@
#
set(PAL_TRAIT_ATOM_RHI_DX12_SUPPORTED FALSE)
set(PAL_TRAIT_PIX_AVAILABLE FALSE)
set(PAL_TRAIT_AFTERMATH_AVAILABLE FALSE)
@@ -7,5 +7,4 @@
#
set(PAL_TRAIT_ATOM_RHI_DX12_SUPPORTED FALSE)
set(PAL_TRAIT_PIX_AVAILABLE FALSE)
set(PAL_TRAIT_AFTERMATH_AVAILABLE FALSE)
@@ -18,21 +18,8 @@ if(d3d12_dll)
set(PAL_TRAIT_ATOM_RHI_DX12_SUPPORTED TRUE)
endif()
set(PAL_TRAIT_PIX_AVAILABLE FALSE)
unset(pix3_header CACHE)
file(TO_CMAKE_PATH "$ENV{ATOM_PIX_PATH}" ATOM_PIX_PATH_CMAKE_FORMATTED)
find_file(pix3_header
pix3.h
PATHS
"${ATOM_PIX_PATH_CMAKE_FORMATTED}/Include/WinPixEventRuntime"
)
mark_as_advanced(pix3_header)
if(pix3_header)
set(PAL_TRAIT_PIX_AVAILABLE TRUE)
endif()
set(PAL_TRAIT_AFTERMATH_AVAILABLE FALSE)
unset(aftermath_header CACHE)
file(TO_CMAKE_PATH "$ENV{ATOM_AFTERMATH_PATH}" ATOM_AFTERMATH_PATH_CMAKE_FORMATTED)
@@ -7,5 +7,4 @@
#
set(PAL_TRAIT_ATOM_RHI_DX12_SUPPORTED FALSE)
set(PAL_TRAIT_PIX_AVAILABLE FALSE)
set(PAL_TRAIT_AFTERMATH_AVAILABLE FALSE)
@@ -152,21 +152,21 @@ namespace AZ
m_copyQueue->QueueCommand([=](void* commandQueue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Upload Buffer");
AZ_PROFILE_SCOPE(AzRender, "Upload Buffer");
size_t pendingByteOffset = 0;
size_t pendingByteCount = byteCount;
ID3D12CommandQueue* dx12CommandQueue = static_cast<ID3D12CommandQueue*>(commandQueue);
while (pendingByteCount > 0)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Upload Buffer Chunk");
AZ_PROFILE_SCOPE(AzRender, "Upload Buffer Chunk");
FramePacket* framePacket = BeginFramePacket();
const size_t bytesToCopy = AZStd::min(pendingByteCount, m_descriptor.m_stagingSizeInBytes);
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Copy CPU buffer");
AZ_PROFILE_SCOPE(AzRender, "Copy CPU buffer");
memcpy(framePacket->m_stagingResourceData, sourceData + pendingByteOffset, bytesToCopy);
}
@@ -196,7 +196,7 @@ namespace AZ
AsyncUploadQueue::FramePacket* AsyncUploadQueue::BeginFramePacket()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_Assert(!m_recordingFrame, "The previous frame packet isn't ended");
FramePacket* framePacket = &m_framePackets[m_frameIndex];
@@ -212,7 +212,7 @@ namespace AZ
void AsyncUploadQueue::EndFramePacket(ID3D12CommandQueue* commandQueue)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_Assert(m_recordingFrame, "The frame packet wasn't started. You need to call StartFramePacket first.");
AssertSuccess(m_commandList->Close());
@@ -229,7 +229,7 @@ namespace AZ
// [GFX TODO][ATOM-4205] Stage/Upload 3D streaming images more efficiently.
uint64_t AsyncUploadQueue::QueueUpload(const RHI::StreamingImageExpandRequest& request, uint32_t residentMip)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
uint64_t fenceValue = m_uploadFence.Increment();
@@ -243,7 +243,7 @@ namespace AZ
m_copyQueue->QueueCommand([=](void* commandQueue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Upload Image");
AZ_PROFILE_SCOPE(AzRender, "Upload Image");
ID3D12CommandQueue* dx12CommandQueue = static_cast<ID3D12CommandQueue*>(commandQueue);
FramePacket* framePacket = BeginFramePacket();
@@ -314,7 +314,7 @@ namespace AZ
// Copy subresource data to staging memory.
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Copy CPU image");
AZ_PROFILE_SCOPE(AzRender, "Copy CPU image");
uint8_t* stagingDataStart = framePacket->m_stagingResourceData + framePacket->m_dataOffset;
const uint8_t* subresourceSliceDataStart = static_cast<const uint8_t*>(subresource.m_data) + (depth * subresourceSlicePitch);
@@ -385,7 +385,7 @@ namespace AZ
// Copy subresource data to staging memory
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Copy CPU image");
AZ_PROFILE_SCOPE(AzRender, "Copy CPU image");
for (uint32_t row = startRow; row < endRow; row++)
{
uint8_t* stagingDataStart = framePacket->m_stagingResourceData + framePacket->m_dataOffset;
@@ -476,7 +476,7 @@ namespace AZ
void AsyncUploadQueue::WaitForUpload(uint64_t fenceValue)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (!IsUploadFinished(fenceValue))
{
@@ -490,7 +490,7 @@ namespace AZ
void AsyncUploadQueue::ProcessCallbacks(uint64_t fenceValue)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZStd::lock_guard<AZStd::mutex> lock(m_callbackMutex);
while (m_callbacks.size() > 0 && m_callbacks.front().second <= fenceValue)
{
@@ -504,7 +504,7 @@ namespace AZ
{
m_copyQueue->QueueCommand([=](void* commandQueue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "QueueTileMapping");
AZ_PROFILE_SCOPE(AzRender, "QueueTileMapping");
ID3D12CommandQueue* dx12CommandQueue = static_cast<ID3D12CommandQueue*>(commandQueue);
const uint32_t tileCount = request.m_sourceRegionSize.NumTiles;
@@ -33,7 +33,7 @@ namespace AZ
void CommandListBase::Reset(ID3D12CommandAllocator* commandAllocator)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_Assert(m_queuedBarriers.empty(), "Unflushed barriers in command list.");
m_commandList->Reset(commandAllocator, nullptr);
@@ -95,7 +95,7 @@ namespace AZ
{
if (m_queuedBarriers.size())
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRenderDetailed);
AZ_PROFILE_FUNCTION(AzRenderDetailed);
m_commandList->ResourceBarrier((UINT)m_queuedBarriers.size(), m_queuedBarriers.data());
m_queuedBarriers.clear();
@@ -7,11 +7,15 @@
*/
#pragma once
// NOTE: We are careful to include platform headers *before* we include AzCore/Debug/Profiler.h to ensure that d3d12 symbols
// are defined prior to the inclusion of the pix3 runtime.
#include <RHI/DX12.h>
#include <Atom/RHI/DeviceObject.h>
#include <Atom/RHI.Reflect/AttachmentEnums.h>
#include <AzCore/Debug/Profiler.h>
#include <AzCore/std/containers/vector.h>
#include <AzCore/std/containers/unordered_map.h>
#include <RHI/DX12.h>
namespace AZ
{
@@ -110,7 +110,7 @@ namespace AZ
{
QueueCommand([this, &fence](void* commandQueue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "SignalFence");
AZ_PROFILE_SCOPE(AzRender, "SignalFence");
ID3D12CommandQueue* dx12CommandQueue = static_cast<ID3D12CommandQueue*>(commandQueue);
dx12CommandQueue->Signal(fence.Get(), fence.GetPendingValue());
});
@@ -138,7 +138,7 @@ namespace AZ
QueueCommand([=](void* commandQueue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "ExecuteWork");
AZ_PROFILE_SCOPE(AzRender, "ExecuteWork");
AZ_PROFILE_RHI_VARIABLE(m_lastExecuteDuration);
static const uint32_t CommandListCountMax = 128;
@@ -195,7 +195,7 @@ namespace AZ
void CommandQueue::UpdateTileMappings(CommandList& commandList)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
for (const CommandList::TileMapRequest& request : commandList.GetTileMapRequests())
{
const uint32_t tileCount = request.m_sourceRegionSize.NumTiles;
@@ -229,7 +229,7 @@ namespace AZ
void CommandQueue::WaitForIdle()
{
AZ_PROFILE_FUNCTION_IDLE(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
Fence fence;
fence.Init(m_device.get(), RHI::FenceState::Reset);
@@ -101,7 +101,7 @@ namespace AZ
void CommandQueueContext::WaitForIdle()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
for (uint32_t hardwareQueueIdx = 0; hardwareQueueIdx < RHI::HardwareQueueClassCount; ++hardwareQueueIdx)
{
if (m_commandQueues[hardwareQueueIdx])
@@ -113,10 +113,10 @@ namespace AZ
void CommandQueueContext::Begin()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Clearing Command Queue Timers");
AZ_PROFILE_SCOPE(AzRender, "Clearing Command Queue Timers");
for (const RHI::Ptr<CommandQueue>& commandQueue : m_commandQueues)
{
commandQueue->ClearTimers();
@@ -131,7 +131,7 @@ namespace AZ
void CommandQueueContext::End()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("DX12", "CommandQueueContext: End");
QueueGpuSignals(m_frameFences[m_currentFrameIndex]);
@@ -145,7 +145,7 @@ namespace AZ
m_currentFrameIndex = (m_currentFrameIndex + 1) % aznumeric_cast<uint32_t>(m_frameFences.size());
{
AZ_PROFILE_SCOPE_IDLE(AZ::Debug::ProfileCategory::AzRender, "Wait and Reset Fence");
AZ_PROFILE_SCOPE(AzRender, "Wait and Reset Fence");
AZ_ATOM_PROFILE_TIME_GROUP_REGION("DX12", "CommandQueueContext: Wait on Fences");
FenceEvent event("FrameFence");
+1 -1
View File
@@ -60,7 +60,7 @@ namespace AZ
{
if (fenceValue > GetCompletedValue())
{
AZ_PROFILE_SCOPE_IDLE_DYNAMIC(AZ::Debug::ProfileCategory::AzRender, "Fence Wait: %s", fenceEvent.GetName());
AZ_PROFILE_SCOPE(AzRender, "Fence Wait: %s", fenceEvent.GetName());
m_fence->SetEventOnCompletion(fenceValue, fenceEvent.m_EventHandle);
WaitForSingleObject(fenceEvent.m_EventHandle, INFINITE);
}
+4 -1
View File
@@ -7,12 +7,15 @@
*/
#pragma once
// NOTE: We are careful to include platform headers *before* we include AzCore/Debug/Profiler.h to ensure that d3d12 symbols
// are defined prior to the inclusion of the pix3 runtime.
#include <RHI/DX12.h>
#include <Atom/RHI/Fence.h>
#include <Atom/RHI/Scope.h>
#include <AzCore/Memory/PoolAllocator.h>
#include <AzCore/std/containers/array.h>
#include <AzCore/std/smart_ptr/intrusive_ptr.h>
#include <RHI/DX12.h>
namespace AZ
{
@@ -144,7 +144,7 @@ namespace AZ
#ifdef AZ_RHI_USE_TILED_RESOURCES
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "StreamImagePool::CreateHeap");
AZ_PROFILE_SCOPE(AzRender, "StreamImagePool::CreateHeap");
CD3DX12_HEAP_DESC heapDesc(descriptor.m_budgetInBytes, D3D12_HEAP_TYPE_DEFAULT, 0, D3D12_HEAP_FLAG_DENY_BUFFERS | D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES);
@@ -114,7 +114,7 @@ namespace AZ
//Autoreleasepool is to ensure that the driver is not leaking memory related to the command buffer and encoder
@autoreleasepool
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "ExecuteWork");
AZ_PROFILE_SCOPE(AzRender, "ExecuteWork");
AZ_PROFILE_RHI_VARIABLE(m_lastExecuteDuration);
if (request.m_signalFenceValue > 0)
@@ -79,7 +79,7 @@ namespace AZ
void CommandQueueContext::End()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
QueueGpuSignals(m_frameFences[m_currentFrameIndex]);
for (uint32_t hardwareQueueIdx = 0; hardwareQueueIdx < RHI::HardwareQueueClassCount; ++hardwareQueueIdx)
@@ -91,7 +91,7 @@ namespace AZ
m_currentFrameIndex = (m_currentFrameIndex + 1) % aznumeric_cast<uint32_t>(m_frameFences.size());
{
AZ_PROFILE_SCOPE_IDLE(AZ::Debug::ProfileCategory::AzRender, "Wait and Reset Fence");
AZ_PROFILE_SCOPE(AzRender, "Wait and Reset Fence");
AZ_ATOM_PROFILE_TIME_GROUP_REGION("RHI", "CommandQueueContext: Wait on Fences");
//Synchronize the CPU with the GPU by waiting on the fence until signalled by the GPU. CPU can only go upto
@@ -96,7 +96,7 @@ namespace AZ
uploadFence->Init(device, RHI::FenceState::Reset);
CommandQueue::Command command = [=, &device](void* queue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Upload Buffer");
AZ_PROFILE_SCOPE(AzRender, "Upload Buffer");
size_t pendingByteOffset = 0;
size_t pendingByteCount = byteCount;
FramePacket* framePacket = nullptr;
@@ -110,7 +110,7 @@ namespace AZ
while (pendingByteCount > 0)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Upload Buffer Chunk");
AZ_PROFILE_SCOPE(AzRender, "Upload Buffer Chunk");
framePacket = BeginFramePacket(vulkanQueue);
const size_t bytesToCopy = AZStd::min(pendingByteCount, m_descriptor.m_stagingSizeInBytes);
@@ -181,7 +181,7 @@ namespace AZ
CommandQueue::Command command = [=, &device](void* queue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Upload Image");
AZ_PROFILE_SCOPE(AzRender, "Upload Image");
Queue* vulkanQueue = static_cast<Queue*>(queue);
FramePacket* framePacket = BeginFramePacket(vulkanQueue);
@@ -257,7 +257,7 @@ namespace AZ
// Copy subresource data to staging memory.
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Copy CPU image");
AZ_PROFILE_SCOPE(AzRender, "Copy CPU image");
uint8_t* stagingDataStart = reinterpret_cast<uint8_t*>(framePacket->m_stagingBuffer->GetBufferMemoryView()->Map(RHI::HostMemoryAccess::Write)) + framePacket->m_dataOffset;
for (uint32_t row = 0; row < subresourceLayout.m_rowCount; ++row)
{
@@ -332,7 +332,7 @@ namespace AZ
// Copy subresource data to staging memory.
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "Copy CPU image");
AZ_PROFILE_SCOPE(AzRender, "Copy CPU image");
uint8_t* stagingDataStart = reinterpret_cast<uint8_t*>(framePacket->m_stagingBuffer->GetBufferMemoryView()->Map(RHI::HostMemoryAccess::Write));
stagingDataStart += framePacket->m_dataOffset;
@@ -458,7 +458,7 @@ namespace AZ
AsyncUploadQueue::FramePacket* AsyncUploadQueue::BeginFramePacket(Queue* queue)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_Assert(!m_recordingFrame, "The previous frame packet isn't ended.");
auto& device = static_cast<Device&>(GetDevice());
@@ -478,7 +478,7 @@ namespace AZ
void AsyncUploadQueue::EndFramePacket(Queue* queue, Semaphore* semaphoreToSignal /*=nullptr*/)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_Assert(m_recordingFrame, "The frame packet wasn't started. You need to call StartFramePacket first.");
m_commandList->EndCommandBuffer();
@@ -644,7 +644,7 @@ namespace AZ
void AsyncUploadQueue::ProcessCallback(const RHI::AsyncWorkHandle& handle)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZStd::unique_lock<AZStd::mutex> lock(m_callbackListMutex);
auto findIter = m_callbackList.find(handle);
if (findIter != m_callbackList.end())
@@ -54,7 +54,7 @@ namespace AZ
const ExecuteWorkRequest& request = static_cast<const ExecuteWorkRequest&>(rhiRequest);
QueueCommand([=](void* queue)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "ExecuteWork");
AZ_PROFILE_SCOPE(AzRender, "ExecuteWork");
AZ_PROFILE_RHI_VARIABLE(m_lastExecuteDuration);
Queue* vulkanQueue = static_cast<Queue*>(queue);
@@ -42,7 +42,7 @@ namespace AZ
void CommandQueueContext::End()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
for (auto& commandQueue : m_commandQueues)
{
@@ -54,7 +54,7 @@ namespace AZ
m_currentFrameIndex = (m_currentFrameIndex + 1) % GetFrameCount();
{
AZ_PROFILE_SCOPE_IDLE(AZ::Debug::ProfileCategory::AzRender, "Wait on Fences");
AZ_PROFILE_SCOPE(AzRender, "Wait on Fences");
AZ_ATOM_PROFILE_FUNCTION("RHI", "CommandQueueContext: Wait on Fences");
FencesPerQueue& nextFences = m_frameFences[m_currentFrameIndex];
@@ -79,7 +79,7 @@ namespace AZ
void CommandQueueContext::WaitForIdle()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
for (auto& commandQueue : m_commandQueues)
{
commandQueue->WaitForIdle();
@@ -299,7 +299,7 @@ namespace AZ
//work function
void Process() override
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
const View::UsageFlags viewFlags = m_jobData->m_view->GetUsageFlags();
const RHI::DrawListMask drawListMask = m_jobData->m_view->GetDrawListMask();
@@ -312,7 +312,7 @@ namespace AZ
bool nodeIsContainedInFrustum = ShapeIntersection::Contains(m_jobData->m_frustum, nodeData.m_bounds);
#ifdef AZ_CULL_PROFILE_VERBOSE
AZ_PROFILE_SCOPE_DYNAMIC(Debug::ProfileCategory::AzRender, "process node (view: %s, skip fine cull: %d",
AZ_PROFILE_SCOPE(AzRender, "process node (view: %s, skip fine cull: %d",
m_view->GetName().GetCStr(), nodeIsContainedInFrustum ? 1 : 0);
#endif
@@ -385,7 +385,7 @@ namespace AZ
if (m_jobData->m_debugCtx->m_debugDraw && (m_jobData->m_view->GetName() == m_jobData->m_debugCtx->m_currentViewSelectionName))
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "debug draw culling");
AZ_PROFILE_SCOPE(AzRender, "debug draw culling");
AuxGeomDrawPtr auxGeomPtr = AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(m_jobData->m_scene);
if (auxGeomPtr)
@@ -507,7 +507,7 @@ namespace AZ
void CullingScene::ProcessCullables(const Scene& scene, View& view, AZ::Job& parentJob)
{
AZ_PROFILE_SCOPE_DYNAMIC(Debug::ProfileCategory::AzRender, "CullingScene::ProcessCullables() - %s", view.GetName().GetCStr());
AZ_PROFILE_SCOPE(AzRender, "CullingScene::ProcessCullables() - %s", view.GetName().GetCStr());
const Matrix4x4& worldToClip = view.GetWorldToClipMatrix();
Frustum frustum = Frustum::CreateFromMatrixColumnMajor(worldToClip);
@@ -598,7 +598,7 @@ namespace AZ
auto nodeVisitorLambda = [this, jobData, &parentJob, &frustum, &worklist](const AzFramework::IVisibilityScene::NodeData& nodeData) -> void
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "nodeVisitorLambda()");
AZ_PROFILE_SCOPE(AzRender, "nodeVisitorLambda()");
AZ_Assert(nodeData.m_entries.size() > 0, "should not get called with 0 entries");
AZ_Assert(worklist.size() < worklist.capacity(), "we should always have room to push a node on the queue");
@@ -645,7 +645,7 @@ namespace AZ
uint32_t AddLodDataToView(const Vector3& pos, const Cullable::LodData& lodData, RPI::View& view)
{
#ifdef AZ_CULL_PROFILE_DETAILED
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
#endif
const Matrix4x4& viewToClip = view.GetViewToClipMatrix();
@@ -663,7 +663,7 @@ namespace AZ
auto addLodToDrawPacket = [&](const Cullable::LodData::Lod& lod)
{
#ifdef AZ_CULL_PROFILE_VERBOSE
AZ_PROFILE_SCOPE_DYNAMIC(Debug::ProfileCategory::AzRender, "add draw packets: %zu", lod.m_drawPackets.size());
AZ_PROFILE_SCOPE(AzRender, "add draw packets: %zu", lod.m_drawPackets.size());
#endif
numVisibleDrawPackets += static_cast<uint32_t>(lod.m_drawPackets.size()); //don't want to pay the cost of aznumeric_cast<> here so using static_cast<> instead
for (const RHI::DrawPacket* drawPacket : lod.m_drawPackets)
@@ -310,7 +310,7 @@ namespace AZ
if (NeedsCompile() && CanCompile())
{
AZ_PROFILE_EVENT_BEGIN(Debug::ProfileCategory::AzRender, "Material::Compile() Processing Functors");
AZ_PROFILE_BEGIN(AzRender, "Material::Compile() Processing Functors");
for (const Ptr<MaterialFunctor>& functor : m_materialAsset->GetMaterialFunctors())
{
if (functor)
@@ -339,7 +339,7 @@ namespace AZ
AZ_Error(s_debugTraceName, false, "Material functor is null.");
}
}
AZ_PROFILE_EVENT_END(Debug::ProfileCategory::AzRender);
AZ_PROFILE_END();
m_propertyDirtyFlags.reset();
@@ -124,7 +124,7 @@ namespace AZ
bool MeshDrawPacket::DoUpdate(const Scene& parentScene)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
const ModelLod::Mesh& mesh = m_modelLod->GetMeshes()[m_modelLodMeshIndex];
if (!m_material)
@@ -155,7 +155,7 @@ namespace AZ
auto appendShader = [&](const ShaderCollection::Item& shaderItem)
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "appendShader()");
AZ_PROFILE_SCOPE(AzRender, "appendShader()");
// Skip the shader item without creating the shader instance
// if the mesh is not going to be rendered based on the draw tag
@@ -256,7 +256,7 @@ namespace AZ
Data::Instance<ShaderResourceGroup> drawSrg;
if (drawSrgLayout)
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "create drawSrg");
AZ_PROFILE_SCOPE(AzRender, "create drawSrg");
// If the DrawSrg exists we must create and bind it, otherwise the CommandList will fail validation for SRG being null
drawSrg = RPI::ShaderResourceGroup::Create(shader->GetAsset(), shader->GetSupervariantIndex(), drawSrgLayout->GetName());
@@ -42,7 +42,7 @@ namespace AZ
Data::Instance<Model> Model::CreateInternal(const Data::Asset<ModelAsset>& modelAsset)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
Data::Instance<Model> model = aznew Model();
const RHI::ResultCode resultCode = model->Init(modelAsset);
@@ -56,7 +56,7 @@ namespace AZ
RHI::ResultCode Model::Init(const Data::Asset<ModelAsset>& modelAsset)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
m_lods.resize(modelAsset->GetLodAssets().size());
@@ -107,7 +107,7 @@ namespace AZ
{
if (m_isUploadPending)
{
AZ_PROFILE_SCOPE_STALL_DYNAMIC(Debug::ProfileCategory::AzRender, "Model::WaitForUpload - %s", GetDatabaseName());
AZ_PROFILE_SCOPE(AzRender, "Model::WaitForUpload - %s", GetDatabaseName());
for (const Data::Instance<ModelLod>& lod : m_lods)
{
lod->WaitForUpload();
@@ -128,7 +128,7 @@ namespace AZ
bool Model::LocalRayIntersection(const AZ::Vector3& rayStart, const AZ::Vector3& rayDir, float& distanceNormalized, AZ::Vector3& normal) const
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (!GetModelAsset())
{
@@ -171,7 +171,7 @@ namespace AZ
float& distanceNormalized,
AZ::Vector3& normal) const
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
const AZ::Vector3 clampedScale = nonUniformScale.GetMax(AZ::Vector3(AZ::MinTransformScale));
const AZ::Transform inverseTM = modelTransform.GetInverse();
@@ -264,7 +264,7 @@ namespace AZ
const MaterialModelUvOverrideMap& materialModelUvMap,
const MaterialUvNameMap& materialUvNameMap) const
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
streamBufferViewsOut.clear();
@@ -366,7 +366,7 @@ namespace AZ
const MaterialModelUvOverrideMap& materialModelUvMap,
const MaterialUvNameMap& materialUvNameMap) const
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
const Mesh& mesh = m_meshes[meshIndex];
@@ -27,7 +27,7 @@ namespace AZ
ModelLodIndex SelectLod(const View* view, const Vector3& position, const Model& model, ModelLodIndex lodOverride)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
ModelLodIndex lodIndex;
if (model.GetLodCount() == 1)
{
@@ -189,7 +189,7 @@ namespace AZ
void PassSystem::BuildPasses()
{
m_state = PassSystemState::BuildingPasses;
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RPI", "PassSystem: BuildPassAttachments");
m_passHierarchyChanged = m_passHierarchyChanged || !m_buildPassList.empty();
@@ -239,7 +239,7 @@ namespace AZ
void PassSystem::InitializePasses()
{
m_state = PassSystemState::InitializingPasses;
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RPI", "PassSystem: BuildPassAttachments");
m_passHierarchyChanged = m_passHierarchyChanged || !m_initializePassList.empty();
@@ -286,7 +286,7 @@ namespace AZ
return;
}
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
PassValidationResults validationResults;
m_rootPass->Validate(validationResults);
@@ -307,7 +307,7 @@ namespace AZ
void PassSystem::FrameUpdate(RHI::FrameGraphBuilder& frameGraphBuilder)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RPI", "PassSystem: FrameUpdate");
ResetFrameStatistics();
@@ -216,7 +216,7 @@ namespace AZ
void RasterPass::CompileResources(const RHI::FrameGraphCompileContext& context)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (m_shaderResourceGroup == nullptr)
{
@@ -230,7 +230,7 @@ namespace AZ
void RasterPass::BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
RHI::CommandList* commandList = context.GetCommandList();
@@ -270,7 +270,7 @@ namespace AZ
return;
}
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZ_ATOM_PROFILE_FUNCTION("RPI", "RPISystem: RenderTick");
// Query system update is to increment the frame count
@@ -377,7 +377,7 @@ namespace AZ
void RenderPipeline::OnStartFrame(const TickTimeInfo& tick)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
m_lastRenderStartTime = tick.m_currentGameTime;
@@ -21,6 +21,7 @@
#include <Atom/RPI.Public/View.h>
#include <AzCore/Debug/EventTrace.h>
#include <AzCore/Debug/Profiler.h>
#include <AzCore/Jobs/JobFunction.h>
#include <AzCore/Jobs/JobEmpty.h>
@@ -399,7 +400,7 @@ namespace AZ
AZ_ATOM_PROFILE_FUNCTION("RPI", "Scene: PrepareRender");
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "WaitForSimulationCompletion");
AZ_PROFILE_SCOPE(AzRender, "WaitForSimulationCompletion");
AZ_ATOM_PROFILE_TIME_GROUP_REGION("RPI", "WaitForSimulationCompletion");
WaitAndCleanCompletionJob(m_simulationCompletion);
}
@@ -407,7 +408,7 @@ namespace AZ
SceneNotificationBus::Event(GetId(), &SceneNotification::OnBeginPrepareRender);
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "m_srgCallback");
AZ_PROFILE_SCOPE(AzRender, "m_srgCallback");
AZ_ATOM_PROFILE_TIME_GROUP_REGION("RPI", "ShaderResourceGroupCallback: SrgCallback");
// Set values for scene srg
if (m_srg && m_srgCallback)
@@ -483,7 +484,7 @@ namespace AZ
}
{
AZ_PROFILE_SCOPE(Debug::ProfileCategory::AzRender, "CollectDrawPackets");
AZ_PROFILE_SCOPE(AzRender, "CollectDrawPackets");
AZ_ATOM_PROFILE_TIME_GROUP_REGION("RPI", "CollectDrawPackets");
AZ::JobCompletion* collectDrawPacketsCompletion = aznew AZ::JobCompletion();
@@ -533,7 +534,7 @@ namespace AZ
}
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzRender, "FinalizeDrawLists");
AZ_PROFILE_BEGIN(AzRender, "FinalizeDrawLists");
AZ_ATOM_PROFILE_TIME_GROUP_REGION("RPI", "FinalizeDrawLists");
if (jobPolicy == RHI::JobPolicy::Serial)
{
@@ -541,6 +542,7 @@ namespace AZ
{
view->FinalizeDrawLists();
}
AZ_PROFILE_END();
}
else
{
@@ -556,7 +558,7 @@ namespace AZ
finalizeDrawListsJob->SetDependent(finalizeDrawListsCompletion);
finalizeDrawListsJob->Start();
}
AZ_PROFILE_EVENT_END(Debug::ProfileCategory::AzRender);
AZ_PROFILE_END();
WaitAndCleanCompletionJob(finalizeDrawListsCompletion);
}
}
@@ -113,7 +113,7 @@ namespace AZ
return;
}
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
AZStd::lock_guard<AZStd::mutex> lock(m_metricsMutex);
@@ -297,7 +297,7 @@ namespace AZ
const ShaderVariant& Shader::GetVariant(const ShaderVariantId& shaderVariantId)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
Data::Asset<ShaderVariantAsset> shaderVariantAsset = m_asset->GetVariant(shaderVariantId, m_supervariantIndex);
if (!shaderVariantAsset || shaderVariantAsset->IsRootVariant())
{
@@ -314,14 +314,14 @@ namespace AZ
ShaderVariantSearchResult Shader::FindVariantStableId(const ShaderVariantId& shaderVariantId) const
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
ShaderVariantSearchResult variantSearchResult = m_asset->FindVariantStableId(shaderVariantId);
return variantSearchResult;
}
const ShaderVariant& Shader::GetVariant(ShaderVariantStableId shaderVariantStableId)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (!shaderVariantStableId.IsValid() || shaderVariantStableId == ShaderAsset::RootShaderVariantStableId)
{
@@ -237,7 +237,7 @@ namespace AZ
void View::FinalizeDrawLists()
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
m_drawListContext.FinalizeLists();
SortFinalizedDrawLists();
}
@@ -96,7 +96,7 @@ namespace AZ
const AZ::Vector3& rayStart, const AZ::Vector3& rayDir, bool allowBruteForce,
float& distanceNormalized, AZ::Vector3& normal) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
if (!m_modelTriangleCount)
{
@@ -172,7 +172,7 @@ namespace AZ
Data::Asset<ShaderVariantAsset> ShaderAsset::GetVariant(
const ShaderVariantId& shaderVariantId, SupervariantIndex supervariantIndex)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
auto variantFinder = AZ::Interface<IShaderVariantFinder>::Get();
AZ_Assert(variantFinder, "The IShaderVariantFinder doesn't exist");
@@ -189,7 +189,7 @@ namespace AZ
ShaderVariantSearchResult ShaderAsset::FindVariantStableId(const ShaderVariantId& shaderVariantId)
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
uint32_t dynamicOptionCount = aznumeric_cast<uint32_t>(GetShaderOptionGroupLayout()->GetShaderOptions().size());
ShaderVariantSearchResult variantSearchResult{RootShaderVariantStableId, dynamicOptionCount };
@@ -72,7 +72,7 @@ namespace AZ
ShaderVariantSearchResult ShaderVariantTreeAsset::FindVariantStableId(const ShaderOptionGroupLayout* shaderOptionGroupLayout, const ShaderVariantId& shaderVariantId) const
{
AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender);
AZ_PROFILE_FUNCTION(AzRender);
struct NodeToVisit
{
@@ -147,7 +147,7 @@ namespace SurfaceData
bool SurfaceDataMeshComponent::DoRayTrace(const AZ::Vector3& inPosition, AZ::Vector3& outPosition, AZ::Vector3& outNormal) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
AZStd::lock_guard<decltype(m_cacheMutex)> lock(m_cacheMutex);
@@ -233,7 +233,7 @@ namespace SurfaceData
void SurfaceDataMeshComponent::UpdateMeshData()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
bool meshValidBeforeUpdate = false;
bool meshValidAfterUpdate = false;
@@ -374,7 +374,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
void CAudioSystemImpl_wwise::Update([[maybe_unused]] const float updateIntervalMS)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
if (AK::SoundEngine::IsInitialized())
{
@@ -731,7 +731,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
EAudioRequestStatus CAudioSystemImpl_wwise::UpdateAudioObject(IATLAudioObjectData* const audioObjectData)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
EAudioRequestStatus result = eARS_FAILURE;
@@ -265,7 +265,7 @@ namespace Audio
auto callback = [&transferInfo](AZ::IO::FileRequestHandle request)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
AZ::IO::IStreamerTypes::RequestStatus status = AZ::Interface<AZ::IO::IStreamer>::Get()->GetRequestStatus(request);
switch (status)
{
+2 -2
View File
@@ -148,7 +148,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
void CAudioTranslationLayer::Update()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
auto current = AZStd::chrono::system_clock::now();
m_elapsedTime = AZStd::chrono::duration_cast<duration_ms>(current - m_lastUpdateTime);
@@ -2016,7 +2016,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
void CAudioTranslationLayer::DrawAudioSystemDebugInfo()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
// ToDo: Update to work with Atom? LYN-3677
/*if (CVars::s_debugDrawOptions.GetRawFlags() != 0)
@@ -9,6 +9,7 @@
#include <ATLComponents.h>
#include <AzCore/Debug/Profiler.h>
#include <AzCore/IO/FileIO.h>
#include <AzCore/std/functional.h>
#include <AzCore/std/string/string_view.h>
@@ -304,7 +305,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
void CAudioObjectManager::Update(const float fUpdateIntervalMS, const SATLWorldPosition& rListenerPosition)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
m_fTimeSinceLastVelocityUpdateMS += fUpdateIntervalMS;
const bool bUpdateVelocity = m_fTimeSinceLastVelocityUpdateMS > s_fVelocityUpdateIntervalMS;
@@ -317,7 +318,7 @@ namespace Audio
if (pObject->HasActiveEvents())
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Audio, "Inner Per-Object CAudioObjectManager::Update");
AZ_PROFILE_SCOPE(Audio, "Inner Per-Object CAudioObjectManager::Update");
pObject->Update(fUpdateIntervalMS, rListenerPosition);
@@ -936,7 +937,7 @@ namespace Audio
void CAudioEventListenerManager::NotifyListener(const SAudioRequestInfo* const pResultInfo)
{
// This should always be on the main thread!
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
auto found = AZStd::find_if(m_cListeners.begin(), m_cListeners.end(),
[pResultInfo](const SAudioEventListener& currentListener)
@@ -16,6 +16,7 @@
#include <AzCore/std/string/string_view.h>
#include <AzCore/std/typetraits/is_integral.h>
#include <AzCore/std/typetraits/is_unsigned.h>
#include <AzCore/std/time.h>
#define ATL_FLOAT_EPSILON (1.0e-6)
@@ -115,7 +115,7 @@ namespace Audio
void CAudioSystem::PushRequestBlocking(const SAudioRequest& audioRequestData)
{
// Main Thread!
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
CAudioRequestInternal request(audioRequestData);
@@ -201,7 +201,7 @@ namespace Audio
void CAudioSystem::InternalUpdate()
{
// Audio Thread!
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
auto startUpdateTime = AZStd::chrono::system_clock::now(); // stamp the start time
@@ -225,7 +225,7 @@ namespace Audio
#if !defined(AUDIO_RELEASE)
#if defined(PROVIDE_GETNAME_SUPPORT)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Audio, "Sync Debug Name Changes");
AZ_PROFILE_SCOPE(Audio, "Sync Debug Name Changes");
AZStd::lock_guard<AZStd::mutex> lock(m_debugNameStoreMutex);
m_debugNameStore.SyncChanges(m_oATL.GetDebugStore());
}
@@ -238,7 +238,7 @@ namespace Audio
auto elapsedUpdateTime = AZStd::chrono::duration_cast<duration_ms>(endUpdateTime - startUpdateTime);
if (elapsedUpdateTime < m_targetUpdatePeriod)
{
AZ_PROFILE_SCOPE_IDLE(AZ::Debug::ProfileCategory::Audio, "Wait Remaining Time in Update Period");
AZ_PROFILE_SCOPE(Audio, "Wait Remaining Time in Update Period");
m_processingEvent.try_acquire_for(m_targetUpdatePeriod - elapsedUpdateTime);
}
}
@@ -596,7 +596,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
void CAudioSystem::ProcessRequestBlocking(CAudioRequestInternal& request)
{
AZ_PROFILE_FUNCTION_STALL(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
if (m_oATL.CanProcessRequests())
{
@@ -616,7 +616,7 @@ namespace Audio
void CAudioSystem::ProcessRequestThreadSafe(CAudioRequestInternal request)
{
// Audio Thread!
AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::Audio, "Thread-Safe Request: %s", request.ToString().c_str());
AZ_PROFILE_SCOPE(Audio, "Thread-Safe Request: %s", request.ToString().c_str());
if (m_oATL.CanProcessRequests())
{
@@ -641,7 +641,7 @@ namespace Audio
{
// Todo: This should handle request priority, use request priority as bus Address and process in priority order.
AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::Audio, "Normal Request: %s", request.ToString().c_str());
AZ_PROFILE_SCOPE(Audio, "Normal Request: %s", request.ToString().c_str());
AZ_Assert(g_mainThreadId != AZStd::this_thread::get_id(), "AudioSystem::ProcessRequestByPriority - called from Main thread!");
@@ -672,7 +672,7 @@ namespace Audio
{
if (!(request.nInternalInfoFlags & eARIF_WAITING_FOR_REMOVAL))
{
AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::Audio, "Blocking Request: %s", request.ToString().c_str());
AZ_PROFILE_SCOPE(Audio, "Blocking Request: %s", request.ToString().c_str());
if (request.eStatus == eARS_NONE)
{
@@ -9,6 +9,7 @@
#include <FileCacheManager.h>
#include <AzCore/Debug/Profiler.h>
#include <AzCore/IO/FileIO.h>
#include <AzCore/IO/IStreamer.h>
#include <AzCore/IO/Path/Path.h>
@@ -61,7 +62,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////
void CFileCacheManager::Update()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
AudioFileCacheManagerNotficationBus::ExecuteQueuedEvents();
UpdatePreloadRequestsStatus();
@@ -538,7 +539,7 @@ namespace Audio
bool CFileCacheManager::FinishCachingFileInternal(CATLAudioFileEntry* const audioFileEntry, [[maybe_unused]] AZ::IO::SizeType bytesRead,
AZ::IO::IStreamerTypes::RequestStatus requestState)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
bool success = false;
audioFileEntry->m_asyncStreamRequest.reset();
@@ -640,7 +641,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////
bool CFileCacheManager::AllocateMemoryBlockInternal(CATLAudioFileEntry* const audioFileEntry)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
// Must not have valid memory yet.
AZ_Assert(!audioFileEntry->m_memoryBlock, "FileCacheManager AllocateMemoryBlockInternal - Memory appears to be set already!");
@@ -786,7 +787,7 @@ namespace Audio
const bool overrideUseCount /* = false */,
const size_t useCount /* = 0 */)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
bool success = false;
@@ -842,7 +843,7 @@ namespace Audio
audioFileEntry->m_asyncStreamRequest,
[this](AZ::IO::FileRequestHandle request)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
AudioFileCacheManagerNotficationBus::QueueBroadcast(
&AudioFileCacheManagerNotficationBus::Events::FinishAsyncStreamRequest,
request);
@@ -187,7 +187,7 @@ namespace Blast
void BlastFamilyComponent::Activate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
AZ_Assert(m_blastAsset.GetId().IsValid(), "BlastFamilyComponent created with invalid blast asset.");
@@ -199,7 +199,7 @@ namespace Blast
void BlastFamilyComponent::Deactivate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
// cleanup collision handlers
for (auto& itr : m_collisionHandlers)
@@ -216,7 +216,7 @@ namespace Blast
void BlastFamilyComponent::Spawn()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
if (!m_blastAsset.IsReady())
{
@@ -297,7 +297,7 @@ namespace Blast
void BlastFamilyComponent::Despawn()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
m_isSpawned = false;
@@ -414,7 +414,7 @@ namespace Blast
void BlastFamilyComponent::OnCollisionBegin(const AzPhysics::CollisionEvent& collisionEvent)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
for (const auto* body : {collisionEvent.m_body1, collisionEvent.m_body2})
{
@@ -493,7 +493,7 @@ namespace Blast
void BlastFamilyComponent::ApplyStressDamage()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
if (m_solver)
{
@@ -589,7 +589,7 @@ namespace Blast
// Update positions of entities with render meshes corresponding to their right dynamic bodies.
void BlastFamilyComponent::SyncMeshes()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
if (m_actorRenderManager)
{
@@ -112,7 +112,7 @@ namespace Blast
void BlastSystemComponent::Activate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
auto blastAssetHandler = aznew BlastAssetHandler();
blastAssetHandler->Register();
m_assetHandlers.emplace_back(blastAssetHandler);
@@ -141,7 +141,7 @@ namespace Blast
void BlastSystemComponent::Deactivate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
CrySystemEventBus::Handler::BusDisconnect();
AZ::TickBus::Handler::BusDisconnect();
BlastSystemRequestBus::Handler::BusDisconnect();
@@ -185,7 +185,7 @@ namespace Blast
void BlastSystemComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
AZ::JobCompletion jobCompletion;
@@ -226,18 +226,18 @@ namespace Blast
for (auto& group : m_groups)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Physics, "ExtGroupTaskManager::process");
AZ_PROFILE_SCOPE(Physics, "ExtGroupTaskManager::process");
group.m_extGroupTaskManager->process();
}
for (auto& group : m_groups)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Physics, "ExtGroupTaskManager::wait");
AZ_PROFILE_SCOPE(Physics, "ExtGroupTaskManager::wait");
group.m_extGroupTaskManager->wait();
}
// Clean up damage descriptions and program params now that groups have run.
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Physics, "BlastSystemComponent::OnTick::Cleanup");
AZ_PROFILE_SCOPE(Physics, "BlastSystemComponent::OnTick::Cleanup");
m_radialDamageDescs.clear();
m_capsuleDamageDescs.clear();
m_shearDamageDescs.clear();
@@ -248,7 +248,7 @@ namespace Blast
if (gEnv && m_debugRenderMode)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Physics, "BlastSystemComponent::OnTick::DebugRender");
AZ_PROFILE_SCOPE(Physics, "BlastSystemComponent::OnTick::DebugRender");
DebugRenderBuffer buffer;
BlastFamilyComponentRequestBus::Broadcast(
&BlastFamilyComponentRequests::FillDebugRenderBuffer, buffer, m_debugRenderMode);
@@ -428,12 +428,12 @@ namespace Blast
void BlastSystemComponent::AZBlastProfilerCallback::zoneStart(const char* eventName)
{
AZ_PROFILE_EVENT_BEGIN(AZ::Debug::ProfileCategory::Physics, eventName);
AZ_PROFILE_BEGIN(Physics, eventName);
}
void BlastSystemComponent::AZBlastProfilerCallback::zoneEnd()
{
AZ_PROFILE_EVENT_END(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_END();
}
static void CmdToggleBlastDebugVisualization(IConsoleCmdArgs* args)
@@ -96,7 +96,7 @@ namespace Blast
void EditorBlastFamilyComponent::Activate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
if (m_blastAsset.GetId().IsValid())
{
@@ -107,7 +107,7 @@ namespace Blast
void EditorBlastFamilyComponent::Deactivate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
AZ::Data::AssetBus::MultiHandler::BusDisconnect();
}
@@ -86,7 +86,7 @@ namespace Blast
void EditorBlastMeshDataComponent::Activate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
OnMeshAssetsChanged();
m_meshFeatureProcessor =
@@ -100,7 +100,7 @@ namespace Blast
void EditorBlastMeshDataComponent::Deactivate()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
EditorComponentBase::Deactivate();
AZ::Render::MaterialComponentNotificationBus::Handler::BusDisconnect(GetEntityId());
AZ::TransformNotificationBus::Handler::BusDisconnect(GetEntityId());
@@ -33,7 +33,7 @@ namespace Blast
void ActorRenderManager::OnActorCreated(const BlastActor& actor)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
const AZStd::vector<uint32_t>& chunkIndices = actor.GetChunkIndices();
@@ -47,7 +47,7 @@ namespace Blast
void ActorRenderManager::OnActorDestroyed(const BlastActor& actor)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
const AZStd::vector<uint32_t>& chunkIndices = actor.GetChunkIndices();
@@ -62,7 +62,7 @@ namespace Blast
{
// It is more natural to have chunk entities be transform children of rigid body entity,
// however having them separate and manually synchronizing transform is more efficient.
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
for (auto chunkId = 0u; chunkId < m_chunkCount; ++chunkId)
{
@@ -6,6 +6,7 @@
*
*/
#include <AzCore/Debug/Profiler.h>
#include <AzCore/Math/Transform.h>
#include <Family/ActorTracker.h>
#include <algorithm>
@@ -46,7 +47,7 @@ namespace Blast
BlastActor* ActorTracker::FindClosestActor(const AZ::Vector3& position)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
const auto candidate = std::min_element(
m_actors.begin(), m_actors.end(),
@@ -122,7 +122,7 @@ namespace Blast
void BlastFamilyImpl::HandleEvents(const Nv::Blast::TkEvent* events, uint32_t eventCount)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
AZStd::vector<BlastActorDesc> newActors;
AZStd::unordered_set<BlastActor*> actorsToDelete;
@@ -150,7 +150,7 @@ namespace Blast
const Nv::Blast::TkSplitEvent* splitEvent, AZStd::vector<BlastActorDesc>& newActors,
AZStd::unordered_set<BlastActor*>& actorsToDelete)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
AZ_Assert(splitEvent, "Received null TkSplitEvent from the Blast library.");
if (!splitEvent)
@@ -256,7 +256,7 @@ namespace Blast
void BlastFamilyImpl::CreateActors(const AZStd::vector<BlastActorDesc>& actorDescs)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
for (auto& actorDesc : actorDescs)
{
@@ -268,7 +268,7 @@ namespace Blast
void BlastFamilyImpl::DestroyActors(const AZStd::unordered_set<BlastActor*>& actors)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
for (const auto actor : actors)
{
@@ -294,14 +294,14 @@ namespace Blast
void BlastFamilyImpl::DispatchActorCreated(const BlastActor& actor)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
m_listener->OnActorCreated(*this, actor);
}
void BlastFamilyImpl::DispatchActorDestroyed(const BlastActor& actor)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Physics);
AZ_PROFILE_FUNCTION(Physics);
m_listener->OnActorDestroyed(*this, actor);
}
@@ -190,7 +190,7 @@ namespace EMotionFX
// update
void EMotionFXManager::Update(float timePassedInSeconds)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Animation, "EMotionFXManager::Update");
AZ_PROFILE_SCOPE(Animation, "EMotionFXManager::Update");
m_debugDraw->Clear();
m_recorder->UpdatePlayMode(timePassedInSeconds);
@@ -20,6 +20,9 @@
#include <EMotionFX/Source/EventInfo.h>
#include <EMotionFX/Source/MotionInstancePool.h>
#if defined GetCurrentTime
#undef GetCurrentTime
#endif
namespace EMotionFX
{
@@ -165,7 +165,7 @@ namespace EMotionFX
AZ::JobContext* jobContext = nullptr;
AZ::Job* job = AZ::CreateJobFunction([this, timePassedInSeconds, actorInstance]()
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Animation, "MultiThreadScheduler::Execute::ActorInstanceUpdateJob");
AZ_PROFILE_SCOPE(Animation, "MultiThreadScheduler::Execute::ActorInstanceUpdateJob");
const AZ::u32 threadIndex = AZ::JobContext::GetGlobalContext()->GetJobManager().GetWorkerThreadId();
actorInstance->SetThreadIndex(threadIndex);
@@ -542,7 +542,7 @@ namespace EMotionFX
//////////////////////////////////////////////////////////////////////////
void ActorComponent::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Animation);
AZ_PROFILE_FUNCTION(Animation);
if (!m_actorInstance || !m_actorInstance->GetIsEnabled())
{
@@ -8,6 +8,7 @@
#include <ExpressionEvaluationSystemComponent.h>
#include <AzCore/Debug/Profiler.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/Serialization/EditContextConstants.inl>
@@ -251,7 +252,7 @@ namespace ExpressionEvaluation
AZ::Outcome<void, ParsingError> ExpressionEvaluationSystemComponent::ParseRestrictedExpressionInPlace(const AZStd::unordered_set<ExpressionParserId>& parsers, AZStd::string_view expressionString, ExpressionTree& expressionTree) const
{
AZ_PROFILE_TIMER("ExpressionEvaluation", __FUNCTION__);
AZ_PROFILE_FUNCTION(ExpressionEvaluation);
expressionTree.ClearTree();
@@ -513,7 +514,7 @@ namespace ExpressionEvaluation
ExpressionResult ExpressionEvaluationSystemComponent::Evaluate(const ExpressionTree& expressionTree) const
{
AZ_PROFILE_TIMER("ExpressionEvaluation", __FUNCTION__);
AZ_PROFILE_FUNCTION(ExpressionEvaluation);
ExpressionResultStack resultStack;
@@ -10,6 +10,7 @@
#include <AzCore/Math/Vector3.h>
#include <AzCore/Component/EntityId.h>
#include <AzCore/Debug/Profiler.h>
#include <AzCore/Outcome/Outcome.h>
#include <AzCore/Memory/Memory.h>
#include <AzCore/RTTI/ReflectContext.h>
@@ -87,7 +88,7 @@ namespace GradientSignal
inline float GradientSampler::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
if (m_opacity <= 0.0f || !m_gradientId.IsValid())
{
@@ -224,7 +224,7 @@ namespace GradientSignal
float DitherGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
const AZ::Vector3& coordinate = sampleParams.m_position;
@@ -263,7 +263,7 @@ namespace GradientSignal
void GradientSurfaceDataComponent::OnCompositionChanged()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
UpdateRegistryAndCache(m_modifierHandle);
}
@@ -324,7 +324,7 @@ namespace GradientSignal
void GradientTransformComponent::TransformPositionToUVW(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, const bool shouldNormalizeOutput, bool& wasPointRejected) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
AZStd::lock_guard<decltype(m_cacheMutex)> lock(m_cacheMutex);
@@ -415,7 +415,7 @@ namespace GradientSignal
void GradientTransformComponent::UpdateFromShape()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
AZStd::lock_guard<decltype(m_cacheMutex)> lock(m_cacheMutex);
@@ -190,7 +190,7 @@ namespace GradientSignal
float ImageGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
AZ::Vector3 uvw = sampleParams.m_position;
@@ -172,7 +172,7 @@ namespace GradientSignal
float LevelsGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
float output = 0.0f;
@@ -257,7 +257,7 @@ namespace GradientSignal
float MixedGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
//accumulate the mixed/combined result of all layers and operations
float result = 0.0f;
@@ -172,7 +172,7 @@ namespace GradientSignal
float PerlinGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
if (m_perlinImprovedNoise)
{
@@ -137,7 +137,7 @@ namespace GradientSignal
float RandomGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
AZ::Vector3 uvw = sampleParams.m_position;
@@ -131,7 +131,7 @@ namespace GradientSignal
float ReferenceGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
float output = 0.0f;
@@ -157,7 +157,7 @@ namespace GradientSignal
float ShapeAreaFalloffGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
float distance = 0.0f;
LmbrCentral::ShapeComponentRequestsBus::EventResult(distance, m_configuration.m_shapeEntityId, &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceFromPoint, sampleParams.m_position);
@@ -244,7 +244,7 @@ namespace GradientSignal
void SurfaceAltitudeGradientComponent::UpdateFromShape()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
AZStd::lock_guard<decltype(m_cacheMutex)> lock(m_cacheMutex);
@@ -161,7 +161,7 @@ namespace GradientSignal
float SurfaceMaskGradientComponent::GetValue(const GradientSampleParams& params) const
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
float result = 0.0f;
@@ -153,7 +153,7 @@ namespace GradientSignal
float GetValueFromImageAsset(const AZ::Data::Asset<ImageAsset>& imageAsset, const AZ::Vector3& uvw, float tilingX, float tilingY, float defaultValue)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
if (imageAsset.IsReady())
{
@@ -9,12 +9,12 @@
#include <AzCore/Debug/Profiler.h>
#define GRAPH_CANVAS_PROFILE_FUNCTION() AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
#define GRAPH_CANVAS_PROFILE_SCOPE(message) AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, message);
#define GRAPH_CANVAS_PROFILE_FUNCTION() AZ_PROFILE_FUNCTION(AzToolsFramework);
#define GRAPH_CANVAS_PROFILE_SCOPE(message) AZ_PROFILE_SCOPE(AzToolsFramework, message);
#if GRAPH_CANVAS_ENABLE_DETAILED_PROFILING
#define GRAPH_CANVAS_DETAILED_PROFILE_FUNCTION() AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
#define GRAPH_CANVAS_DETAILED_PROFILE_SCOPE(message) AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, message);
#define GRAPH_CANVAS_DETAILED_PROFILE_FUNCTION() AZ_PROFILE_FUNCTION(AzToolsFramework);
#define GRAPH_CANVAS_DETAILED_PROFILE_SCOPE(message) AZ_PROFILE_SCOPE(AzToolsFramework, message);
#else
#define GRAPH_CANVAS_DETAILED_PROFILE_FUNCTION()
#define GRAPH_CANVAS_DETAILED_PROFILE_SCOPE(message)
@@ -10,6 +10,7 @@
#include <AzCore/Component/EntityBus.h>
#include <AzCore/Component/TransformBus.h>
#include <AzCore/Debug/Profiler.h>
#include <LmbrCentral/Shape/ShapeComponentBus.h>
#include <LmbrCentral/Dependency/DependencyNotificationBus.h>
#include <AzCore/Asset/AssetCommon.h>
@@ -15,7 +15,7 @@ namespace LmbrCentral
inline void DependencyMonitor::Reset()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
AZ::Data::AssetBus::MultiHandler::BusDisconnect();
AZ::EntityBus::MultiHandler::BusDisconnect();
@@ -35,7 +35,7 @@ namespace LmbrCentral
inline void DependencyMonitor::ConnectDependency(const AZ::EntityId& entityId)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
if (entityId.IsValid())
{
AZ::EntityBus::MultiHandler::BusConnect(entityId);
@@ -47,7 +47,7 @@ namespace LmbrCentral
inline void DependencyMonitor::ConnectDependencies(const AZStd::vector<AZ::EntityId>& entityIds)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
for (const auto& entityId : entityIds)
{
@@ -57,7 +57,7 @@ namespace LmbrCentral
inline void DependencyMonitor::ConnectDependency(const AZ::Data::AssetId& assetId)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
if (assetId.IsValid())
{
@@ -120,7 +120,7 @@ namespace LmbrCentral
inline void DependencyMonitor::SendNotification()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
AZ_PROFILE_FUNCTION(Entity);
//test if notification is in progress to prevent recursion in case of nested dependencies
if (!m_notificationInProgress)
@@ -595,7 +595,7 @@ bool PropertiesContainer::DoesIntersectNonSelectedComponentEditor(const QRect& g
void PropertiesContainer::ClearComponentEditorSelection()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
for (auto componentEditor : m_componentEditors)
{
componentEditor->SetSelected(false);
+5 -5
View File
@@ -158,7 +158,7 @@ bool UiSliceManager::MakeNewSlice(
bool inheritSlices,
AZ::SerializeContext* serializeContext)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (entities.empty())
{
@@ -240,7 +240,7 @@ bool UiSliceManager::MakeNewSlice(
// Setup and execute transaction for the new slice.
//
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "UiSliceManager::MakeNewSlice:SetupAndExecuteTransaction");
AZ_PROFILE_SCOPE(AzToolsFramework, "UiSliceManager::MakeNewSlice:SetupAndExecuteTransaction");
using AzToolsFramework::SliceUtilities::SliceTransaction;
@@ -249,7 +249,7 @@ bool UiSliceManager::MakeNewSlice(
[this, &entitiesToInclude, &commonParent, &insertBefore]
(SliceTransaction::TransactionPtr transaction, const char* fullPath, const SliceTransaction::SliceAssetPtr& /*asset*/) -> void
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "UiSliceManager::MakeNewSlice:PostSaveCallback");
AZ_PROFILE_SCOPE(AzToolsFramework, "UiSliceManager::MakeNewSlice:PostSaveCallback");
// Once the asset is processed and ready, we can replace the source entities with an instance of the new slice.
UiEditorEntityContextRequestBus::Event(m_entityContextId,
&UiEditorEntityContextRequestBus::Events::QueueSliceReplacement,
@@ -260,7 +260,7 @@ bool UiSliceManager::MakeNewSlice(
// Add entities
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "UiSliceManager::MakeNewSlice:SetupAndExecuteTransaction:AddEntities");
AZ_PROFILE_SCOPE(AzToolsFramework, "UiSliceManager::MakeNewSlice:SetupAndExecuteTransaction:AddEntities");
for (const AZ::EntityId& entityId : orderedEntityList)
{
SliceTransaction::Result addResult = transaction->AddEntity(entityId, !inheritSlices ? SliceTransaction::SliceAddEntityFlags::DiscardSliceAncestry : 0);
@@ -348,7 +348,7 @@ AzToolsFramework::SliceUtilities::SliceTransaction::Result SlicePreSaveCallbackF
[[maybe_unused]] const char* fullPath,
AzToolsFramework::SliceUtilities::SliceTransaction::SliceAssetPtr& asset)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "SlicePreSaveCallbackForUiEntities");
AZ_PROFILE_SCOPE(AzToolsFramework, "SlicePreSaveCallbackForUiEntities");
// we want to ensure that "bad" data never gets pushed to a slice
// This mostly relates to the m_childEntityIdOrder array since this is something that
@@ -12,6 +12,7 @@
#include <LZ4Compressor.h>
#include <AzCore/Compression/Compression.h>
#include <AzCore/std/chrono/clocks.h>
#include <AzNetworking/DataStructures/ByteBuffer.h>
#include <AzNetworking/Serialization/NetworkInputSerializer.h>
#include <AzTest/AzTest.h>
@@ -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;
+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,26 +106,26 @@ 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;
}
void zoneEnd([[maybe_unused]] void* profilerData,
const char* eventName, bool detached,
[[maybe_unused]] const char* eventName, bool detached,
[[maybe_unused]] uint64_t contextId) override
{
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)
{

Some files were not shown because too many files have changed in this diff Show More