graphics: add experimental interrupt-only RELEASE_MEM batching #900
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!900
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/900/head"
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?
@gohansharma79-svg on GitHub · 2026-09-28 22:46 UTC · original
gohansharma79-svg:astro-interrupt-flush-batching→main· +209 −98 · 11 files · 7 commits · closed without mergingSummary
Adds an optional Batch interrupt-only GPU flushes (experimental) setting under Compatibility, disabled by default.
The goal is to reduce Vulkan submission overhead when a game issues frequent interrupt-only
RELEASE_MEMpackets. Astro Bot motivated this experiment.How it works
The existing interrupt-only
RELEASE_MEMhelper immediately flushes after queuing an end-of-pipe interrupt.With this option enabled, the interrupt still uses the existing scheduler and completion tracking, but the immediate flush is omitted. Work can accumulate until an existing submission boundary flushes it.
This patch:
KYTY_DEFER_RELEASE_MEM_INTERRUPTS.RELEASE_MEMflush paths.Astro Bot comparison
The attached screenshots show the same desert gameplay area on the same hardware.
bec67b7export-978cb235e566PPSA21567PPSA2156701.018.00001.018.000Hardware: AMD Ryzen 7 5800X and NVIDIA GeForce RTX 4070 SUPER.
Official build — 20 FPS
Custom combined build — 34 FPS
The displayed FPS is 70% higher in the custom-build screenshot. These are individual observations, not sustained benchmark averages.
The custom build contains additional optimizations beyond this PR. The screenshots therefore demonstrate the combined build’s observed performance, rather than isolating the contribution of interrupt batching. OBS is also visible in the custom screenshot, and identical capture conditions have not been established.
Earlier profiling evidence
An earlier archived combined-build comparison of interrupt batching recorded approximately:
This supports investigating submission overhead. It does not replace testing the exact extracted PR against current upstream.
Validation status
The extracted patch passed application and whitespace checks against its preparation baseline.
Fresh cross-platform CI validation of the updated head is running; exact results are listed in the refresh section below. A new gameplay test of this exact branch has not been performed. The attached screenshots come from the existing official and custom combined builds.
Correctness considerations
Omitting an immediate flush can delay guest-visible interrupt delivery. Interrupt ordering, event coalescing and dependencies on timely completion need review and regression testing.
The feature remains experimental and opt-in. This PR does not claim universal gains or stable 50–60 FPS gameplay.
Refresh — 19 October 2026
Merged current main
099de8deinto this branch without rewriting the original contribution. Resolved the PM4 and launcher conflicts while retaining main's newer memory-writing RELEASE_MEM boundaries. Ported the experimental toggle to the tabbed Compatibility panel and the current configuration serialization, per-game export/import and effective configuration copy paths. The mode remains off by default.Added
experimental_settings_testsfor off-by-default behavior, saved settings reload, effective game settings, export/import and a legacy settings file without the key. The existing GPU command-lane fixture now checks the opt-in interrupt-only submission count, registered separately asgpu_command_lane_interrupt_batching; memory-writing release expectations remain unchanged.CI builds and runs the settings regression on Windows, Linux and macOS. Linux compiles the GPU fixture too. The Windows job publishes its executable and runtime DLLs for physical-GPU validation. The full fixture requires barycentrics and other features unavailable on Lavapipe, so no software-driver pass is claimed. The standard
kyty_teststarget builds the settings regression too. Local whitespace and XML parsing checks pass. This machine has not compiled the Qt launcher locally; CI is used for those builds. No new gameplay FPS claim is made. GuestGpu still flushes after progress at graphics/compute submission boundaries; rare interrupt timing and game compatibility remain experimental and require gameplay validation.Verified results
b06a28f: Windows build and 14/14 selected tests pass, Linux and macOS builds and 16/16 each pass. Packaging succeeds on all platforms. CI run.--gpu-command-lane-onlyruns withKYTY_DEFER_RELEASE_MEM_INTERRUPTS=0and=1both exit 0. The command-lane, scalar-leaf-call, AGC system-table, indirect-flow, wait/resume, rewind and CE-completion checks pass in both modes.60df21a7eb90bceccc1d99f572c83c9cbe3e9763564c6a91eb2c0b883cd4bfd0.314e710stages the executable beside its DLLs. That flattened layout was tested again with only Windows system directories on PATH; both modes pass. The automatic packaging rerun is pending. Production and test source are unchanged from the passing runs.@coderabbitai[bot] on GitHub · 2026-09-28 22:54 UTC · original · edited 2026-10-18 23:58 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
6e3f0ccd-84d5-481b-bdb9-c51c6268c64e📥 Commits
Reviewing files that changed from the base of the PR and between
b06a28f9edand314e710aaa.📒 Files selected for processing: 1
.github/workflows/build.ymlIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.
📝 Walkthrough
The launcher adds an experimental option to defer interrupt-only GPU flushes. It stores the option in configuration, exposes it in Compatibility settings, and passes its value to the interpreter through
KYTY_DEFER_RELEASE_MEM_INTERRUPTS. The command processor checks the environment setting before flushing after an interrupt-onlyRELEASE_MEM. The change also adds settings and GPU command-lane tests and updates build configuration.Suggested reviewers:
aspenini,pipe530Priority: ➖ Normal
Change: Feature
Merge Risk: 🔵 Low · up to
314e7The optional interrupt-batching path has a registered regression test, but CI does not run it, so regressions in that path would not be caught automatically. Because the option is disabled by default, this is a bounded validation risk rather than evidence of an existing runtime failure.
Security architecture risk: 🔵 Low · up to
20c76The experimental mode is off by default and affects interrupt timing in the launched game process. The normal submission path still submits processed work, and the change does not grant new access or authority. Some less common execution and event-delivery paths remain unverified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 6 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@gohansharma79-svg on GitHub · 2026-10-03 10:29 UTC · original
@Nmzik can you please check this
@gohansharma79-svg on GitHub · 2026-10-18 15:22 UTC · original
@Nmzik
@ -122,3 +122,3 @@shell: cmdrun: |ctest --test-dir _Build/windows --output-on-failure -R "^(audio_out2_port|pad_haptics|controller_settings|host_input|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|archive_file|avplayer_file|virtual_memory_allocation)$"ctest --test-dir _Build/windows --output-on-failure -R "^(audio_out2_port|pad_haptics|controller_settings|host_input|ime_dialog|lru_cache|resource_tracking|scalar_provenance|resource_materialization|shader_vertex_metadata|archive_file|avplayer_file|experimental_settings|virtual_memory_allocation)$"@coderabbitai[bot] on GitHub · 2026-10-18 23:27 UTC · original · edited 2026-10-18 23:31 UTC
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Build and run the new GPU batching test in CI.
All three CTest filters omit
gpu_command_lane_interrupt_batching, so this workflow never runs the new opt-in regression. The Linux build also omitsshader_recompiler_compute_tests. That target usesEXCLUDE_FROM_ALL, so the new test cannot run after the listed Linux build targets complete. Add the target to the Linux build step and add the test name to the applicable CTest filters. (github.com)Also applies to: 215-215, 393-393, 400-400
🧰 Tools
🪛 zizmor (1.30.1)
[warning] 1-532: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 32-136: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
✅ Addressed in commits
6c84a7atoe2d6577@coderabbitai[bot] on GitHub · 2026-10-18 23:27 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
56b0dd3a-645d-4690-828c-5cde01e33582📥 Commits
Reviewing files that changed from the base of the PR and between
20c76cfecaand9368798524.📒 Files selected for processing: 11
.github/workflows/build.ymlCMakeLists.txtsrc/graphics/guest_gpu/command_processor/pm4Handlers.cppsrc/launcher/CMakeLists.txtsrc/launcher/forms/configuration_edit_dialog.uisrc/launcher/include/configuration.hsrc/launcher/src/configuration.cppsrc/launcher/src/configurationEditDialog.cppsrc/launcher/src/mainDialog.cpptests/ExperimentalSettingsTests.cpptests/ShaderRecompilerComputeTests.cpp🚧 Files skipped from review as they are similar to previous changes: 1
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@coderabbitai[bot] on GitHub · 2026-10-18 23:36 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
660c2488-a3e4-4d37-88d7-1c8b68e1d6f6📥 Commits
Reviewing files that changed from the base of the PR and between
9368798524ande2d6577485.📒 Files selected for processing: 3
.github/workflows/build.ymlCMakeLists.txtsrc/launcher/CMakeLists.txtIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
@coderabbitai[bot] on GitHub · 2026-10-18 23:36 UTC · original · edited 2026-10-18 23:38 UTC
On
.github/workflows/build.ymlline 410 (outdated):🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Do not force the GPU command-lane tests onto Lavapipe.
Mesa does not list Lavapipe as supporting
VK_KHR_fragment_shader_barycentric.VulkanHarness::Initrequires that feature intests/ShaderRecompilerComputeTests.cpp(Lines 19539–19589). With the ICD restricted to Lavapipe, both selected tests fail during device selection, so the Linux job cannot reach installation. Run this fixture on a device with the required features, or give the interrupt-batching check a harness that does not require them. (chromium.googlesource.com)🧰 Tools
🪛 zizmor (1.30.1)
[warning] 1-544: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 294-446: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
✅ Addressed in commit
b06a28f@coderabbitai[bot] on GitHub · 2026-10-18 23:41 UTC · original · edited 2026-10-18 23:53 UTC
On
.github/workflows/build.ymlline 137 (outdated):🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Package the test executable beside its DLLs.
With these two paths,
upload-artifact@v4putsshader_recompiler_compute_tests.exeat the artifact root and the installed DLLs underinstall/. The clang-cl test target useslibwinpthread-1.dll, so the downloaded executable cannot start on a clean Windows machine. Copy the executable into the install directory before upload, or upload the build-directory DLL beside the executable. (github.com)🧰 Tools
🪛 zizmor (1.30.1)
[warning] 1-541: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 32-145: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
✅ Addressed in commit
314e710@coderabbitai[bot] on GitHub · 2026-10-18 23:41 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
409e44c4-991f-45e5-9fed-94f4fccef364📥 Commits
Reviewing files that changed from the base of the PR and between
e2d6577485andb06a28f9ed.📒 Files selected for processing: 1
.github/workflows/build.ymlIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
Pull request closed