| 222 | #include "ParserState.h" |
| 223 | |
| 224 | bool DiscoverPermutations( Permutations& permutations, const char* shaderSource, size_t shaderLength ) |
| 225 | { |
| 226 | ZoneScoped; |
| 227 | |
| 228 | ParserState state( MakeInlineString( shaderSource, shaderSource + shaderLength ) ); |
| 229 | if( !state.DiscoverPermutations( permutations ) ) |
| 230 | { |
| 231 | return false; |
| 232 | } |
| 233 | for( auto it = begin( permutations ); it != end( permutations ); ++it ) |
| 234 | { |
| 235 | g_stringTable.AddString( it->name.c_str() ); |
| 236 | g_stringTable.AddString( it->description.c_str() ); |
| 237 | for( auto jt = begin( it->options ); jt != end( it->options ); ++jt ) |
| 238 | { |
| 239 | g_stringTable.AddString( jt->name.c_str() ); |
| 240 | } |
| 241 | } |
| 242 | return true; |
| 243 | } |
| 244 | |
| 245 | |
| 246 | struct ProgramArguments |
no test coverage detected