Mesa (main): radv: Enable VK_KHR_acceleration_structure with RADV_PERFTEST=rt.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 18 22:42:32 UTC 2021
Module: Mesa
Branch: main
Commit: 82de184c3a2c797eb010b982636dd34c04cd1b8e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=82de184c3a2c797eb010b982636dd34c04cd1b8e
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Wed Mar 31 03:12:55 2021 +0200
radv: Enable VK_KHR_acceleration_structure with RADV_PERFTEST=rt.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11078>
---
src/amd/vulkan/radv_device.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
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;
}
More information about the mesa-commit
mailing list