Description

The editor crashes when activating cvar options for shader compilation and debugging.

Steps to Reproduce
  1. Set the following CVARs in Engine/Config/ConsoleVariables.ini (do not try to set them r.Shaders.Optimize in any other file otherwise it won't get set due to [Link Removed]) 
    r.ShaderDevelopmentMode=1
    r.Shaders.Optimize=0
    r.Shaders.Symbols=1
    r.Shaders.ExtraData=1
  2. Launch the Editor

Expected

The Editor launches without errors

Actual

The Editor crashes with:

Fatal error: [File:D:\p4\ue-5.4\Engine\Source\Runtime\RHICore\Public\RHICoreShader.h] [Line: 178] 
Uniform buffer bound to slot 5 is not what the shader expected:
    Bound                : Uniform Buffer[FSceneTextureUniformParameters] with Hash[0x09700e08]
    Expected             : Uniform Buffer[Scene] with Hash[0x008c1f51]
    Shader Name          : m_SimpleVolumetricCloud_809c8f8184c2eee9/Default/FLocalVertexFactory/FRenderVolumetricCloudRenderViewCS/18:/Engine/Private/VolumetricCloud.usf|MainCS
    Layout CB Size       : 112
    Layout Num Resources : 14
    Resource Types       : 9 9 9 9 9 9 9 9 9 9 9 9 12 8
Callstack

>    [Inline Frame] UnrealEditor-Core.dll!UE::Logging::Private::BasicFatalLog::__l2::<lambda>() Line 1088    C++
     UnrealEditor-Core.dll!UE::Logging::Private::BasicFatalLog(const FLogCategoryBase & Category, const UE::Logging::Private::FStaticBasicLogRecord * Log, ...) Line 1088    C++
     UnrealEditor-D3D12RHI.dll!UE::RHICore::SetResourcesFromTables<FD3D12ResourceBinder &,FD3D12UniformBuffer * [16],unsigned short>(FD3D12ResourceBinder & Binder, const FRHIShader & Shader, const FShaderResourceTable & SRT, unsigned short & DirtyUniformBuffers, FD3D12UniformBuffer * const[16] & BoundUniformBuffers, RHIValidation::FTracker * Tracker) Line 178    C++
     [Inline Frame] UnrealEditor-D3D12RHI.dll!FD3D12CommandContext::SetResourcesFromTables(const FD3D12ComputeShader * Shader) Line 1487    C++
     [Inline Frame] UnrealEditor-D3D12RHI.dll!FD3D12CommandContext::CommitComputeResourceTables() Line 1541    C++
     UnrealEditor-D3D12RHI.dll!FD3D12CommandContext::SetupDispatch(unsigned int ThreadGroupCountX, unsigned int ThreadGroupCountY, unsigned int ThreadGroupCountZ) Line 106    C++
     UnrealEditor-D3D12RHI.dll!FD3D12CommandContext::RHIDispatchComputeShader(unsigned int ThreadGroupCountX, unsigned int ThreadGroupCountY, unsigned int ThreadGroupCountZ) Line 136    C++
     [Inline Frame] UnrealEditor-Renderer.dll!FRHIComputeCommandList::DispatchComputeShader(unsigned int ThreadGroupCountX, unsigned int ThreadGroupCountY, unsigned int ThreadGroupCountZ) Line 2771    C++
     UnrealEditor-Renderer.dll!UE::MeshPassUtils::Dispatch<FRenderVolumetricCloudRenderViewCS>(FRHIComputeCommandList & RHICmdList, const TShaderRefBase<FRenderVolumetricCloudRenderViewCS,FShaderMapPointerTable> & ComputeShader, const FMeshDrawShaderBindings & ShaderBindings, const FRenderVolumetricCloudRenderViewCS::FParameters & PassParameters, UE::Math::TIntVector3<int> GroupCount) Line 48    C++
     [Inline Frame] UnrealEditor-Renderer.dll!FSceneRenderer::RenderVolumetricCloudsInternal::__l33::<lambda_4>::operator()(FRHIComputeCommandList &) Line 2438    C++
     [Inline Frame] UnrealEditor-Renderer.dll!TRDGLambdaPass<FRenderVolumetricCloudRenderViewCS::FParameters,`FSceneRenderer::RenderVolumetricCloudsInternal'::`33'::<lambda_4>>::ExecuteLambdaFunc(FRHIComputeCommandList &) Line 617    C++
     UnrealEditor-Renderer.dll!TRDGLambdaPass<FRenderVolumetricCloudRenderViewCS::FParameters,`FSceneRenderer::RenderVolumetricCloudsInternal'::`33'::<lambda_4>>::Execute(FRHIComputeCommandList & RHICmdList) Line 626    C++
     UnrealEditor-RenderCore.dll!FRDGBuilder::ExecutePass(FRDGPass * Pass, FRHIComputeCommandList & RHICmdListPass) Line 3017    C++
     UnrealEditor-RenderCore.dll!FRDGBuilder::SetupAuxiliaryPasses(FRDGPass * Pass) Line 2391    C++
     UnrealEditor-RenderCore.dll!FRDGBuilder::SetupParameterPass(FRDGPass * Pass) Line 2418    C++
     [Inline Frame] UnrealEditor-Renderer.dll!FRDGBuilder::AddPassInternal(FRDGEventName && ParametersMetadata, const FShaderParametersMetadata *) Line 285    C++
     [Inline Frame] UnrealEditor-Renderer.dll!FRDGBuilder::AddPass(FRDGEventName &&) Line 314    C++
     UnrealEditor-Renderer.dll!FSceneRenderer::RenderVolumetricCloudsInternal(FRDGBuilder & GraphBuilder, FCloudRenderContext & CloudRC, FInstanceCullingManager & InstanceCullingManager) Line 2424    C++
     UnrealEditor-Renderer.dll!FSceneRenderer::RenderVolumetricCloud(FRDGBuilder & GraphBuilder, const FMinimalSceneTextures & SceneTextures, bool bSkipVolumetricRenderTarget, bool bSkipPerPixelTracing, bool bAccumulateAlphaHoldOut, FRDGTexture * HalfResolutionDepthCheckerboardMinMaxTexture, FRDGTexture * QuarterResolutionDepthMinMaxTexture, bool bAsyncCompute, FInstanceCullingManager & InstanceCullingManager) Line 2753    C++
     UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRDGBuilder & GraphBuilder) Line 2869    C++
     UnrealEditor-Renderer.dll!RenderViewFamilies_RenderThread(FRHICommandListImmediate & RHICmdList, const TArray<FSceneRenderer *,TSizedDefaultAllocator<32>> & SceneRenderers) Line 4833    C++
     UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamilies::__l89::<lambda_3>::operator()(FRHICommandListImmediate & RHICmdList) Line 5122    C++
     [Inline Frame] UnrealEditor-Renderer.dll!EnqueueUniqueRenderCommand(FRendererModule::BeginRenderingViewFamilies::__l89::<lambda_3> &&) Line 391    C++
     [Inline Frame] UnrealEditor-Renderer.dll!FRenderCommandPipe::Enqueue(FRendererModule::BeginRenderingViewFamilies::__l89::<lambda_3> &&) Line 510    C++
     UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamilies(FCanvas * Canvas, TArrayView<FSceneViewFamily *,int> ViewFamilies) Line 5114    C++
     UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamily(FCanvas * Canvas, FSceneViewFamily * ViewFamily) Line 4969    C++
     UnrealEditor-UnrealEd.dll!FEditorViewportClient::Draw(FViewport * InViewport, FCanvas * Canvas) Line 4294    C++
     UnrealEditor-Engine.dll!FViewport::Draw(bool bShouldPresent) Line 1754    C++
     UnrealEditor-UnrealEd.dll!UEditorEngine::UpdateSingleViewportClient(FEditorViewportClient * InViewportClient, const bool bInAllowNonRealtimeViewportToDraw, bool bLinkedOrthoMovement, bool * bOutViewportDrawn) Line 2537    C++
     UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2190    C++
     UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 550    C++
     UnrealEditor.exe!FEngineLoop::Tick() Line 5921    C++
     [Inline Frame] UnrealEditor.exe!EngineTick() Line 61    C++
     UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 180    C++
     UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 247    C++
     UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 298    C++

Have Comments or More Details?

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

2
Login to Vote

Fixed
ComponentUE - Rendering Architecture - Shaders
Affects Versions5.4.2
Target Fix5.5
Fix Commit32516700
CreatedJun 23, 2024
ResolvedJun 24, 2024
UpdatedJun 25, 2024
View Jira Issue