Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore/Internal/ShaderDiagnostics.h
dan elksnitis 8426eb0760 [shaders] fix yet another shader error reporting path (non-default materials also have their own path for this); fixed by not relying on calling code to merge the generated error prefix + actual error message
#test forced a shader compile error in both default and non-default materials and ensured output includes additional diagnostic information.
#rb massimo.tristano

[CL 33837329 by dan elksnitis in ue5-main branch]
2024-05-22 14:04:40 -04:00

30 lines
887 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/Array.h"
#include "RHIShaderPlatform.h"
#include "ShaderCompilerJobTypes.h"
struct FShaderDiagnosticInfo
{
TArray<FShaderCommonCompileJob*> ErrorJobs;
TArray<FString> UniqueErrors;
TArray<FString> UniqueWarnings;
TArray<EShaderPlatform> ErrorPlatforms;
FString TargetShaderPlatformString;
RENDERCORE_API FShaderDiagnosticInfo(const TArray<FShaderCommonCompileJobPtr>& Jobs);
private:
void AddAndProcessErrorsForJob(FShaderCommonCompileJob& Job);
int32 AddAndProcessErrorsForFailedJobFiltered(FShaderCompileJob& Job, const TCHAR* FilterMessage);
void AddWarningsForJob(const FShaderCommonCompileJob& Job);
TArray<uint32> UniqueErrorHashes;
};
RENDERCORE_API FString GetSingleJobCompilationDump(const FShaderCompileJob* SingleJob);
RENDERCORE_API bool IsShaderDevelopmentModeEnabled();