Gems/Atom/RHI/Code/Source/RHI.Reflect/ShaderInputNameIndex.cpp
bool ShaderInputNameIndex::ValidateOrFindBufferIndex(const ShaderResourceGroupLayout* srgLayout)
        {
            if (IsValid())      // 99% use case, check this first for a quick early out
            {
                return true;
            }
            if (!m_initialized)
            {
                FindBufferIndex(srgLayout);
                return IsValid();
            }
            return false;
        }
// --- Functions for checking if the index is initialized and retrieving it if not
Functions for checking if the index is initialized and retrieving it if not
Functions for checking if the index is initialized and retrieving it if not
bool ShaderInputNameIndex::ValidateOrFindBufferIndex(const ShaderResourceGroupLayout* srgLayout)
        {
            if (IsValid())      
            {
                return true;
            }
            if (!m_initialized)
            {
                FindBufferIndex(srgLayout);
                return IsValid();
            }
            return false;
        }
bool ShaderInputNameIndex :: ValidateOrFindBufferIndex ( const ShaderResourceGroupLayout * srgLayout ) { if ( IsValid ( ) ) { return true ; } if ( ! m_initialized ) { FindBufferIndex ( srgLayout ) ; return IsValid ( ) ; } return false ; }
Functions for checking if the index is initialized and retrieving it if not
Functions for checking if the index is initialized and retrieving it if not
// 99% use case, check this first for a quick early out