mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-04-04 10:25:17 +02:00
[dxvk] Enable VK_KHR_maintenance7 if available
This commit is contained in:
parent
9aa2df2172
commit
779fc6625f
@ -444,9 +444,11 @@ namespace dxvk {
|
||||
m_deviceFeatures.extSwapchainMaintenance1.swapchainMaintenance1 &&
|
||||
instance->extensions().extSurfaceMaintenance1;
|
||||
|
||||
// Enable maintenance5 if supported
|
||||
// Enable maintenance features if supported
|
||||
enabledFeatures.khrMaintenance5.maintenance5 =
|
||||
m_deviceFeatures.khrMaintenance5.maintenance5;
|
||||
enabledFeatures.khrMaintenance7.maintenance7 =
|
||||
m_deviceFeatures.khrMaintenance7.maintenance7;
|
||||
|
||||
// Enable present id and present wait together, if possible
|
||||
enabledFeatures.khrPresentId.presentId =
|
||||
@ -657,6 +659,10 @@ namespace dxvk {
|
||||
enabledFeatures.khrMaintenance5 = *reinterpret_cast<const VkPhysicalDeviceMaintenance5FeaturesKHR*>(f);
|
||||
break;
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR:
|
||||
enabledFeatures.khrMaintenance7 = *reinterpret_cast<const VkPhysicalDeviceMaintenance7FeaturesKHR*>(f);
|
||||
break;
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR:
|
||||
enabledFeatures.khrPresentId = *reinterpret_cast<const VkPhysicalDevicePresentIdFeaturesKHR*>(f);
|
||||
break;
|
||||
@ -841,6 +847,11 @@ namespace dxvk {
|
||||
m_deviceInfo.khrMaintenance5.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.khrMaintenance5);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_KHR_MAINTENANCE_7_EXTENSION_NAME)) {
|
||||
m_deviceInfo.khrMaintenance7.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR;
|
||||
m_deviceInfo.khrMaintenance7.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.khrMaintenance7);
|
||||
}
|
||||
|
||||
// Query full device properties for all enabled extensions
|
||||
m_vki->vkGetPhysicalDeviceProperties2(m_handle, &m_deviceInfo.core);
|
||||
|
||||
@ -981,6 +992,11 @@ namespace dxvk {
|
||||
m_deviceFeatures.khrMaintenance5.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.khrMaintenance5);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_KHR_MAINTENANCE_7_EXTENSION_NAME)) {
|
||||
m_deviceFeatures.khrMaintenance7.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR;
|
||||
m_deviceFeatures.khrMaintenance7.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.khrMaintenance7);
|
||||
}
|
||||
|
||||
if (m_deviceExtensions.supports(VK_KHR_PRESENT_ID_EXTENSION_NAME)) {
|
||||
m_deviceFeatures.khrPresentId.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR;
|
||||
m_deviceFeatures.khrPresentId.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.khrPresentId);
|
||||
@ -1065,6 +1081,7 @@ namespace dxvk {
|
||||
&devExtensions.khrExternalMemoryWin32,
|
||||
&devExtensions.khrExternalSemaphoreWin32,
|
||||
&devExtensions.khrMaintenance5,
|
||||
&devExtensions.khrMaintenance7,
|
||||
&devExtensions.khrPipelineLibrary,
|
||||
&devExtensions.khrPresentId,
|
||||
&devExtensions.khrPresentWait,
|
||||
@ -1213,6 +1230,11 @@ namespace dxvk {
|
||||
enabledFeatures.khrMaintenance5.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.khrMaintenance5);
|
||||
}
|
||||
|
||||
if (devExtensions.khrMaintenance7) {
|
||||
enabledFeatures.khrMaintenance7.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR;
|
||||
enabledFeatures.khrMaintenance7.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.khrMaintenance7);
|
||||
}
|
||||
|
||||
if (devExtensions.khrPresentId) {
|
||||
enabledFeatures.khrPresentId.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR;
|
||||
enabledFeatures.khrPresentId.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.khrPresentId);
|
||||
@ -1386,6 +1408,8 @@ namespace dxvk {
|
||||
"\n extension supported : " << (features.khrExternalSemaphoreWin32 ? "1" : "0") <<
|
||||
"\n" << VK_KHR_MAINTENANCE_5_EXTENSION_NAME <<
|
||||
"\n maintenance5 : " << (features.khrMaintenance5.maintenance5 ? "1" : "0") <<
|
||||
"\n" << VK_KHR_MAINTENANCE_7_EXTENSION_NAME <<
|
||||
"\n maintenance7 : " << (features.khrMaintenance7.maintenance7 ? "1" : "0") <<
|
||||
"\n" << VK_KHR_PRESENT_ID_EXTENSION_NAME <<
|
||||
"\n presentId : " << (features.khrPresentId.presentId ? "1" : "0") <<
|
||||
"\n" << VK_KHR_PRESENT_WAIT_EXTENSION_NAME <<
|
||||
|
@ -30,6 +30,7 @@ namespace dxvk {
|
||||
VkPhysicalDeviceTransformFeedbackPropertiesEXT extTransformFeedback;
|
||||
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT extVertexAttributeDivisor;
|
||||
VkPhysicalDeviceMaintenance5PropertiesKHR khrMaintenance5;
|
||||
VkPhysicalDeviceMaintenance7PropertiesKHR khrMaintenance7;
|
||||
};
|
||||
|
||||
|
||||
@ -72,6 +73,7 @@ namespace dxvk {
|
||||
VkBool32 khrExternalMemoryWin32;
|
||||
VkBool32 khrExternalSemaphoreWin32;
|
||||
VkPhysicalDeviceMaintenance5FeaturesKHR khrMaintenance5;
|
||||
VkPhysicalDeviceMaintenance7FeaturesKHR khrMaintenance7;
|
||||
VkPhysicalDevicePresentIdFeaturesKHR khrPresentId;
|
||||
VkPhysicalDevicePresentWaitFeaturesKHR khrPresentWait;
|
||||
VkBool32 khrSwapchainMutableFormat;
|
||||
|
@ -322,6 +322,7 @@ namespace dxvk {
|
||||
DxvkExt khrExternalMemoryWin32 = { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrExternalSemaphoreWin32 = { VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrMaintenance5 = { VK_KHR_MAINTENANCE_5_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrMaintenance7 = { VK_KHR_MAINTENANCE_7_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrPipelineLibrary = { VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrPresentId = { VK_KHR_PRESENT_ID_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
DxvkExt khrPresentWait = { VK_KHR_PRESENT_WAIT_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||
|
Loading…
x
Reference in New Issue
Block a user