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

ValidationError-ify Surface and Swapchain #2236

Merged
merged 10 commits into from
Jun 26, 2023

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Jun 24, 2023

Changelog:

### Breaking changes
Changes to `Swapchain`:
- Swapchain creation no longer returns an error when the swapchain extent doesn't match the current surface extent. This requirement is ill-defined in the spec, as detailed here: [TOCTOU race condition on minImageExtent/maxImageExtent?](https://github.com/KhronosGroup/Vulkan-Docs/issues/1144).

### Additions
- Support for the `ext_surface_maintenance1` and most of the `ext_swapchain_maintenance1` extension.

Depends on #2233. I also reorganised the swapchain code a bit, by placing the main Swapchain type and related things in swapchain/mod.rs, and splitting off the acquire/present stuff into swapchain/acquire_present.rs.

Items of ext_swapchain_maintenance1 that are still missing:

- `vkReleaseSwapchainImagesEXT` / `VkReleaseSwapchainImagesInfoEXT`
- `VkSwapchainPresentFenceInfoEXT`

Both of these rely on proper (queue) sync logic, which we don't have yet.

Copy link
Contributor

@marc0246 marc0246 left a comment

Choose a reason for hiding this comment

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

The merge is incomplete, these should be gone now.

vulkano/src/lib.rs Outdated Show resolved Hide resolved
vulkano/src/lib.rs Outdated Show resolved Hide resolved
Rua and others added 2 commits June 25, 2023 17:48
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
@marc0246
Copy link
Contributor

Yes hello, I'd like to order one merge please.

@marc0246
Copy link
Contributor

Hmm, I think you need to unununfix that.

@Rua
Copy link
Contributor Author

Rua commented Jun 25, 2023

I don't know what the right way is anymore @.@

@Rua Rua force-pushed the swapchain-validation branch from 0234551 to d2370bc Compare June 25, 2023 18:24
@marc0246
Copy link
Contributor

Hehe

Copy link
Contributor

@marc0246 marc0246 left a comment

Choose a reason for hiding this comment

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

My understanding was that these being the first thing in the handler was intentional, as it makes no sense to render to a window that's minimized. Moreover, you moved these checks inside the if below but not in all examples, so that's inconsistent now and makes me one sad boii.

examples/src/bin/async-update.rs Outdated Show resolved Hide resolved
examples/src/bin/buffer-allocator.rs Outdated Show resolved Hide resolved
examples/src/bin/clear_attachments.rs Outdated Show resolved Hide resolved
examples/src/bin/deferred/main.rs Outdated Show resolved Hide resolved
examples/src/bin/image-self-copy-blit/main.rs Outdated Show resolved Hide resolved
examples/src/bin/occlusion-query.rs Outdated Show resolved Hide resolved
examples/src/bin/push-descriptors/main.rs Outdated Show resolved Hide resolved
examples/src/bin/runtime_array/main.rs Outdated Show resolved Hide resolved
examples/src/bin/texture_array/main.rs Outdated Show resolved Hide resolved
examples/src/bin/triangle-v1_3.rs Outdated Show resolved Hide resolved
@Rua Rua force-pushed the swapchain-validation branch from f66b56d to 0b62ec4 Compare June 26, 2023 07:55
@marc0246
Copy link
Contributor

Thanks!

@marc0246 marc0246 merged commit da09477 into vulkano-rs:master Jun 26, 2023
marc0246 added a commit that referenced this pull request Jun 26, 2023
@Rua Rua deleted the swapchain-validation branch October 25, 2023 14:25
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
* Add `RequiresAllOf`, automatically enable required extensions and features

* Add more missing backticks and backslashes to error messages

* Use updated VUIDs that require `acceleration_structure`

* ValidationError-ify `Surface` and `Swapchain`

* Update vulkano/src/lib.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/lib.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Don't draw if the window has zero size

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
# 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.

2 participants