diff --git a/src/launcher/diagnosis.cpp b/src/launcher/diagnosis.cpp index 95ae9ff..2ef6ed2 100644 --- a/src/launcher/diagnosis.cpp +++ b/src/launcher/diagnosis.cpp @@ -100,6 +100,14 @@ constexpr Rule kRules[] = { {{"gpu reset", "ring timeout", "nvrm: xid", "gpu hang", "stopped responding and has successfully recovered"}, // Windows: Display event 4101 "The graphics driver reset the GPU during the game.", kGpuAdvice}, + // hle/vulkan/vulkan.cpp: the driver's own fault report says the GPU read or wrote an address that was not + // mapped. That is an error in the commands the game's rendering sent, not a driver or overlay problem, and + // the VR runtime's own crash afterwards (its streaming driver losing the device) is a consequence. + {{"gpu page fault detected"}, + "The GPU read or wrote memory that was not mapped (a page fault) while the game was rendering.", + "This is most likely a bug in Venture or the game, not your driver. Send this report with an issue, and " + "say if it happens at the same point every time. If SteamVR or another VR runtime also reports a crash, " + "that probably came after this fault."}, // hle/vulkan/vulkan.cpp, and the host's own device loss. {{"native vulkan device lost", "vk_error_device_lost"}, "The game lost the graphics device.", kGpuAdvice}, diff --git a/src/runtime/hle/vulkan/address_log.cpp b/src/runtime/hle/vulkan/address_log.cpp index 344e30a..b071825 100644 --- a/src/runtime/hle/vulkan/address_log.cpp +++ b/src/runtime/hle/vulkan/address_log.cpp @@ -149,7 +149,17 @@ void address_log_detach(VkInstance instance) { destroy(instance, messenger, nullptr); } bool address_log_device(const std::vector& host) { - return address_log_enabled() && supported(host, VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME); + if (!address_log_enabled()) return false; + if (supported(host, VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME)) return true; + // The driver cannot report address bindings: say so once, or a fault report with no trace looks like a + // diagnostic that failed to start. + static std::once_flag warned; + std::call_once(warned, [] { + log::warn("vulkan", + "VENTURE_VULKAN_ADDRESS_LOG is set, but this GPU driver lacks VK_EXT_device_address_binding_report, " + "so a device fault will not be traced to an object"); + }); + return false; } void address_log_note(bool bind, std::uint64_t base, std::uint64_t size, int type, std::uint64_t handle, unsigned flags) { diff --git a/tests/debug_report_test.cpp b/tests/debug_report_test.cpp index b89e26e..e386881 100644 --- a/tests/debug_report_test.cpp +++ b/tests/debug_report_test.cpp @@ -66,6 +66,10 @@ TEST_CASE("debug report: known causes, most specific first") { auto lost = diagnose("E [vulkan-fault] Native Vulkan device lost on guest tid 7; ending the app\n"); REQUIRE(lost); CHECK(lost->cause.find("graphics device") != std::string::npos); + auto fault = diagnose("W [vulkan-fault] vkGetDeviceFaultInfoEXT returned 0: GPU page fault detected (addresses=1)\n" + "E [vulkan-fault] Native Vulkan device lost on guest tid 7; ending the app\n"); + REQUIRE(fault); + CHECK(fault->cause.find("page fault") != std::string::npos); auto reset = diagnose("kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset begin!\n"); REQUIRE(reset); CHECK(reset->cause.find("reset the GPU") != std::string::npos);