From 2156064bdde055862e05412a4dfd78df3ebd2101 Mon Sep 17 00:00:00 2001 From: lizzie Date: Tue, 28 Apr 2026 18:56:57 +0000 Subject: [PATCH] fix device fault? --- src/video_core/vulkan_common/vulkan_device.cpp | 6 +++++- src/video_core/vulkan_common/vulkan_device.h | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 049f6618ea..4766c7ead4 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -820,7 +820,7 @@ void Device::ReportLoss() const { s += "\n"; } LOG_INFO(Render_Vulkan, "{}", s); - } + } else if () // Wait for the log to flush and for Nsight Aftermath to dump the results std::this_thread::sleep_for(std::chrono::seconds{15}); @@ -1131,6 +1131,10 @@ bool Device::GetSuitability(bool requires_swapchain) { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR; SetNext(next, properties.maintenance5); } + if (extensions.device_fault) { + properties.device_fault.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT; + SetNext(next, properties.device_fault); + } // Perform the property fetch. physical.GetProperties2(properties2); diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index dc940fef1a..f8050168c1 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -83,8 +83,8 @@ VK_DEFINE_HANDLE(VmaAllocator) EXTENSION(EXT, SHADER_STENCIL_EXPORT, shader_stencil_export) \ EXTENSION(EXT, SHADER_VIEWPORT_INDEX_LAYER, shader_viewport_index_layer) \ EXTENSION(EXT, TOOLING_INFO, tooling_info) \ - EXTENSION(EXT, DEVICE_FAULT, device_fault) \ EXTENSION(EXT, VERTEX_ATTRIBUTE_DIVISOR, vertex_attribute_divisor) \ + EXTENSION(EXT, DEVICE_FAULT, device_fault) \ EXTENSION(KHR, DRAW_INDIRECT_COUNT, draw_indirect_count) \ EXTENSION(KHR, DRIVER_PROPERTIES, driver_properties) \ EXTENSION(KHR, PUSH_DESCRIPTOR, push_descriptor) \ @@ -1014,7 +1014,7 @@ private: VkPhysicalDeviceSubgroupSizeControlProperties subgroup_size_control{}; VkPhysicalDeviceTransformFeedbackPropertiesEXT transform_feedback{}; VkPhysicalDeviceMaintenance5PropertiesKHR maintenance5{}; - + VkPhysicalDeviceFaultFeaturesEXT device_fault{}; VkPhysicalDeviceProperties properties{}; };