MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / addMember

Method addMember

Source/Falcor/Core/Program/ProgramReflection.cpp:1637–1655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1635}
1636
1637int32_t ReflectionStructType::addMember(const ref<const ReflectionVar>& pVar, ReflectionStructType::BuildState& ioBuildState)
1638{
1639 if (mNameToIndex.find(pVar->getName()) != mNameToIndex.end())
1640 {
1641 int32_t index = mNameToIndex[pVar->getName()];
1642 if (*pVar != *mMembers[index])
1643 {
1644 FALCOR_THROW(
1645 "Mismatch in variable declarations between different shader stages. Variable name is '{}', struct name is '{}'.",
1646 pVar->getName(),
1647 mName
1648 );
1649 }
1650 return -1;
1651 }
1652 auto memberIndex = addMemberIgnoringNameConflicts(pVar, ioBuildState);
1653 mNameToIndex[pVar->getName()] = memberIndex;
1654 return memberIndex;
1655}
1656
1657ref<ReflectionVar> ReflectionVar::create(
1658 const std::string& name,

Callers 3

reflectStructTypeFunction · 0.80
createMethod · 0.80
ProgramReflectionMethod · 0.80

Calls 2

getNameMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected