Use vkEnumerateInstanceVersion to query for the Vulkan driver version and use min(driver_version, 1.2) to create the instance.
This does not expose any additional 1.1+ functionality in gfx-hal, but should allow for later adding features like descriptor indexing and ray tracing.
Refactor the device extension code to include an extension resolver that correctly includes and excludes requested extensions based on extension promotion status.
PhysicalDevice::open on Vulkan can now fail with DeviceCreationError::MissingExtension if a required extension is missing.
Note that while this change can create 1.1 and 1.2 instances, we must opt into 1.3+ whenever that is released.
Some things to consider moving forward:
API version minor increments should be backwards compatible, per the spec, so we shouldn't need to worry about forward compatibility there.
We must continue using runtime flags to gate features not available in core Vulkan 1.0.
When adding an extension that was promoted to core, we must include both its original functionality and any changed functionality after its promotion.
When adding non-KHR-vendored extensions, we must implement support for all possible versions of Vulkan (since backwards-compatibility is not guaranteed).
Fixes #3302
Related #3146
PR checklist:
[x] make succeeds (on *nix)
[x] +succeeds on Windows 10
[x] make reftests succeeds
[x] tested examples with the following backends: Vulkan
This PR includes the following changes:
vkEnumerateInstanceVersion
to query for the Vulkan driver version and usemin(driver_version, 1.2)
to create the instance.gfx-hal
, but should allow for later adding features like descriptor indexing and ray tracing.PhysicalDevice::open
on Vulkan can now fail withDeviceCreationError::MissingExtension
if a required extension is missing.Note that while this change can create 1.1 and 1.2 instances, we must opt into 1.3+ whenever that is released.
Some things to consider moving forward:
Fixes #3302 Related #3146
PR checklist:
make
succeeds (on *nix)make reftests
succeeds