@@ -123,6 +123,10 @@ pub struct PhysicalDeviceFeatures {
123
123
124
124
/// Features proved by `VK_EXT_mesh_shader`
125
125
mesh_shader : Option < vk:: PhysicalDeviceMeshShaderFeaturesEXT < ' static > > ,
126
+
127
+ /// Features provided by `VK_KHR_shader_integer_dot_product`, promoted to Vulkan 1.3.
128
+ shader_integer_dot_product :
129
+ Option < vk:: PhysicalDeviceShaderIntegerDotProductFeaturesKHR < ' static > > ,
126
130
}
127
131
128
132
impl PhysicalDeviceFeatures {
@@ -187,6 +191,9 @@ impl PhysicalDeviceFeatures {
187
191
if let Some ( ref mut feature) = self . mesh_shader {
188
192
info = info. push_next ( feature) ;
189
193
}
194
+ if let Some ( ref mut feature) = self . shader_integer_dot_product {
195
+ info = info. push_next ( feature) ;
196
+ }
190
197
info
191
198
}
192
199
@@ -499,6 +506,16 @@ impl PhysicalDeviceFeatures {
499
506
} else {
500
507
None
501
508
} ,
509
+ shader_integer_dot_product : if device_api_version >= vk:: API_VERSION_1_3
510
+ || enabled_extensions. contains ( & khr:: shader_integer_dot_product:: NAME )
511
+ {
512
+ Some (
513
+ vk:: PhysicalDeviceShaderIntegerDotProductFeaturesKHR :: default ( )
514
+ . shader_integer_dot_product ( private_caps. shader_integer_dot_product ) ,
515
+ )
516
+ } else {
517
+ None
518
+ } ,
502
519
}
503
520
}
504
521
@@ -1501,6 +1518,16 @@ impl super::InstanceShared {
1501
1518
features2 = features2. push_next ( next) ;
1502
1519
}
1503
1520
1521
+ // `VK_KHR_shader_integer_dot_product` is promoted to 1.3
1522
+ if capabilities. device_api_version >= vk:: API_VERSION_1_3
1523
+ || capabilities. supports_extension ( khr:: shader_integer_dot_product:: NAME )
1524
+ {
1525
+ let next = features
1526
+ . shader_integer_dot_product
1527
+ . insert ( vk:: PhysicalDeviceShaderIntegerDotProductFeatures :: default ( ) ) ;
1528
+ features2 = features2. push_next ( next) ;
1529
+ }
1530
+
1504
1531
unsafe { get_device_properties. get_physical_device_features2 ( phd, & mut features2) } ;
1505
1532
features2. features
1506
1533
} else {
@@ -1684,6 +1711,9 @@ impl super::Instance {
1684
1711
. properties
1685
1712
. limits
1686
1713
. max_sampler_allocation_count ,
1714
+ shader_integer_dot_product : phd_features
1715
+ . shader_integer_dot_product
1716
+ . is_some_and ( |ext| ext. shader_integer_dot_product != 0 ) ,
1687
1717
} ;
1688
1718
let capabilities = crate :: Capabilities {
1689
1719
limits : phd_capabilities. to_wgpu_limits ( ) ,
@@ -1976,10 +2006,8 @@ impl super::Adapter {
1976
2006
if features. contains ( wgt:: Features :: EXPERIMENTAL_RAY_HIT_VERTEX_RETURN ) {
1977
2007
capabilities. push ( spv:: Capability :: RayQueryPositionFetchKHR )
1978
2008
}
1979
- if self . phd_capabilities . device_api_version >= vk:: API_VERSION_1_3
1980
- || enabled_extensions. contains ( & khr:: shader_integer_dot_product:: NAME )
1981
- {
1982
- // See <https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_shader_integer_dot_product.html#_new_spir_v_capabilities>.
2009
+ if self . private_caps . shader_integer_dot_product {
2010
+ // See <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_shader_integer_dot_product.html#_new_spir_v_capabilities>.
1983
2011
capabilities. extend ( & [
1984
2012
spv:: Capability :: DotProductInputAllKHR ,
1985
2013
spv:: Capability :: DotProductInput4x8BitKHR ,
0 commit comments