| 224 | }; |
| 225 | |
| 226 | WsiPlatform wsi_from_string(std::string const &str) { |
| 227 | if (str == "auto") return WsiPlatform::auto_; |
| 228 | #if defined(VK_USE_PLATFORM_WIN32_KHR) |
| 229 | if (str == "win32") return WsiPlatform::win32; |
| 230 | #endif |
| 231 | #if defined(VK_USE_PLATFORM_METAL_EXT) |
| 232 | if (str == "metal") return WsiPlatform::metal; |
| 233 | #endif |
| 234 | #if defined(VK_USE_PLATFORM_ANDROID_KHR) |
| 235 | if (str == "android") return WsiPlatform::android; |
| 236 | #endif |
| 237 | #if defined(VK_USE_PLATFORM_SCREEN_QNX) |
| 238 | if (str == "qnx") return WsiPlatform::qnx; |
| 239 | #endif |
| 240 | #if defined(VK_USE_PLATFORM_XCB_KHR) |
| 241 | if (str == "xcb") return WsiPlatform::xcb; |
| 242 | #endif |
| 243 | #if defined(VK_USE_PLATFORM_XLIB_KHR) |
| 244 | if (str == "xlib") return WsiPlatform::xlib; |
| 245 | #endif |
| 246 | #if defined(VK_USE_PLATFORM_WAYLAND_KHR) |
| 247 | if (str == "wayland") return WsiPlatform::wayland; |
| 248 | #endif |
| 249 | #if defined(VK_USE_PLATFORM_DIRECTFB_EXT) |
| 250 | if (str == "directfb") return WsiPlatform::directfb; |
| 251 | #endif |
| 252 | #if defined(VK_USE_PLATFORM_DISPLAY_KHR) |
| 253 | if (str == "display") return WsiPlatform::display; |
| 254 | #endif |
| 255 | #if defined(VK_USE_PLATFORM_FUCHSIA) |
| 256 | if (str == "fuchsia_display") return WsiPlatform::fuchsia_display; |
| 257 | if (str == "fuchsia_scenic") return WsiPlatform::fuchsia_scenic; |
| 258 | #endif |
| 259 | return WsiPlatform::invalid; |
| 260 | }; |
| 261 | |
| 262 | const char *wsi_to_string(WsiPlatform wsi_platform) { |
| 263 | switch (wsi_platform) { |