mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
vk: Fix extension initialization during device creation
- Fix crash when using device_fault extension - Fix spec violation when using conditional rendering
This commit is contained in:
parent
f3e913b56a
commit
26d85e53a4
2 changed files with 26 additions and 30 deletions
|
@ -752,7 +752,16 @@ namespace vk
|
||||||
device_fault_info.pNext = const_cast<void*>(device.pNext);
|
device_fault_info.pNext = const_cast<void*>(device.pNext);
|
||||||
device_fault_info.deviceFault = VK_TRUE;
|
device_fault_info.deviceFault = VK_TRUE;
|
||||||
device_fault_info.deviceFaultVendorBinary = VK_FALSE;
|
device_fault_info.deviceFaultVendorBinary = VK_FALSE;
|
||||||
device_fault_info.pNext = &device_fault_info;
|
device.pNext = &device_fault_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
VkPhysicalDeviceConditionalRenderingFeaturesEXT conditional_rendering_info{};
|
||||||
|
if (pgpu->optional_features_support.conditional_rendering)
|
||||||
|
{
|
||||||
|
conditional_rendering_info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT;
|
||||||
|
conditional_rendering_info.pNext = const_cast<void*>(device.pNext);
|
||||||
|
conditional_rendering_info.conditionalRendering = VK_TRUE;
|
||||||
|
device.pNext = &conditional_rendering_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto error = vkCreateDevice(*pgpu, &device, nullptr, &dev))
|
if (auto error = vkCreateDevice(*pgpu, &device, nullptr, &dev))
|
||||||
|
|
|
@ -29,10 +29,6 @@ namespace vk
|
||||||
std::vector<u8> vendor_binary_data;
|
std::vector<u8> vendor_binary_data;
|
||||||
std::string fault_description;
|
std::string fault_description;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__try
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
// Retrieve sizes
|
// Retrieve sizes
|
||||||
g_render_device->_vkGetDeviceFaultInfoEXT(*g_render_device, &fault_counts, nullptr);
|
g_render_device->_vkGetDeviceFaultInfoEXT(*g_render_device, &fault_counts, nullptr);
|
||||||
|
|
||||||
|
@ -51,15 +47,6 @@ namespace vk
|
||||||
g_render_device->_vkGetDeviceFaultInfoEXT(*g_render_device, &fault_counts, &fault_info);
|
g_render_device->_vkGetDeviceFaultInfoEXT(*g_render_device, &fault_counts, &fault_info);
|
||||||
|
|
||||||
fault_description = fault_info.description;
|
fault_description = fault_info.description;
|
||||||
#ifdef _MSC_VER
|
|
||||||
}
|
|
||||||
__except (EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
rsx_log.error("Driver crashed retrieving extended crash information. Are you running on an NVIDIA card?");
|
|
||||||
return "Extended fault information is not available. The driver crashed when retrieving the details.";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::string fault_message = fmt::format(
|
std::string fault_message = fmt::format(
|
||||||
"Device Fault Information:\n"
|
"Device Fault Information:\n"
|
||||||
"Fault Summary:\n"
|
"Fault Summary:\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue