Skip to content

fix(kyty): keep GPU state alive through scheduler drain - #280

Open
mjnhbg3 wants to merge 1 commit into
simnJS:AnyKytyfrom
mjnhbg3:fix/kyty-gpu-shutdown-drain
Open

mjnhbg3 wants to merge 1 commit into
simnJS:AnyKytyfrom
mjnhbg3:fix/kyty-gpu-shutdown-drain

Conversation

@mjnhbg3

@mjnhbg3 mjnhbg3 commented Nov 23, 2026 •

Copy link
Copy Markdown

What

Keep GuestGpu alive through CommandScheduler::Finish() and DrainPriorityOperations(), then clear it and the VideoOut pointer. Shutdown now drains an active scheduler even when VideoOut was not initialized. A regression queues a priority completion and checks that the stopped GPU is still available while the renderer drains.

Refs #251. This addresses scheduler completion ordering. The guest-fault admission window described in the issue remains open, and Anger Foot's window-close failure has not been retested.

Tested

  • Windows 11 Pro, NVIDIA GeForce RTX 5070 Ti, driver 616.64: kyty_shim_renderer_shutdown, kyty_shim_cross_queue_label_order, kyty_shim_write_fault_tracking, kyty_shim_cross_queue_compute_waits_graphics_clock, and kyty_shim_cross_queue_recycled_label passed (5/5). The shutdown regression also passed 10 repeated runs. The two cross-queue order fixtures reported their expected ordering failures.
  • Same machine and GPU, exact AnyKyty base 7de61e3451: the four pre-existing focused tests passed. Applying only the new regression to the base made kyty_shim_renderer_shutdown fail with the renderer did not finish its scheduler during GPU shutdown; the test files were then restored.
  • Both sides used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, and Khronos validation 1.4.363. Every GPU test log and replay log showed the loader inserting the layer; neither side logged a missing-layer warning or a VUID- error. The four replay logs on each side reported unfinished=0.
  • python3 tools/check_conventions.py --base origin/AnyKyty and python3 tools/check_kyty_settings.py passed. The origin/main conventions command was also run; its diagnostics were byte identical on the base and candidate because this PR targets AnyKyty as docs/dev/START_HERE.md requires.
  • Anger Foot: not tested; no title run or guest-fault shutdown reproduction.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 616.64, Windows 11 Pro
  • AI-assisted: yes

@mjnhbg3
mjnhbg3 marked this pull request as ready for review November 23, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant