mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 01:00:53 +01:00
[PR #408] [MERGED] runtime: propagate device loss found by the retire-ticket progress query (OLD-6149) #459
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#459
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/408
Author: @Len1k
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:old-6149-retire-ticket-device-loss📝 Commits (1)
a44e66eRuntime: propagate device loss found by the retire-ticket progress query📊 Changes
1 file changed (+17 additions, -6 deletions)
View changed files
📝
runtime/src/vulkan_backend.h(+17 -6)📄 Description
Carries over the fix from the deleted repository's PR #6149, which was not preserved under
old-pr/. Commit3a21e3aea481bb9f9d9bfe9360c5b972fb19f7bbin theabilliontokens/Leonidafork has the only change; this branch keeps it as-is (same diff, +17/−6, one file) onmaind2cd6c0d.Claimed in the coordination issue as:
claiming: OLD-6149(first reported there as afinding:).What it fixes
VulkanContext::completed_retire_ticket()(runtime/src/vulkan_backend.h) queries each pending ticket's timeline semaphore withvkGetSemaphoreCounterValuebut treats every non-VK_SUCCESSresult as "not completed yet":When the driver returns
VK_ERROR_DEVICE_LOSThere, that result is discarded: the context is never marked lost and the queue goes on to acquire, record and submit against a lost device.vk_queue_query_syncthen fails atline 468: progress_loss_ok("progress counter device loss NOT propagated"). Every other counter query in the layer already callsmark_device_lost(); this one was the exception. The fix records theVkResult, sets alostflag, callsmark_device_lost()outsidesubmit_mutex_(assubmit()does — notifying the fence dispatcher can run callbacks that submit again) and returns 0 so nothing is retired against a lost device.Tested on RDNA1 (RX 5700 XT, gfx1010)
AMD Radeon RX 5700 XT (Navi 10, PCI 1002:731f), AMD proprietary 26.11.2, Windows 11 Pro 10.0.26200, subgroup 32..64. Built with llvm-mingw 23.1.6 (static), CMake 4.4.5, llvm-mc 23.1.6, SPIRV-Tools v2026.4. Synthetic tests only, no game files.
mainata0e1876(the function is byte-identical there and atd2cd6c0d):vk_queue_query_sync_testexits 1 in 5/5 direct runs and 4/5ctestruns; fullctest61/64 passed, this one failure, 2 skipped.ctestpass; fullctest62/64 passed, 0 failed, 2 skipped (shader_library_corpus,vk_sync_validation); fullrun_gpu_tests.pyunchanged at 213/241 passed, 28 skipped, 0 failed.AI-assisted (OpenCode). The commit keeps
abilliontokens' authorship and message; only its parent is the currentmain.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.