From aab497fd11a0f6f6bfc499132ccb9ba2e25902b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pe=C5=82ka?= Date: Wed, 5 Feb 2025 02:23:13 +0100 Subject: [PATCH] Fix BRDF initialization in rhi-null use case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Pełka --- Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp b/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp index c02061344a1a..5871fe9876d6 100644 --- a/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp +++ b/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp @@ -671,7 +671,8 @@ namespace AZ // As part of our initialization we need to create the BRDF texture generation pipeline AZ::RPI::RenderPipelineDescriptor pipelineDesc; pipelineDesc.m_mainViewTagName = "MainCamera"; - pipelineDesc.m_name = AZStd::string::format("BRDFTexturePipeline_%i", viewportContext->GetId()); + const AzFramework::ViewportId viewportId = viewportContext ? viewportContext->GetId() : AzFramework::InvalidViewportId; + pipelineDesc.m_name = AZStd::string::format("BRDFTexturePipeline_%i", viewportId); pipelineDesc.m_rootPassTemplate = "BRDFTexturePipeline"; pipelineDesc.m_executeOnce = true;