-
Notifications
You must be signed in to change notification settings - Fork 654
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
Streamline swapchain classes #973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in #963, please let that be merged before this one, thanks!
vk::ImageUsageFlags supported_image_usage, | ||
vk::FormatFeatureFlags supported_features) | ||
template <typename BitType> | ||
std::set<BitType> flags_in(const vk::Flags<BitType> &flags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe some more descriptive name than flags_in
? Like to_set
, or split
or so?
And why do you sort the flags into a std::set
, not a std::vector
?
|
||
HPPSwapchain::HPPSwapchain(HPPDevice &device, | ||
vk::SurfaceKHR surface, | ||
const HPPSwapchainProperties &inittial_properties) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: inittial_properties
Hi @jherico, any thoughts on resolving the comments above? How can we best move this one forward? Thanks |
Closing this PR as it looks like the issues addressed here have already been fixed. Please re-open if there's more to do. Thanks! |
Description
Fixes #972
Updates to
Swapchain
&HPPSwapchain
surface_formats
andpreset_modes
which are only ever used during the swapchain creation in the constructorimage_usage_flags
member in favor of theSwapchainProperties
/HPPSwapchainProperties
image_usage
member/
HPPSwapchainProperties` parameterSwapchainProperties::image_usage
fromVkImageUsageFlags
tostd::set<VkImageUsageFlagBits>
VkImageUsageFlags
everywhere in the C bindings code, but then all the overloaded constructors and downstream members can't distinguish betweenVkImageUsageFlags
anduint32_t
. This isn't a problem in the C++ bindings becausevk::ImageUsageFlags
isn't the same fundamental type asuint32_t
.Other files
HPPApiVulkanSample
andHPPRenderContext
swapchain utility functions to usevk::ImageUsageFlags
instead ofstd::set<vk::ImageUsageFlagBits>
HPPRenderContext
andRenderContext
to remove the unusedswapchain_properties
member.General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including: