| … | … | @@ -594,6 +594,8 @@ Error RenderingDeviceDriverVulkan::_initialize_device_extensions() { |
| 594 | 594 | _register_requested_device_extension(VK_KHR_RAY_QUERY_EXTENSION_NAME, false); |
| 595 | 595 | _register_requested_device_extension(VK_EXT_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME, false); |
| 596 | 596 | _register_requested_device_extension(VK_NV_RAY_TRACING_VALIDATION_EXTENSION_NAME, false); |
| 597 | _register_requested_device_extension(VK_NV_CLUSTER_ACCELERATION_STRUCTURE_EXTENSION_NAME, false); |
| 598 | _register_requested_device_extension(VK_NV_MESH_SHADER_EXTENSION_NAME, false); |
| 597 | 599 | _register_requested_device_extension(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME, false); |
| 598 | 600 | |
| 599 | 601 | // We don't actually use this extension, but some runtime components on some platforms |
| … | … | @@ -858,6 +860,7 @@ Error RenderingDeviceDriverVulkan::_check_device_capabilities() { |
| 858 | 860 | VkPhysicalDeviceRayQueryFeaturesKHR ray_query_features = {}; |
| 859 | 861 | VkPhysicalDeviceSynchronization2FeaturesKHR sync_2_features = {}; |
| 860 | 862 | VkPhysicalDeviceRayTracingValidationFeaturesNV raytracing_validation_features = {}; |
| 863 | VkPhysicalDeviceClusterAccelerationStructureFeaturesNV clas_features = {}; |
| 861 | 864 | |
| 862 | 865 | const bool use_1_2_features = physical_device_properties.apiVersion >= VK_API_VERSION_1_2; |
| 863 | 866 | if (use_1_2_features) { |
| … | … | @@ -930,6 +933,12 @@ Error RenderingDeviceDriverVulkan::_check_device_capabilities() { |
| 930 | 933 | next_features = &acceleration_structure_features; |
| 931 | 934 | } |
| 932 | 935 | |
| 936 | if (enabled_device_extension_names.has(VK_NV_CLUSTER_ACCELERATION_STRUCTURE_EXTENSION_NAME)) { |
| 937 | clas_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV; |
| 938 | clas_features.pNext = next_features; |
| 939 | next_features = &clas_features; |
| 940 | } |
| 941 | |
| 933 | 942 | if (enabled_device_extension_names.has(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME)) { |
| 934 | 943 | raytracing_pipeline_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; |
| 935 | 944 | raytracing_pipeline_features.pNext = next_features; |
| … | … | @@ -1049,6 +1058,10 @@ Error RenderingDeviceDriverVulkan::_check_device_capabilities() { |
| 1049 | 1058 | acceleration_structure_capabilities.acceleration_structure_support = acceleration_structure_features.accelerationStructure; |
| 1050 | 1059 | } |
| 1051 | 1060 | |
| 1061 | if (enabled_device_extension_names.has(VK_NV_CLUSTER_ACCELERATION_STRUCTURE_EXTENSION_NAME)) { |
| 1062 | acceleration_structure_capabilities.cluster_acceleration_structure_support = clas_features.clusterAccelerationStructure; |
| 1063 | } |
| 1064 | |
| 1052 | 1065 | if (enabled_device_extension_names.has(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME)) { |
| 1053 | 1066 | raytracing_capabilities.raytracing_pipeline_support = raytracing_pipeline_features.rayTracingPipeline; |
| 1054 | 1067 | raytracing_capabilities.validation = raytracing_validation_features.rayTracingValidation; |
| … | … | @@ -1428,6 +1441,14 @@ Error RenderingDeviceDriverVulkan::_initialize_device(const LocalVector<VkDevice |
| 1428 | 1441 | create_info_next = &raytracing_validation_features; |
| 1429 | 1442 | } |
| 1430 | 1443 | |
| 1444 | VkPhysicalDeviceClusterAccelerationStructureFeaturesNV clas_features = {}; |
| 1445 | if (acceleration_structure_capabilities.cluster_acceleration_structure_support) { |
| 1446 | clas_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV; |
| 1447 | clas_features.pNext = create_info_next; |
| 1448 | clas_features.clusterAccelerationStructure = VK_TRUE; |
| 1449 | create_info_next = &clas_features; |
| 1450 | } |
| 1451 | |
| 1431 | 1452 | VkPhysicalDeviceVulkan11Features vulkan_1_1_features = {}; |
| 1432 | 1453 | VkPhysicalDeviceVulkan12Features vulkan_1_2_features = {}; |
| 1433 | 1454 | VkPhysicalDevice16BitStorageFeaturesKHR storage_features = {}; |