gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 549 forks source link

[vk] Only enable sampler_filter_minmax and imageless_framebuffer on 1.2 when device supports it #3685

Closed tangmi closed 3 years ago

tangmi commented 3 years ago

Clients with a device that is running Vulkan 1.2 but does not support sampler_filter_minmax would crash on physical device creation. This can happen as well with imageless_framebuffer on e.g. Android devices.

This change makes it so the features are only enabled if they are available.

Fixes #3677

Note I can't effectively test this outside of the device simulator because I don't have real hardware in this configuration.

bors[bot] commented 3 years ago

Build succeeded: