fix(agc): import committed spans of partially accessible windows #6918
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6918"
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?
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-16T18:27:09Z.
What
A GPU access wholly inside the committed part of a large registration can lose host import because its selected window also includes inaccessible pages. Main rejects the window; the regression reserves 128 MiB, commits 64 KiB and verifies a GPU fill of the committed prefix.
After the existing window selection and overlap growth,
windowRunselects the aligned committed span that contains the entire requested access. It still refuses an access crossing a hole, an alignment that cannot cover the access, or narrowing that would cut an overlapping import. Whole-run callers and registrations no larger than the window keep their existing policy. No new exports, stubs, title checks or configuration switches.Tested
Refreshed head
8b0d85f9a0e35a72b867d8346b814ffb2bd4ceb7, based on maind2608978dac8a5ea35433db80200219e80f85fc6. This preserves maintainer refresh009618161aand all current-main tests.Windows 11 Pro 26200, NVIDIA GeForce RTX 5070 Ti, NVIDIA 617.42 (Windows driver 32.0.16.1742), WinLibs GCC 15.2.0 r7, Release, SPIRV-Tools OFF:
agc_driver_graphicsandagc_driver_host_import_windows, three consecutive runs on main and on this head: 6/6 pass per head, no skips.GuestBufferMemory.cppwith pinned main. Both tests fail at their intended assertions: the committed access is refused, and the GPU cannot fill the committed prefix. Restore the exact positive source and rebuild only the provider: 2/2 pass. Source bytes are restored and both fixture executable SHA256 hashes remain unchanged. No validation errors in the negative or restored run.ctest --test-dir build-depth-current -R '^agc_driver_(graphics|host_import_windows)$' -j1 -V, withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU=NVIDIA VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, andVK_LAYER_PATHpointing to that layer.The outstanding query-path review is complete:
importAllocationreturns an existing covering import throughfindImportbefore it reacheswindowRun. This change's commitment query is therefore on import selection/creation or reconciliation, not every stable reuse. The regression verifies reuse of the same narrowed buffer and rejects real holes; no title speedup is claimed and no query timing has been inferred from whole-test duration.Independent evidence remains attributed to its original head:
009618161amerged into maine4caa07950, Arch Linux/GCC 16.2.1, NVIDIA 620.70.06, Khronos 1.4.363.1; both focused tests pass on baseline and change, no skips or VUIDs, actual layer insertion verified.955e7c3c7; those are not measurements of this refresh.No 007 FPS gain or title unblock is claimed. Raw title code, captures and logs stay local. Related import-window work is coordinated in discussion #5714; this change addresses commitment within one registration, rather than joining registrations.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-16T18:43:22Z.
Title diagnostic qualification before a user-requested pause: the original dominant12.5MiB copied span was misclassified by an experimental sampler checking only its first4bytes. It crosses2MiB registrations, so it is not title evidence for this single-registration fix. Corrected findings: https://github.com/boykopovar/AnyPS5/discussions/5714#discussioncomment-18980596 . This PR's clean-main synthetic negative/positive and real Vulkan fill remain valid independently (7/7 restored, two new fixtures fail with only production restored to main).
This fix was included in title integrationc70803a19 with #5372 plus an opt-in16MiB window. That combined stack renders the offline menu at1.80194FPS, but no isolated benefit is attributed to this PR. Still draft; Linux and commitment-query-cost review remain pending. No new runs will start until the user resumes. AI-assisted: Codex.
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-16T19:03:43Z.
Linux cross-test of
955e7c3c7onmain93e54cedd. Setup: Arch Linux container, GCC 16.2.1, lavapipe (Mesa 26.2.4, LLVM 23.1.1), Release,BUILD_TESTING=ON. Test command:ctest -R 'host_import|driver_graphics|bda', 10 tests.agc_host_import_sparse).GuestBufferMemory.cpptaken frommain: 2 fail, both at the new cases.agc_driver_graphicsfails witha committed access was refused because its import window includes uncommitted pages.agc_driver_host_import_windowsfails withhost import windows: cannot fill the committed prefix.Not run: a hardware GPU, the full suite, any title.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by keravyn-ops on 2026-10-17T09:21:42Z.
AMD / Windows run of this PR at
955e7c3c7: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release.agc_driver_host_import_windows: pass (host import windows tests passed, 0.44 s)agc_driver_graphics: pass (5.14 s)AI-assisted: yes (runs made on the device above).
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-18T08:40:44Z.
Thanks @SleglJan and @keravyn-ops for the independent Linux red/green and AMD Windows runs. I have recorded both in the PR description. The Linux comparison isolates the intended production failure at both new assertions, with the container write-watch limitation retained; the AMD run covers actual host imports on Windows. This remains draft pending the import-query cost review. Our current 007 integration passes its selected host-import/graphics controls, but no isolated title FPS benefit is claimed for this fix. AI-assisted: Codex.
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-22T07:38:15Z.
Refreshed onto main
d6eafa54d, head028169644. New Windows paired proof on b36dea0ab (same AGC sources/fixtures; separate SystemService-only addition): both import/graphics fixtures pass, both fail with only GuestBufferMemory.cpp restored to main, both pass after exact positive restoration. Fixture EXE hashes unchanged; real Khronos1.4.363 layer loaded, no VUID/missing-layer errors in the positive controls. Body records exact setup, the current-main resident-mapping test retained alongside our prefix test, and the outstanding query-cost review. Prior AMD/Linux reports remain attributed to their tested heads. Draft/no FPS claim unchanged. AI-assisted: Codex.