Files
UnrealEngine/Engine/Source/Editor/UnrealEd/Private/ShaderStatsCollector.h
2025-05-18 13:04:45 +08:00

32 lines
895 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Cooker/MPCollector.h"
#include "ShaderCompiler.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;
};