extensions: Add VK_KHR_get_surface_capabilities2#530
Merged
MarijnS95 merged 1 commit intoash-rs:masterfrom Dec 29, 2021
Merged
Conversation
73 tasks
MarijnS95
reviewed
Dec 27, 2021
Collaborator
MarijnS95
left a comment
There was a problem hiding this comment.
Nice! Good use of Default::default() for vk::SurfaceCapabilities2KHR, but I think you need to do the same for vk::SurfaceFormat2KHR.
I don't think rustfmt is going to be happy with fp() and name() on a single line though?
MarijnS95
approved these changes
Dec 27, 2021
Collaborator
MarijnS95
left a comment
There was a problem hiding this comment.
Looks totally right to me now!
7fac872 to
eaedadc
Compare
Collaborator
|
By the way, don't forget to add a note to (We should setup a PR template listing these necessary items later) |
Ralith
pushed a commit
that referenced
this pull request
Jan 22, 2022
This was referenced Apr 16, 2023
MarijnS95
added a commit
that referenced
this pull request
Apr 16, 2023
…sical_device_surface_capabilities2` Version 2 of `get_physical_device_surface_capabilities` and the matching `vk::SurfaceCapabilitiesKHR` struct exist solely to provide an `sType` and `pNext` field to allow extending the original query with additional data via extension structs. However, this API when introduced in #530 only returns the default-initialized struct making it just as constrained as `get_physical_device_surface_capabilities()`. Solve this by taking `vk::SurfaceCapabilities2KHR` as `&mut` just like any similar API.
MarijnS95
added a commit
that referenced
this pull request
May 2, 2023
Version 2 of `get_physical_device_surface_capabilities` and the matching `vk::SurfaceCapabilitiesKHR` struct exist solely to provide an `sType` and `pNext` field to allow extending the original query with additional data via extension structs. However, this API when introduced in #530 only returns the `default()`-initialized struct making it just as constrained as `get_physical_device_surface_capabilities()`. Solve this by taking `vk::SurfaceCapabilities2KHR` as `&mut` just like any similar API. And just like this, do the same for the remaining: - `AccelerationStructure::get_acceleration_structure_build_sizes()` - `ExternalMemoryFd::get_memory_fd_properties()` - `ExternalMemoryWin32::get_memory_win32_handle_properties()` In case these structs get extended somewhere down the line, which the Vulkan API allows for.
MarijnS95
added a commit
that referenced
this pull request
May 2, 2023
Version 2 of `get_physical_device_surface_capabilities` and the matching `vk::SurfaceCapabilitiesKHR` struct exist solely to provide an `sType` and `pNext` field to allow extending the original query with additional data via extension structs. However, this API when introduced in #530 only returns the `default()`-initialized struct making it just as constrained as `get_physical_device_surface_capabilities()`. Solve this by taking `vk::SurfaceCapabilities2KHR` as `&mut` just like any similar API. And just like this, do the same for the remaining: - `AccelerationStructure::get_acceleration_structure_build_sizes()` - `ExternalMemoryFd::get_memory_fd_properties()` - `ExternalMemoryWin32::get_memory_win32_handle_properties()` In case these structs get extended somewhere down the line, which the Vulkan API allows for.
MarijnS95
added a commit
that referenced
this pull request
May 3, 2023
…ut` (#744) * extensions/khr: Take the remaining `p_next`-containing structs as `&mut` Version 2 of `get_physical_device_surface_capabilities` and the matching `vk::SurfaceCapabilitiesKHR` struct exist solely to provide an `sType` and `pNext` field to allow extending the original query with additional data via extension structs. However, this API when introduced in #530 only returns the `default()`-initialized struct making it just as constrained as `get_physical_device_surface_capabilities()`. Solve this by taking `vk::SurfaceCapabilities2KHR` as `&mut` just like any similar API. And just like this, do the same for the remaining: - `AccelerationStructure::get_acceleration_structure_build_sizes()` - `ExternalMemoryFd::get_memory_fd_properties()` - `ExternalMemoryWin32::get_memory_win32_handle_properties()` In case these structs get extended somewhere down the line, which the Vulkan API allows for. * extensions/khr/acceleration_structure: Use `mem::zeroed()` in place of `vk::AccelerationStructureCompatibilityKHR::default()`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.