| 3797 | } |
| 3798 | |
| 3799 | bool ExtractAnnotations( const InlineString& name, ParserState& state, ParameterAnnotation& paramAnnotations, bool* srgb, bool* autoregister ) |
| 3800 | { |
| 3801 | paramAnnotations.annotations.clear(); |
| 3802 | |
| 3803 | bool localSrgb = false; |
| 3804 | bool localAutoregister = false; |
| 3805 | |
| 3806 | auto globalSymbol = state.GetSymbolTable().LookupGlobal( ToString( name ).c_str() ); |
| 3807 | if( globalSymbol && globalSymbol->annotations ) |
| 3808 | { |
| 3809 | |
| 3810 | for( auto& ai : *globalSymbol->annotations ) |
| 3811 | { |
| 3812 | Annotation result; |
| 3813 | if( MakeEffectAnnotationFromSymbolAnnotation( ai, result, localSrgb, localAutoregister ) ) |
| 3814 | { |
| 3815 | paramAnnotations.annotations[g_stringTable.AddString( ai.name )] = result; |
| 3816 | } |
| 3817 | } |
| 3818 | } |
| 3819 | if( srgb ) |
| 3820 | { |
| 3821 | *srgb = localSrgb; |
| 3822 | } |
| 3823 | if( autoregister ) |
| 3824 | { |
| 3825 | *autoregister = localAutoregister; |
| 3826 | } |
| 3827 | return !paramAnnotations.annotations.empty(); |
| 3828 | } |
| 3829 | |
| 3830 | bool CollectConstants( ParserState& state, StageData& stage, std::map<StringReference, ParameterAnnotation>& annotations ) |
| 3831 | { |
no test coverage detected