@@ -3,7 +3,7 @@ use std::{borrow::ToOwned as _, collections::BTreeMap, ffi::CStr, sync::Arc, vec
3
3
use ash:: { amd, ext, google, khr, vk} ;
4
4
use parking_lot:: Mutex ;
5
5
6
- use super :: conv;
6
+ use super :: { conv, remove_variant } ;
7
7
8
8
fn depth_stencil_required_flags ( ) -> vk:: FormatFeatureFlags {
9
9
vk:: FormatFeatureFlags :: SAMPLED_IMAGE | vk:: FormatFeatureFlags :: DEPTH_STENCIL_ATTACHMENT
@@ -1021,7 +1021,7 @@ impl PhysicalDeviceProperties {
1021
1021
//extensions.push(ext::sampler_filter_minmax::NAME);
1022
1022
}
1023
1023
1024
- if self . device_api_version < vk:: API_VERSION_1_3 {
1024
+ if remove_variant ( self . device_api_version ) < vk:: API_VERSION_1_3 {
1025
1025
// Optional `VK_EXT_image_robustness`
1026
1026
if self . supports_extension ( ext:: image_robustness:: NAME ) {
1027
1027
extensions. push ( ext:: image_robustness:: NAME ) ;
@@ -2016,7 +2016,7 @@ impl super::Adapter {
2016
2016
if features. contains ( wgt:: Features :: EXPERIMENTAL_RAY_HIT_VERTEX_RETURN ) {
2017
2017
capabilities. push ( spv:: Capability :: RayQueryPositionFetchKHR )
2018
2018
}
2019
- if self . phd_capabilities . device_api_version >= vk:: API_VERSION_1_3
2019
+ if remove_variant ( self . phd_capabilities . device_api_version ) >= vk:: API_VERSION_1_3
2020
2020
|| enabled_extensions. contains ( & khr:: shader_integer_dot_product:: NAME )
2021
2021
{
2022
2022
// See <https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_shader_integer_dot_product.html#_new_spir_v_capabilities>.
@@ -2028,7 +2028,7 @@ impl super::Adapter {
2028
2028
] ) ;
2029
2029
}
2030
2030
spv:: Options {
2031
- lang_version : match self . phd_capabilities . device_api_version {
2031
+ lang_version : match remove_variant ( self . phd_capabilities . device_api_version ) {
2032
2032
// Use maximum supported SPIR-V version according to
2033
2033
// <https://github.com/KhronosGroup/Vulkan-Docs/blob/19b7651/appendices/spirvenv.adoc?plain=1#L21-L40>.
2034
2034
vk:: API_VERSION_1_0 ..vk:: API_VERSION_1_1 => ( 1 , 0 ) ,
0 commit comments