| 4186 | #endif |
| 4187 | |
| 4188 | int main(int argc, char **argv) { |
| 4189 | Demo demo; |
| 4190 | |
| 4191 | demo.init(argc, argv); |
| 4192 | |
| 4193 | switch (demo.wsi_platform) { |
| 4194 | default: |
| 4195 | case (WsiPlatform::auto_): |
| 4196 | fprintf(stderr, |
| 4197 | "WSI platform should have already been set, indicating a bug. Please set a WSI platform manually with " |
| 4198 | "--wsi\n"); |
| 4199 | exit(1); |
| 4200 | break; |
| 4201 | #if defined(VK_USE_PLATFORM_XCB_KHR) |
| 4202 | case (WsiPlatform::xcb): |
| 4203 | demo.execute<WsiPlatform::xcb>(); |
| 4204 | break; |
| 4205 | #endif |
| 4206 | #if defined(VK_USE_PLATFORM_XLIB_KHR) |
| 4207 | case (WsiPlatform::xlib): |
| 4208 | demo.execute<WsiPlatform::xlib>(); |
| 4209 | break; |
| 4210 | #endif |
| 4211 | #if defined(VK_USE_PLATFORM_WAYLAND_KHR) |
| 4212 | case (WsiPlatform::wayland): |
| 4213 | demo.execute<WsiPlatform::wayland>(); |
| 4214 | break; |
| 4215 | #endif |
| 4216 | #if defined(VK_USE_PLATFORM_DIRECTFB_EXT) |
| 4217 | case (WsiPlatform::directfb): |
| 4218 | demo.execute<WsiPlatform::directfb>(); |
| 4219 | break; |
| 4220 | #endif |
| 4221 | #if defined(VK_USE_PLATFORM_DISPLAY_KHR) |
| 4222 | case (WsiPlatform::display): |
| 4223 | demo.execute<WsiPlatform::display>(); |
| 4224 | break; |
| 4225 | #endif |
| 4226 | #if defined(VK_USE_PLATFORM_SCREEN_QNX) |
| 4227 | case (WsiPlatform::qnx): |
| 4228 | demo.execute<WsiPlatform::qnx>(); |
| 4229 | break; |
| 4230 | #endif |
| 4231 | #if defined(VK_USE_PLATFORM_FUCHSIA) |
| 4232 | case (WsiPlatform::fuchsia_display): |
| 4233 | demo.execute<WsiPlatform::fuchsia_display>(); |
| 4234 | break; |
| 4235 | case (WsiPlatform::fuchsia_scenic): |
| 4236 | demo.execute<WsiPlatform::fuchsia_scenic>(); |
| 4237 | break; |
| 4238 | #endif |
| 4239 | } |
| 4240 | |
| 4241 | demo.cleanup(); |
| 4242 | |
| 4243 | return validation_error; |
| 4244 | } |
| 4245 | |