1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 22:24:13 +01:00

[dxvk] Add VK_KHR_buffer_device_address extension info

This commit is contained in:
Philip Rebohle 2021-10-01 14:08:57 +02:00
parent c8341e4be3
commit 1fefdf2ab6
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 14 additions and 1 deletions

View File

@ -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));
}

View File

@ -47,6 +47,7 @@ namespace dxvk {
VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT extShaderDemoteToHelperInvocation;
VkPhysicalDeviceTransformFeedbackFeaturesEXT extTransformFeedback;
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT extVertexAttributeDivisor;
VkPhysicalDeviceBufferDeviceAddressFeaturesKHR khrBufferDeviceAddress;
};
}