diff options
| author | Water Chika <water_chika@outlook.com> | 2024-12-16 09:04:05 +0000 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2025-04-07 09:15:36 -0600 |
| commit | 3411f92142e8e6a4e29e7f54eebebeec495f11bd (patch) | |
| tree | d534214318ade849464c7308b5430a4520063892 /cube/cube.cpp | |
| parent | 9c0fff2798d769b4c0681001c24d3d55467dde8f (diff) | |
| download | usermoji-3411f92142e8e6a4e29e7f54eebebeec495f11bd.tar.xz | |
Select physical device before create surface is platform is WSI Display
Diffstat (limited to 'cube/cube.cpp')
| -rw-r--r-- | cube/cube.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cube/cube.cpp b/cube/cube.cpp index fafd1746..12e9e789 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp @@ -4098,7 +4098,8 @@ int main(int argc, char **argv) { #endif #if defined(VK_USE_PLATFORM_DISPLAY_KHR) case (WsiPlatform::display): - // nothing to do here + // select physical device because display surface creation need gpu is selected. + demo.select_physical_device(); break; #endif #if defined(VK_USE_PLATFORM_FUCHSIA) @@ -4113,7 +4114,9 @@ int main(int argc, char **argv) { demo.create_surface(); - demo.select_physical_device(); + if (demo.wsi_platform != WsiPlatform::display) { + demo.select_physical_device(); + } demo.init_vk_swapchain(); |
