Skip to content
New issue

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

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

Already on GitHub? # to your account

Add SwapchainCreateInfo, various related changes #1832

Merged
merged 2 commits into from
Feb 20, 2022

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Feb 19, 2022

Changelog:

- **Breaking** Changes to `Surface`:
    - The constructors are renamed to match their Vulkan equivalents:
        - `from_display_mode` > `from_display_plane`
        - `from_anativewindow` > `from_android`
        - `from_ios_moltenvk` > `from_ios`
        - `from_macos_moltenvk` > `from_mac_os`
        - `from_vi_surface` > `from_vi`
        - `from_hwnd` > `from_win32`
    - `from_raw` now requires a `SurfaceApi` value.
    - `Surface::capabilities` has been moved to `PhysicalDevice` and split into three functions: `surface_capabilities`, `surface_formats` and `surface_present_modes`.
    - `Capabilities` has been renamed to `SurfaceCapabilities`.
    - The `is_supported` method has been moved to `QueueFamily` and renamed to `supports_surface`.
- **Breaking** Changes to `Swapchain`:
  - Creation parameters are given using `SwapchainCreateInfo`. Methods of `Swapchain` are renamed to match.
  - All names with `Fullscreen` and `fullscreen` have been renamed to `FullScreen` and `full_screen`, to match Vulkan word breaking.
  - `FullScreenExclusive::AppControlled` has been renamed to `FullScreenExclusive::ApplicationControlled` to match Vulkan.
  - Using `FullScreenExclusive::ApplicationControlled` on Windows now requires a `Win32Monitor`.
- **Breaking** Vulkano-win: `create_vk_surface` and `create_vk_surface_from_handle` have been renamed to `create_surface_from_winit` and `create_surface_from_handle` respectively.
- Added an `api` method to `Surface` to return the windowing API that it was created from.
- Added a `create_info` method to `Swapchain` to return a `SwapchainCreateInfo` that contains all the parameters copied from the existing swapchain. This can be used for easy recreation of outdated swapchains.
- Added support for the `khr_get_surface_capabilities2` extension.
- Vulkano-win: Added `create_win32_monitor_from_winit` function.

Fixes #1801, fixes #1830.

More CreateInfofication, along with some reorganising of code to make it more robust and better match Vulkan.

Copy link
Member

@AustinJ235 AustinJ235 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! The Win32 handling for AppControlled seems sound. Due to previously merged pull requests there are now conflicts. You can go ahead with a merge once those are resolved.

@Rua Rua merged commit 645faa4 into vulkano-rs:master Feb 20, 2022
Rua added a commit that referenced this pull request Feb 20, 2022
@Rua Rua deleted the SwapchainCreateInfo branch May 31, 2022 18:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to provide HMONITOR for full-screen exclusive mode on Windows? Swapchain does not expose color_space
2 participants