MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetGlobalInputData

Function GetGlobalInputData

shadercompiler/EffectCompilerMetal.cpp:4173–4195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4171}
4172
4173bool GetGlobalInputData( ParserState& state, StageData& stage, const std::vector<GlobalInputElement>& globalInputs, ASTNode* globalInputsStruct, std::map<StringReference, ParameterAnnotation>& annotations )
4174{
4175 auto tmp = state.NewNode( NT_FUNCTION_HEADER );
4176 for( size_t gi = 0; gi < globalInputs.size(); ++gi )
4177 {
4178 auto member = globalInputsStruct->GetChild( gi )->GetChild( 0 )->Copy();
4179 member->SetType( globalInputs[gi].type );
4180 tmp->AddChild( member );
4181 }
4182 if( !AutoAssignRegistersForNode( state, tmp, globalInputsStruct->GetLocation() ) )
4183 {
4184 return false;
4185 }
4186 if( !GetStageDataForNode( state, stage, tmp, annotations ) )
4187 {
4188 return false;
4189 }
4190 for( auto& element : tmp->GetChildren() )
4191 {
4192 element->GetSymbol()->registerSpecifier.clear();
4193 }
4194 return true;
4195}
4196
4197
4198std::pair<int, std::string> RunProcess( const char* commandLine )

Callers 1

CompileEffectMethod · 0.85

Calls 9

GetStageDataForNodeFunction · 0.85
NewNodeMethod · 0.80
sizeMethod · 0.80
CopyMethod · 0.80
AddChildMethod · 0.80
GetSymbolMethod · 0.80
GetChildMethod · 0.45
SetTypeMethod · 0.45

Tested by

no test coverage detected