Add memory profiling events to the main areas of the engine
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Profiler/ProfilerMemory.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#include "Engine/Threading/TaskGraph.h"
|
||||
#include "Engine/Threading/Task.h"
|
||||
@@ -55,6 +56,7 @@ Array<TextureGroup, InlinedAllocation<32>> Streaming::TextureGroups;
|
||||
|
||||
void StreamingSettings::Apply()
|
||||
{
|
||||
PROFILE_MEM(ContentStreaming);
|
||||
Streaming::TextureGroups = TextureGroups;
|
||||
SAFE_DELETE_GPU_RESOURCES(TextureGroupSamplers);
|
||||
TextureGroupSamplers.Resize(TextureGroups.Count(), false);
|
||||
@@ -91,6 +93,7 @@ void StreamableResource::StartStreaming(bool isDynamic)
|
||||
_isDynamic = isDynamic;
|
||||
if (!_isStreaming)
|
||||
{
|
||||
PROFILE_MEM(ContentStreaming);
|
||||
_isStreaming = true;
|
||||
ResourcesLock.Lock();
|
||||
Resources.Add(this);
|
||||
@@ -201,6 +204,7 @@ void UpdateResource(StreamableResource* resource, double currentTime)
|
||||
|
||||
bool StreamingService::Init()
|
||||
{
|
||||
PROFILE_MEM(ContentStreaming);
|
||||
System = New<StreamingSystem>();
|
||||
Engine::UpdateGraph->AddSystem(System);
|
||||
return false;
|
||||
@@ -217,6 +221,7 @@ void StreamingService::BeforeExit()
|
||||
void StreamingSystem::Job(int32 index)
|
||||
{
|
||||
PROFILE_CPU_NAMED("Streaming.Job");
|
||||
PROFILE_MEM(ContentStreaming);
|
||||
|
||||
// TODO: use streaming settings
|
||||
const double ResourceUpdatesInterval = 0.1;
|
||||
|
||||
Reference in New Issue
Block a user