The Ash builder methods are now used instead of raw pointers, so that lifetimes are correctly tracked. This did, however, need some significant refactoring because of how borrowing rules work. For that reason, I moved all Ash struct construction into the structs themselves (as methods). The methods and structs follow a tiered logic where each value borrows from those below it:
The Ash builder methods are now used instead of raw pointers, so that lifetimes are correctly tracked. This did, however, need some significant refactoring because of how borrowing rules work. For that reason, I moved all Ash struct construction into the structs themselves (as methods). The methods and structs follow a tiered logic where each value borrows from those below it:
to_vk
->ash::vk::FooCreateInfo
to_vk_extensions
->mut FooCreateInfoExtensionsVk
to_vk_fields1
->FooCreateInfoFields1Vk
to_vk_fields1_extensions
->mut FooCreateInfoFields1ExtensionsVk
to_vk_fields2
->FooCreateInfoFields2Vk
to_vk_fields2_extensions
->mut FooCreateInfoFields2ExtensionsVk
to_vk_fields3
->FooCreateInfoFields3Vk
Mutable borrows are needed for the extension structs because
push_next
takes a mutable reference.The
DeviceFeatures
andDeviceProperties
construction have been left out of this, those need more attention that will be done in a separate PR.