| 1635 | } |
| 1636 | |
| 1637 | int32_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 | |
| 1657 | ref<ReflectionVar> ReflectionVar::create( |
| 1658 | const std::string& name, |
no test coverage detected