| 410 | } |
| 411 | |
| 412 | bool PrintPermutations( const char* shaderPath ) |
| 413 | { |
| 414 | auto shader = g_includeHandler.Open( shaderPath ); |
| 415 | |
| 416 | if( !shader ) |
| 417 | { |
| 418 | printf( "%s: error X0000: Could not open input file \"%s\"\n", shaderPath, shaderPath ); |
| 419 | return false; |
| 420 | } |
| 421 | g_includeHandler.SetRootPath( shaderPath ); |
| 422 | g_messages.SetEntryFileName( shaderPath ); |
| 423 | |
| 424 | Permutations permutations; |
| 425 | if( !DiscoverPermutations( permutations, shader->data, shader->size ) ) |
| 426 | { |
| 427 | g_messages.Flush(); |
| 428 | return false; |
| 429 | } |
| 430 | |
| 431 | for( auto it = permutations.begin(); it != permutations.end(); ++it ) |
| 432 | { |
| 433 | printf( "%s:\n", it->name.c_str() ); |
| 434 | printf( " options:\n" ); |
| 435 | for( auto jt = it->options.begin(); jt != it->options.end(); ++jt ) |
| 436 | { |
| 437 | printf( " - name: %s\n", jt->name.c_str() ); |
| 438 | printf( " value: %i\n", jt->value ); |
| 439 | } |
| 440 | printf( " default: %s\n", it->defaultOption.c_str() ); |
| 441 | printf( " description: %s\n", it->description.c_str() ); |
| 442 | } |
| 443 | return true; |
| 444 | } |
| 445 | |
| 446 | typedef WorkQueue2<CompileShaderArguments, decltype( &CompileShader )> CompileQueue; |
| 447 |
no test coverage detected