runtime: release the virtual core during GPU invalidation #485
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!485
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/release-vcore-for-invalidate"
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?
Mapped-range invalidation can wait for replay or GPU write-back while its guest thread still owns an emulated CPU core. Other guest threads eligible for that core cannot run during the wait, violating the runtime's existing blocking-call contract.
Release the caller's core around the invalidate callback and reacquire it only if that call released one, after the renderer returns and its locks unwind. Backend arguments and callback counts are preserved, following the existing sync-wait, queue-finish and virtual-map-change patterns.
Validation:
hos_vcore_away/backfunctions and renderer API header. Nine cases cover a queued producer, both backends, immediate returns, zero arguments, already-suspended/non-guest callers, disabled vcores, balanced ownership and reacquisition after renderer-lock release.early_callinitializers in both baseline and fix.honest-eta(a598b9f) and the shared #488 fixture repair. Atd462a10, the actual nine-case fixture passes again with Windows llvm-mingw Clang and Linux WSL GCC. The released, unpatched wrapper independently fails the bounded producer-progress assertion. The current renderer API header and queue callback are preserved; whitespace checks pass. All four hosted checks also pass at this refreshed head: Windows and Linux source checks, SPIR-V lowering, and AppImage packaging.No full game/live GPU check is claimed for this PR. The synthetic producer establishes the scheduling contract; it does not reproduce a particular Vulkan dependency cycle or prove the cause of the separately observed portrait/fullscreen slowdown.