Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore/Private/RenderGraphBlackboard.cpp
christopher waters 1f21b73b25 Ran IWYU on RHI and RenderCore, private only.
#preflight 63d358c85c69f453c1f79c37

[CL 23889591 by christopher waters in ue5-main branch]
2023-01-27 14:54:10 -05:00

30 lines
684 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "RenderGraphBlackboard.h"
#include "Containers/Map.h"
FString FRDGBlackboard::GetTypeName(const TCHAR* ClassName, const TCHAR* FileName, uint32 LineNumber)
{
return FString::Printf(TEXT("%s %s %d"), ClassName, FileName, LineNumber);
}
uint32 FRDGBlackboard::AllocateIndex(FString&& TypeName)
{
check(IsInRenderingThread());
static TMap<FString, uint32> StructMap;
static uint32 NextIndex = 0;
uint32 Result;
if (const uint32* FoundIndex = StructMap.Find(TypeName))
{
Result = *FoundIndex;
}
else
{
StructMap.Emplace(MoveTemp(TypeName), NextIndex);
Result = NextIndex;
NextIndex++;
}
return Result;
}