Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Private/ShaderStatsCollector.h
dan elksnitis fbd6fc59d6 [shaders]
- move responsibility for logging shader stats out of ShaderCompiler and into a tickable editor/cook object
- add aggregation of shader stats for multiprocess cooks
- add an option to report stats individually on all cook processes driven by cvar (the aggregated stats will always be reported)

#rnx
#rb Jason.Nadro
#rb Matt.Peters

[CL 26511022 by dan elksnitis in ue5-main branch]
2023-07-21 10:33:13 -04:00

31 lines
871 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Cooker/CookMPCollector.h"
#include "TickableEditorObject.h"
class FShaderStatsAggregator : public UE::Cook::IMPCollector{
public:
enum class EMode
{
Worker,
Director,
};
FShaderStatsAggregator(EMode Mode);
virtual FGuid GetMessageType() const override { return MessageType; }
virtual const TCHAR* GetDebugName() const override { return TEXT("FShaderStatsAggregator"); }
virtual void ClientTick(UE::Cook::FMPCollectorClientTickContext& Context) override;
virtual void ServerReceiveMessage(UE::Cook::FMPCollectorServerMessageContext& Context, FCbObjectView Message) override;
static FGuid MessageType;
private:
friend class FShaderStatsFunctions;
friend class FShaderStatsReporter;
EMode Mode;
TArray<FShaderCompilerStats> WorkerCompilerStats;
float LastSynchTime = 0.0f;
};