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

Function reflectVariable

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

Source from the content-addressed store, hash-verified

1073}
1074
1075ref<ReflectionVar> reflectVariable(
1076 VariableLayoutReflection* pSlangLayout,
1077 ShaderVarOffset::RangeIndex rangeIndex,
1078 ParameterBlockReflection* pBlock,
1079 ReflectionPath* pPath,
1080 ProgramVersion const* pProgramVersion
1081)
1082{
1083 FALCOR_ASSERT(pPath);
1084 std::string name(pSlangLayout->getName());
1085
1086 ref<ReflectionType> pType = reflectType(pSlangLayout->getTypeLayout(), pBlock, pPath, pProgramVersion);
1087 auto byteOffset = (ShaderVarOffset::ByteOffset)pSlangLayout->getOffset(SLANG_PARAMETER_CATEGORY_UNIFORM);
1088
1089 ref<ReflectionVar> pVar =
1090 ReflectionVar::create(name, pType, ShaderVarOffset(UniformShaderVarOffset(byteOffset), ResourceShaderVarOffset(rangeIndex, 0)));
1091
1092 return pVar;
1093}
1094
1095ref<ReflectionVar> reflectTopLevelVariable(
1096 VariableLayoutReflection* pSlangLayout,

Callers 3

reflectStructTypeFunction · 0.85
reflectTopLevelVariableFunction · 0.85
createMethod · 0.85

Calls 6

reflectTypeFunction · 0.85
ShaderVarOffsetClass · 0.85
createFunction · 0.70
getNameMethod · 0.45

Tested by

no test coverage detected