vk: Selectively enable extended device fault features in logical device creation step
This commit is contained in:
@@ -732,6 +732,16 @@ namespace vk
|
|||||||
device.pNext = &synchronization2_info;
|
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))
|
if (auto error = vkCreateDevice(*pgpu, &device, nullptr, &dev))
|
||||||
{
|
{
|
||||||
dump_debug_info(requested_extensions, enabled_features);
|
dump_debug_info(requested_extensions, enabled_features);
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ namespace vk
|
|||||||
.pVendorBinaryData = vendor_binary_data.data()
|
.pVendorBinaryData = vendor_binary_data.data()
|
||||||
};
|
};
|
||||||
|
|
||||||
fault_counts.vendorInfoCount = 0;
|
|
||||||
g_render_device->_vkGetDeviceFaultInfoEXT(*g_render_device, &fault_counts, &fault_info);
|
g_render_device->_vkGetDeviceFaultInfoEXT(*g_render_device, &fault_counts, &fault_info);
|
||||||
|
|
||||||
std::string fault_message = fmt::format(
|
std::string fault_message = fmt::format(
|
||||||
|
|||||||
Reference in New Issue
Block a user