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

Function CommonArgDim

shadercompiler/IntrinsicTypes.h:236–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236inline void CommonArgDim( ASTNode* call, int& width, int& height )
237{
238 width = call->GetChild( 0 )->GetType().width;
239 height = call->GetChild( 0 )->GetType().height;
240 for( unsigned i = 1; i < call->GetChildrenCount(); ++i )
241 {
242 if( call->GetChild( i )->GetType().width > 1 || call->GetChild( i )->GetType().height > 1 )
243 {
244 width = std::min( call->GetChild( i )->GetType().width, width );
245 height = std::min( call->GetChild( i )->GetType().height, height );
246 }
247 }
248}
249
250typedef int ( *TypeComponent )( ASTNode* call );
251typedef void ( *DimComponent )( ASTNode* call, int& width, int& height );

Callers

nothing calls this directly

Calls 3

GetChildrenCountMethod · 0.80
GetTypeMethod · 0.45
GetChildMethod · 0.45

Tested by

no test coverage detected