Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cube: Support runtime selection of WSI platform #1029

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charles-lunarg
Copy link
Contributor

By changing the selection of a WSI platform from a build time choice to a runtime choice, this allows the removal of vkcube-wayland as a separate binary.

Use --wsi <xlib|xcb|wayland|display|directfb> to choose the WSI platform that vkcube will render with. The chosen platform must be one that vkcube was compiled with support for, so directfb will be unavailable without changing the build parameters to enable it.

These changes have been made to both vkcube and vkcubepp.

Platforms which do not have multiple WSI platforms, such as windows, android, and apple (metal is the only non-deprecated platform) do not have this option as there aren't any platforms to choose from.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 250359.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1516 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1516 failed.

@charles-lunarg charles-lunarg force-pushed the cube_enable_runtime_wsi_selection branch from 9c86393 to 8927612 Compare September 5, 2024 20:43
@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 250481.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1517 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1517 failed.

@charles-lunarg charles-lunarg force-pushed the cube_enable_runtime_wsi_selection branch from 8927612 to 615c292 Compare September 5, 2024 22:05
@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 250527.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1518 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1518 failed.

@charles-lunarg charles-lunarg force-pushed the cube_enable_runtime_wsi_selection branch from 615c292 to 7dcae5f Compare September 6, 2024 18:45
@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 251139.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1519 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1519 failed.

@charles-lunarg charles-lunarg force-pushed the cube_enable_runtime_wsi_selection branch from 7dcae5f to 02cb94e Compare September 6, 2024 18:55
@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 251170.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1520 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1520 failed.

@charles-lunarg charles-lunarg force-pushed the cube_enable_runtime_wsi_selection branch from 02cb94e to b64c441 Compare September 6, 2024 20:19
@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 251259.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1521 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1521 failed.

@charles-lunarg charles-lunarg force-pushed the cube_enable_runtime_wsi_selection branch from b64c441 to 1237a4c Compare September 9, 2024 19:48
@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 252901.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1522 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1522 passed.

Copy link

@enunes enunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on x86_64 and aarch64 xlib, xcb, wayland and display, and this seems like a great improvement to me. Added a few comments for review. Thanks

cube/cube.cpp Show resolved Hide resolved
cube/cube.cpp Outdated Show resolved Hide resolved
cube/cube.c Outdated Show resolved Hide resolved
By changing the selection of a WSI platform from a build time choice to a
runtime choice, this allows the removal of vkcube-wayland as a separate
binary.

Use `--wsi <platform>` to choose the WSI platform that vkcube will render
with. The chosen platform must be one that vkcube was compiled with
support for, so directfb will be unavailable without changing the build
parameters to enable it.

These changes have been made to both vkcube and vkcubepp.

This includes enabling VK_KHR_display where applicable, which is supported
on linux and windows at the current time.
@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 254274.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1524 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1524 passed.

Copy link

@enunes enunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vkcube should treat VK_KHR_display as runtime command-line switch, not as cmake option
3 participants