Description

ALLOW_DITHERED_LOD_FOR_INSTANCED_STATIC_MESHES works without crashing in ue4.27.
It appears that this code path is not maintained in ue5.

 

Steps to Reproduce
  1. Set ALLOW_DITHERED_LOD_FOR_INSTANCED_STATIC_MESHES macro to 0 in MaterialShared.h
  2. Compile Editor
  3. Launch the editor and create a project
  4. Create new blueprint
  5. Add an InstancedMeshComponent in component panel
  6. Select the component
  7. Set some kind of mesh to the StaticMesh property in Details panel
  8. Press "+" button on Instances property

Result : 

Editor crushes with message : 

Fatal error: [File:D:\dev\UnrealEngine-5.0.3\Engine\Source\Runtime\D3D12RHI\Private\D3D12VertexDeclaration.cpp] [Line: 55] 
Unknown RHI vertex element type 0

 

Callstack
[Inline Frame] UnrealEditor-D3D12RHI.dll!FD3D12VertexDeclarationKey::{ctor}::__l11::<lambda_d07fb6281a482629a7b99bf5d71fb062>::()::__l9::<lambda_9484031dc0c51f2c37a48cee618f2c9e>::operator()() Line 55	C++
[Inline Frame] UnrealEditor-D3D12RHI.dll!FD3D12VertexDeclarationKey::{ctor}::__l11::<lambda_d07fb6281a482629a7b99bf5d71fb062>::operator()(const FLogCategoryLogD3D12RHI &) Line 55	C++
UnrealEditor-D3D12RHI.dll!DispatchCheckVerify<void,<lambda_d07fb6281a482629a7b99bf5d71fb062>,FLogCategoryLogD3D12RHI,wchar_t [35],unsigned char>(FD3D12VertexDeclarationKey::{ctor}::__l11::<lambda_d07fb6281a482629a7b99bf5d71fb062> && Inner, const FLogCategoryLogD3D12RHI & <Args_0>, const wchar_t[35] & <Args_1>, const unsigned char & <Args_2>) Line 169	C++
UnrealEditor-D3D12RHI.dll!FD3D12VertexDeclarationKey::FD3D12VertexDeclarationKey(const TArray<FVertexElement,TFixedAllocator<17>> & InElements) Line 60	C++
UnrealEditor-D3D12RHI.dll!FD3D12DynamicRHI::RHICreateVertexDeclaration(const TArray<FVertexElement,TFixedAllocator<17>> & Elements) Line 154	C++
[Inline Frame] UnrealEditor-RHI.dll!RHICreateVertexDeclaration(const TArray<FVertexElement,TFixedAllocator<17>> &) Line 1382	C++
UnrealEditor-RHI.dll!PipelineStateCache::GetOrCreateVertexDeclaration(const TArray<FVertexElement,TFixedAllocator<17>> & Elements) Line 1712	C++
UnrealEditor-RenderCore.dll!FVertexFactory::InitDeclaration(const TArray<FVertexElement,TFixedAllocator<17>> & Elements, EVertexInputStreamType StreamType) Line 325	C++
UnrealEditor-Engine.dll!FInstancedStaticMeshVertexFactory::InitRHI::__l15::<lambda>(EVertexInputStreamType InputStreamType) Line 860	C++
UnrealEditor-Engine.dll!FInstancedStaticMeshVertexFactory::InitRHI() Line 862	C++
UnrealEditor-RenderCore.dll!FRenderResource::InitResource() Line 120	C++
UnrealEditor-Engine.dll!FInstancedStaticMeshRenderData::BindBuffersToVertexFactories() Line 1011	C++
[Inline Frame] UnrealEditor-Engine.dll!FInstancedStaticMeshRenderData::InitVertexFactories::__l2::<lambda_3d2cdd647c2ae4c9702aa3c96c13d7ed>::operator()(FRHICommandListImmediate &) Line 1059	C++
UnrealEditor-Engine.dll!TEnqueueUniqueRenderCommandType<`FInstancedStaticMeshRenderData::InitVertexFactories'::`2'::InstancedStaticMeshRenderData_InitVertexFactoriesName,<lambda_3d2cdd647c2ae4c9702aa3c96c13d7ed>>::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 193	C++
UnrealEditor-Engine.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FInstancedStaticMeshRenderData::InitVertexFactories'::`2'::InstancedStaticMeshRenderData_InitVertexFactoriesName,<lambda_3d2cdd647c2ae4c9702aa3c96c13d7ed>>>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 975	C++
[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 587	C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 753	C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 642	C++
UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type CurrentThread) Line 2115	C++
UnrealEditor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 380	C++
UnrealEditor-RenderCore.dll!FRenderingThread::Run() Line 546	C++
UnrealEditor-Core.dll!FRunnableThreadWin::Run() Line 146	C++
UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() Line 68	C++

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Rendering
Affects Versions5.0
Target Fix5.2
Fix Commit23827821
Main Commit23827821
CreatedNov 11, 2022
ResolvedJan 24, 2023
UpdatedFeb 4, 2023