summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2021-03-31 03:12:55 +0200
committerMarge Bot <eric+marge@anholt.net>2021-06-18 22:16:27 +0000
commit82de184c3a2c797eb010b982636dd34c04cd1b8e (patch)
treebaed0b236b3025c7fa90cca9ad26c37c4e73eb47 /src
parentc27e3a6248c60ad094233c3ec783d9274fb9055d (diff)
radv: Enable VK_KHR_acceleration_structure with RADV_PERFTEST=rt.HEADmain
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11078>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_device.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index b0fce3f75cf..87687a87cb0 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -383,6 +383,8 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
*ext = (struct vk_device_extension_table){
.KHR_8bit_storage = true,
.KHR_16bit_storage = true,
+ .KHR_acceleration_structure = (device->instance->perftest_flags & RADV_PERFTEST_RT) &&
+ device->rad_info.chip_class >= GFX10_3,
.KHR_bind_memory2 = true,
.KHR_buffer_device_address = true,
.KHR_copy_commands2 = true,
@@ -1598,6 +1600,16 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
features->globalPriorityQuery = true;
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: {
+ VkPhysicalDeviceAccelerationStructureFeaturesKHR *features =
+ (VkPhysicalDeviceAccelerationStructureFeaturesKHR *)ext;
+ features->accelerationStructure = true;
+ features->accelerationStructureCaptureReplay = false;
+ features->accelerationStructureIndirectBuild = false;
+ features->accelerationStructureHostCommands = true;
+ features->descriptorBindingAccelerationStructureUpdateAfterBind = true;
+ break;
+ }
default:
break;
}
@@ -2270,6 +2282,23 @@ radv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
props->transformFeedbackPreservesTriangleFanProvokingVertex = true;
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR: {
+ VkPhysicalDeviceAccelerationStructurePropertiesKHR *props =
+ (VkPhysicalDeviceAccelerationStructurePropertiesKHR *)ext;
+ props->maxGeometryCount = (1 << 24) - 1;
+ props->maxInstanceCount = (1 << 24) - 1;
+ props->maxPrimitiveCount = (1 << 29) - 1;
+ props->maxPerStageDescriptorAccelerationStructures =
+ pProperties->properties.limits.maxPerStageDescriptorStorageBuffers;
+ props->maxPerStageDescriptorUpdateAfterBindAccelerationStructures =
+ pProperties->properties.limits.maxPerStageDescriptorStorageBuffers;
+ props->maxDescriptorSetAccelerationStructures =
+ pProperties->properties.limits.maxDescriptorSetStorageBuffers;
+ props->maxDescriptorSetUpdateAfterBindAccelerationStructures =
+ pProperties->properties.limits.maxDescriptorSetStorageBuffers;
+ props->minAccelerationStructureScratchOffsetAlignment = 128;
+ break;
+ }
default:
break;
}