@@ -32,7 +32,7 @@ use ash::{
32
32
extensions:: {
33
33
self ,
34
34
ext:: { DebugReport , DebugUtils } ,
35
- khr:: { AccelerationStructure , DrawIndirectCount , RayTracingPipeline , Swapchain } ,
35
+ khr:: { AccelerationStructure , DrawIndirectCount , RayQuery , Swapchain } ,
36
36
nv:: MeshShader ,
37
37
} ,
38
38
version:: { DeviceV1_0 , EntryV1_0 , InstanceV1_0 } ,
@@ -684,7 +684,6 @@ pub struct DeviceCreationFeatures {
684
684
imageless_framebuffers : Option < vk:: PhysicalDeviceImagelessFramebufferFeaturesKHR > ,
685
685
buffer_device_address : Option < vk:: PhysicalDeviceBufferDeviceAddressFeaturesKHR > ,
686
686
acceleration_structure : Option < vk:: PhysicalDeviceAccelerationStructureFeaturesKHR > ,
687
- ray_tracing_pipeline : Option < vk:: PhysicalDeviceRayTracingPipelineFeaturesKHR > ,
688
687
}
689
688
690
689
impl adapter:: PhysicalDevice < Backend > for PhysicalDevice {
@@ -776,12 +775,11 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
776
775
enabled_extensions. push ( extensions:: khr:: DeferredHostOperations :: name ( ) ) ;
777
776
}
778
777
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 ( ) ) ;
781
780
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
783
782
enabled_extensions. push ( vk:: KhrSpirv14Fn :: name ( ) ) ;
784
- enabled_extensions. push ( vk:: KhrShaderFloatControlsFn :: name ( ) ) ;
785
783
}
786
784
787
785
enabled_extensions
@@ -844,13 +842,6 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
844
842
info
845
843
} ;
846
844
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
-
854
845
match self . instance . inner . create_device ( self . handle , & info, None ) {
855
846
Ok ( device) => device,
856
847
Err ( e) => {
@@ -1069,7 +1060,7 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
1069
1060
let mut descriptor_indexing_features = None ;
1070
1061
let mut buffer_device_address = None ;
1071
1062
let mut acceleration_structure_features = None ;
1072
- let mut ray_tracing_pipeline_features = None ;
1063
+ let mut ray_query_features = None ;
1073
1064
let features = if let Some ( ref get_device_properties) =
1074
1065
self . instance . get_physical_device_properties
1075
1066
{
@@ -1103,11 +1094,10 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
1103
1094
mut_ref. p_next = mem:: replace ( & mut features2. p_next , mut_ref as * mut _ as * mut _ ) ;
1104
1095
}
1105
1096
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 ( ) ) ;
1109
1099
1110
- let mut_ref = ray_tracing_pipeline_features . as_mut ( ) . unwrap ( ) ;
1100
+ let mut_ref = ray_query_features . as_mut ( ) . unwrap ( ) ;
1111
1101
mut_ref. p_next = mem:: replace ( & mut features2. p_next , mut_ref as * mut _ as * mut _ ) ;
1112
1102
}
1113
1103
@@ -1346,26 +1336,9 @@ impl adapter::PhysicalDevice<Backend> for PhysicalDevice {
1346
1336
// TODO
1347
1337
}
1348
1338
}
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 ;
1369
1342
}
1370
1343
}
1371
1344
if let Some ( buffer_device_address) = buffer_device_address {
0 commit comments