瀏覽代碼

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

Signed-off-by: Karl Haubenwallner <[email protected]>
Karl Haubenwallner 2 月之前
父節點
當前提交
bbe3860a0a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Gems/Atom/RPI/Code/Source/RPI.Public/Material/MaterialSystem.cpp

+ 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);