| 75 | |
| 76 | |
| 77 | Platform GetPlatform( const std::vector<Macro>& defines ) |
| 78 | { |
| 79 | if( auto macro = FindMacro( defines, "PLATFORM" ) ) |
| 80 | { |
| 81 | auto platform = ParsePlatform( macro->value.c_str() ); |
| 82 | if( platform == PLATFORM_INVALID ) |
| 83 | { |
| 84 | printf( "Unrecognized platform define \"%s\". Reverting to dx11\n", macro->value.c_str() ); |
| 85 | fflush( stdout ); |
| 86 | return PLATFORM_DX11; |
| 87 | } |
| 88 | else |
| 89 | { |
| 90 | return platform; |
| 91 | } |
| 92 | } |
| 93 | #if _WIN32 |
| 94 | return PLATFORM_DX11; |
| 95 | #else |
| 96 | return PLATFORM_METAL; |
| 97 | #endif |
| 98 | } |
| 99 | |
| 100 | |
| 101 | struct CompileShaderArguments |
no test coverage detected