diff --git a/src/dxvk/dxvk_adapter.cpp b/src/dxvk/dxvk_adapter.cpp index c088fe8b..0f86a397 100644 --- a/src/dxvk/dxvk_adapter.cpp +++ b/src/dxvk/dxvk_adapter.cpp @@ -386,6 +386,11 @@ namespace dxvk { enabledFeatures.extVertexAttributeDivisor.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extVertexAttributeDivisor); } + if (devExtensions.khrBufferDeviceAddress) { + enabledFeatures.khrBufferDeviceAddress.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR; + enabledFeatures.khrBufferDeviceAddress.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.khrBufferDeviceAddress); + } + // Report the desired overallocation behaviour to the driver VkDeviceMemoryOverallocationCreateInfoAMD overallocInfo; overallocInfo.sType = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD; @@ -653,6 +658,11 @@ namespace dxvk { m_deviceFeatures.extVertexAttributeDivisor.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extVertexAttributeDivisor); } + if (m_deviceExtensions.supports(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME) >= 3) { + m_deviceFeatures.khrBufferDeviceAddress.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR; + m_deviceFeatures.khrBufferDeviceAddress.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.khrBufferDeviceAddress); + } + m_vki->vkGetPhysicalDeviceFeatures2(m_handle, &m_deviceFeatures.core); } @@ -744,7 +754,9 @@ namespace dxvk { "\n geometryStreams : ", features.extTransformFeedback.geometryStreams ? "1" : "0", "\n", VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, "\n vertexAttributeInstanceRateDivisor : ", features.extVertexAttributeDivisor.vertexAttributeInstanceRateDivisor ? "1" : "0", - "\n vertexAttributeInstanceRateZeroDivisor : ", features.extVertexAttributeDivisor.vertexAttributeInstanceRateZeroDivisor ? "1" : "0")); + "\n vertexAttributeInstanceRateZeroDivisor : ", features.extVertexAttributeDivisor.vertexAttributeInstanceRateZeroDivisor ? "1" : "0", + "\n", VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME, + "\n bufferDeviceAddress : ", features.khrBufferDeviceAddress.bufferDeviceAddress)); } diff --git a/src/dxvk/dxvk_device_info.h b/src/dxvk/dxvk_device_info.h index c7718ae9..d832bec1 100644 --- a/src/dxvk/dxvk_device_info.h +++ b/src/dxvk/dxvk_device_info.h @@ -47,6 +47,7 @@ namespace dxvk { VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT extShaderDemoteToHelperInvocation; VkPhysicalDeviceTransformFeedbackFeaturesEXT extTransformFeedback; VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT extVertexAttributeDivisor; + VkPhysicalDeviceBufferDeviceAddressFeaturesKHR khrBufferDeviceAddress; }; } \ No newline at end of file