@@ -32,7 +32,7 @@ use ash::{
3232 extensions:: {
3333 self ,
3434 ext:: { DebugReport , DebugUtils } ,
35- khr:: { AccelerationStructure , DrawIndirectCount , RayTracingPipeline , Swapchain } ,
35+ khr:: { AccelerationStructure , DrawIndirectCount , RayQuery , Swapchain } ,
3636 nv:: MeshShader ,
3737 } ,
3838 version:: { DeviceV1_0 , EntryV1_0 , InstanceV1_0 } ,
@@ -684,7 +684,6 @@ pub struct DeviceCreationFeatures {
684684 imageless_framebuffers : Option < vk:: PhysicalDeviceImagelessFramebufferFeaturesKHR > ,
685685 buffer_device_address : Option < vk:: PhysicalDeviceBufferDeviceAddressFeaturesKHR > ,
686686 acceleration_structure : Option < vk:: PhysicalDeviceAccelerationStructureFeaturesKHR > ,
687- ray_tracing_pipeline : Option < vk:: PhysicalDeviceRayTracingPipelineFeaturesKHR > ,
688687}
689688
690689impl adapter:: PhysicalDevice < Backend > for PhysicalDevice {
@@ -776,12 +775,11 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
776775 enabled_extensions. push ( extensions:: khr:: DeferredHostOperations :: name ( ) ) ;
777776 }
778777
779- if requested_features. contains ( Features :: RAY_TRACING_PIPELINE ) {
780- enabled_extensions. push ( RayTracingPipeline :: name ( ) ) ;
778+ if requested_features. contains ( Features :: RAY_QUERY ) {
779+ enabled_extensions. push ( RayQuery :: name ( ) ) ;
781780
782- // TODO better handling of extension dependencies? These are required by VK_KHR_ray_tracing_pipeline
781+ // TODO better handling of extension dependencies? These are required by VK_KHR_ray_query
783782 enabled_extensions. push ( vk:: KhrSpirv14Fn :: name ( ) ) ;
784- enabled_extensions. push ( vk:: KhrShaderFloatControlsFn :: name ( ) ) ;
785783 }
786784
787785 enabled_extensions
@@ -844,13 +842,6 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
844842 info
845843 } ;
846844
847- let info =
848- if let Some ( ref mut ray_tracing_pipeline) = enabled_features. ray_tracing_pipeline {
849- info. push_next ( ray_tracing_pipeline)
850- } else {
851- info
852- } ;
853-
854845 match self . instance . inner . create_device ( self . handle , & info, None ) {
855846 Ok ( device) => device,
856847 Err ( e) => {
@@ -1069,7 +1060,7 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
10691060 let mut descriptor_indexing_features = None ;
10701061 let mut buffer_device_address = None ;
10711062 let mut acceleration_structure_features = None ;
1072- let mut ray_tracing_pipeline_features = None ;
1063+ let mut ray_query_features = None ;
10731064 let features = if let Some ( ref get_device_properties) =
10741065 self . instance . get_physical_device_properties
10751066 {
@@ -1103,11 +1094,10 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
11031094 mut_ref. p_next = mem:: replace ( & mut features2. p_next , mut_ref as * mut _ as * mut _ ) ;
11041095 }
11051096
1106- if self . supports_extension ( RayTracingPipeline :: name ( ) ) {
1107- ray_tracing_pipeline_features =
1108- Some ( vk:: PhysicalDeviceRayTracingPipelineFeaturesKHR :: builder ( ) . build ( ) ) ;
1097+ if self . supports_extension ( RayQuery :: name ( ) ) {
1098+ ray_query_features = Some ( vk:: PhysicalDeviceRayQueryFeaturesKHR :: builder ( ) . build ( ) ) ;
11091099
1110- let mut_ref = ray_tracing_pipeline_features . as_mut ( ) . unwrap ( ) ;
1100+ let mut_ref = ray_query_features . as_mut ( ) . unwrap ( ) ;
11111101 mut_ref. p_next = mem:: replace ( & mut features2. p_next , mut_ref as * mut _ as * mut _ ) ;
11121102 }
11131103
@@ -1346,26 +1336,9 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
13461336 // TODO
13471337 }
13481338 }
1349- if let Some ( ray_tracing_pipeline_features) = ray_tracing_pipeline_features {
1350- if ray_tracing_pipeline_features. ray_tracing_pipeline == vk:: TRUE {
1351- bits |= Features :: RAY_TRACING_PIPELINE ;
1352- }
1353- if ray_tracing_pipeline_features. ray_tracing_pipeline_shader_group_handle_capture_replay
1354- == vk:: TRUE
1355- {
1356- // bits |= Features::RAY_TRACING_PIPELINE_SHADER_GROUP_HANDLE_CAPTURE_REPLAY;
1357- }
1358- if ray_tracing_pipeline_features
1359- . ray_tracing_pipeline_shader_group_handle_capture_replay_mixed
1360- == vk:: TRUE
1361- {
1362- // bits |= Features::RAY_TRACING_PIPELINE_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_MIXED;
1363- }
1364- if ray_tracing_pipeline_features. ray_tracing_pipeline_trace_rays_indirect == vk:: TRUE {
1365- // bits |= Features::RAY_TRACING_PIPELINE_TRACE_RAYS_INDIRECT;
1366- }
1367- if ray_tracing_pipeline_features. ray_traversal_primitive_culling == vk:: TRUE {
1368- // bits |= Features::RAY_TRAVERSAL_PRIMITIVE_CULLING;
1339+ if let Some ( ray_query_features) = ray_query_features {
1340+ if ray_query_features. ray_query == vk:: TRUE {
1341+ bits |= Features :: RAY_QUERY ;
13691342 }
13701343 }
13711344 if let Some ( buffer_device_address) = buffer_device_address {
0 commit comments