unlink sync2 if not present (tentative fix for #418)
This commit is contained in:
parent
2ba3221fc9
commit
a15a93997c
|
@ -317,7 +317,7 @@ bool Instance::CreateDevice() {
|
||||||
.nullDescriptor = true,
|
.nullDescriptor = true,
|
||||||
},
|
},
|
||||||
vk::PhysicalDeviceSynchronization2Features{
|
vk::PhysicalDeviceSynchronization2Features{
|
||||||
.synchronization2 = has_sync2,
|
.synchronization2 = true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -328,12 +328,18 @@ bool Instance::CreateDevice() {
|
||||||
if (!robustness) {
|
if (!robustness) {
|
||||||
device_chain.unlink<vk::PhysicalDeviceRobustness2FeaturesEXT>();
|
device_chain.unlink<vk::PhysicalDeviceRobustness2FeaturesEXT>();
|
||||||
}
|
}
|
||||||
|
if (!has_sync2) {
|
||||||
|
device_chain.unlink<vk::PhysicalDeviceSynchronization2Features>();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
device = physical_device.createDeviceUnique(device_chain.get());
|
device = physical_device.createDeviceUnique(device_chain.get());
|
||||||
} catch (vk::ExtensionNotPresentError& err) {
|
} catch (vk::ExtensionNotPresentError& err) {
|
||||||
LOG_CRITICAL(Render_Vulkan, "Some required extensions are not available {}", err.what());
|
LOG_CRITICAL(Render_Vulkan, "Some required extensions are not available {}", err.what());
|
||||||
return false;
|
return false;
|
||||||
|
} catch (vk::FeatureNotPresentError& err) {
|
||||||
|
LOG_CRITICAL(Render_Vulkan, "Some required features are not available {}", err.what());
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
VULKAN_HPP_DEFAULT_DISPATCHER.init(*device);
|
VULKAN_HPP_DEFAULT_DISPATCHER.init(*device);
|
||||||
|
|
Loading…
Reference in New Issue