Explorar o código

defuse an assert when not using the SceneMaterialSrg (#19132)

Signed-off-by: Karl Haubenwallner <[email protected]>
Karl Haubenwallner hai 1 semana
pai
achega
bbe3860a0a

+ 1 - 1
Gems/Atom/RPI/Code/Source/RPI.Public/Material/MaterialSystem.cpp

@@ -81,7 +81,7 @@ namespace AZ::RPI
                 auto desc = m_sceneMaterialSrg->GetLayout()->GetShaderInput(samplerIndex);
                 auto desc = m_sceneMaterialSrg->GetLayout()->GetShaderInput(samplerIndex);
                 [[maybe_unused]] uint32_t maxTextureSamplerStates = desc.m_count;
                 [[maybe_unused]] uint32_t maxTextureSamplerStates = desc.m_count;
                 AZ_Assert(
                 AZ_Assert(
-                    maxTextureSamplerStates == m_sceneTextureSamplers.GetMaxNumSamplerStates(),
+                    maxTextureSamplerStates >= m_sceneTextureSamplers.GetMaxNumSamplerStates(),
                     "SceneMaterialSrg::m_samplers[] has size %d, expected size is AZ_TRAITS_SCENE_MATERIALS_MAX_SAMPLERS (%d)",
                     "SceneMaterialSrg::m_samplers[] has size %d, expected size is AZ_TRAITS_SCENE_MATERIALS_MAX_SAMPLERS (%d)",
                     maxTextureSamplerStates,
                     maxTextureSamplerStates,
                     AZ_TRAITS_SCENE_MATERIALS_MAX_SAMPLERS);
                     AZ_TRAITS_SCENE_MATERIALS_MAX_SAMPLERS);