You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- 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]
31 lines
871 B
C++
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;
|
|
};
|