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

Function CommonArgType

shadercompiler/IntrinsicTypes.h:194–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194inline int CommonArgType( ASTNode* call )
195{
196 if( call->GetChildrenCount() == 0 )
197 {
198 return OP_VOID;
199 }
200 int type = call->GetChild( 0 )->GetType().builtInType;
201 int prec = GetNumericTypePrecedence( type );
202 for( unsigned i = 1; i < call->GetChildrenCount(); ++i )
203 {
204 int p1 = GetNumericTypePrecedence( call->GetChild( i )->GetType().builtInType );
205 if( p1 > prec )
206 {
207 type = call->GetChild( i )->GetType().builtInType;
208 }
209 }
210 return type;
211}
212
213template <int Arg>
214void DimSameAsArg( ASTNode* call, int& width, int& height )

Callers

nothing calls this directly

Calls 4

GetNumericTypePrecedenceFunction · 0.85
GetChildrenCountMethod · 0.80
GetTypeMethod · 0.45
GetChildMethod · 0.45

Tested by

no test coverage detected