| 2574 | } |
| 2575 | |
| 2576 | void ApplyPackedModifier( ASTNode* structNode, bool tightPacking ) |
| 2577 | { |
| 2578 | for( auto member : structNode->GetChildren() ) |
| 2579 | { |
| 2580 | for( auto var : member->GetChildren() ) |
| 2581 | { |
| 2582 | auto& type = var->GetSymbol()->type; |
| 2583 | if( type.IsVector() && ( tightPacking || type.width == 3 ) && type.builtInType != OP_BOOL ) |
| 2584 | { |
| 2585 | type.modifier = OP_PACKOFFSET; // let us abuse this token type! |
| 2586 | } |
| 2587 | else if( type.IsStruct() ) |
| 2588 | { |
| 2589 | ApplyPackedModifier( type.symbol->definition, tightPacking ); |
| 2590 | } |
| 2591 | } |
| 2592 | } |
| 2593 | } |
| 2594 | |
| 2595 | void ApplyPackedModifiersToConstantBuffers( ASTNode* functionDefinition ) |
| 2596 | { |
no test coverage detected