Closed tangmi closed 3 years ago
@kvark Apologies for the large PR! Since a lot of this PR is code moving around, I tried to move the move the files in separate commits as well as add comments in this PR to help point out where blocks within the file moved around. Hopefully this makes it easier to read--please let me know if there's anything else I can do to help legibility!
This makes sense!
I noticed that the lib.rs
had grown too big, and I'm happy to see all the physical device related stuff consolidated nicely now.
Reviewing this is hard, so there might be issues in there, which we discover later, but that's ok. bors r+
[...] there might be issues in there, which we discover later, but that's ok.
Don't hesitate to ping me on these issues--I'll try my best to support this code.
This PR is a refactor of the logical device creation code. The intention is to make it simpler and less error-prone to add feature/extension usage to the Vulkan backend by consolidating and re-using some of the logic.
PhysicalDevice
into its own filePhysicalDeviceFeatures
VkDeviceCreateInfo
VkPhysicalDeviceVulkan12Features
to test for and enable features in 1.2 when the extension may not be available.VkPhysicalDevice*Features
structs if we're not requesting the corresponding extensions.VK_KHR_sampler_mirror_clamp_to_edge
when applicable. Closes #3651VkPhysicalDeviceProperties
andsupported_extensions
list into a new type,PhysicalDeviceInfo
PR checklist:
make
succeeds (on *nix)make reftests
succeedsVK_LAYER_LUNARG_device_simulation
with a selection of device reports ranging across the different api versions.