vulkano-rs / vulkano

Safe and rich Rust wrapper around the Vulkan API
Apache License 2.0
4.48k stars 433 forks source link

Wrong feature support check when creating a device #2491

Open Rua opened 6 months ago

Rua commented 6 months ago

Reported by @Fuzzyzilla on Discord.

When creating a device, the enabled features are checked against those supported by the physical device. But it does not check if those features will actually be available with the provided enabled extensions.

For example, if your device supports khr_dynamic_rendering (and not Vulkan 1.3) but you don't enable it, you can nonetheless enable the dynamic_rendering feature. Since VkPhysicalDeviceDynamicRenderingFeaturesKHR is not available without the extension, it does not get passed to the device creation, and the feature gets silently ignored. But Vulkano goes by the original DeviceFeatures struct, not the subset that gets passed through to Vulkan.