Description

UDN: [Link Removed]

In order to make it easier to track down (future) assets that could cause this crash we modified EmitNullShaderParameterFatalError() to also dump the asset filename if possible:

 

void EmitNullShaderParameterFatalError(const TShaderRef<FShader>& Shader, const FShaderParametersMetadata* ParametersMetadata, uint16 MemberOffset)

{

FString MemberName = ParametersMetadata->GetFullMemberCodeName(MemberOffset);

const TCHAR* ShaderClassName = Shader.GetType()->GetName();

 

FString OwnerName("File unknown");

#if !UE_BUILD_SHIPPING

const FShaderMapBase* ShaderMap = Shader.GetShaderMap();

if (ShaderMap)

{

FShaderMapResource* ShaderResource = ShaderMap->GetResource();

if (ShaderResource)

{

OwnerName = ShaderResource->GetOwnerName().ToString();

}

}

#endif

UE_LOG(LogShaders, Fatal,

TEXT("%s's required shader parameter %s::%s was not set. [%s]"),

ShaderClassName,

ParametersMetadata->GetStructTypeName(),

*MemberName,

*OwnerName);

}

 

Q. Do we need to "guard" this with an #if RHI_ENABLE_RESOURCE_INFO ... #endif ?

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-210422 in the post.

0
Login to Vote

Backlogged
CreatedMar 22, 2024
UpdatedMar 26, 2024
View Jira Issue