vk: Selectively enable extended device fault features in logical device creation step

This commit is contained in:
kd-11 2024-12-23 03:18:34 +03:00 committed by kd-11
parent 2c45438422
commit e3df7bccac
2 changed files with 10 additions and 1 deletions

View File

@ -732,6 +732,16 @@ namespace vk
device.pNext = &synchronization2_info;
}
VkPhysicalDeviceFaultFeaturesEXT device_fault_info{};
if (pgpu->optional_features_support.extended_device_fault)
{
device_fault_info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT;
device_fault_info.pNext = const_cast<void*>(device.pNext);
device_fault_info.deviceFault = VK_TRUE;
device_fault_info.deviceFaultVendorBinary = VK_FALSE;
device_fault_info.pNext = &device_fault_info;
}
if (auto error = vkCreateDevice(*pgpu, &device, nullptr, &dev))
{
dump_debug_info(requested_extensions, enabled_features);

View File

@ -36,7 +36,6 @@ namespace vk
.pVendorBinaryData = vendor_binary_data.data()
};
fault_counts.vendorInfoCount = 0;
g_render_device->_vkGetDeviceFaultInfoEXT(*g_render_device, &fault_counts, &fault_info);
std::string fault_message = fmt::format(