Skip to content

test(agc): exercise heap mirror regressions on Windows - #4

Closed
Zenodeon wants to merge 1 commit into
fma-rc:fix/agc-heap-mirror-residentfrom
Zenodeon:codex/resident-windows-tests
Closed

Zenodeon wants to merge 1 commit into
fma-rc:fix/agc-heap-mirror-residentfrom
Zenodeon:codex/resident-windows-tests

Conversation

@Zenodeon

Copy link
Copy Markdown

What

Windows heap-mirror regressions in upstream #7647 do not both execute: agc_sparse_heap_mirror_budget lacks the DLL search path, and agc_driver_resident_heap_mirror uses the non-Windows write-watch availability probe and allocates heaps outside the Windows guest arena.

Register the budget test with the existing Windows DLL-path setup and 30-second timeout. Allocate and commit Windows resident-test heaps through GuestArena, reset/release them on destruction, preserve the explicit same-address reuse case, and check the arena's write-watch capability on Windows. The Linux allocation/probe paths and every existing assertion are retained. Production code is unchanged.

This contribution targets fma-rc:fix/agc-heap-mirror-resident, the source branch of upstream boykopovar#7647 at 0b9b519a5e72b3f807399541d6de5ce6b421bd9a. It addresses LeandroLP23's Windows report. The original branch is not owned by this account, so this is a two-file contribution for its author to merge or cherry-pick. Fix commit: 11e02f25438bcf809fcddad57f643ff73ca42f7e.

Tested

Windows 11 build 26200, Intel Core i7-13700, NVIDIA GeForce RTX 4070 / driver 610.88; WinLibs GCC 15.2.0, Release, SPIR-V Tools enabled. Focused targets rebuilt from source. Candidate: 11e02f25438bcf809fcddad57f643ff73ca42f7e on original boykopovar#7647 head 0b9b519a5e. Separate frozen main baseline: 275e8967978f489eb950b8cdb4d5b40ecf441934.

Reported regression Original PR, unmodified With this change
agc_sparse_heap_mirror_budget Exit 0xc0000135; no DLL-path modification; effectively unlimited timeout Pass, 0.22 s; CTest supplies DLL path and reports timeout 30
agc_driver_resident_heap_mirror Skipped: no guest write watch Executes and passes, 0.75 s

No manual unpatched-library PATH workaround is used for the passing budget test. The resident test retains its sparse held-byte checks, real GPU reads/stores and guest-byte checks, unchanged refresh, same-address allocation replacement, joined-import mirror cleanup, and whole-copy fallback when sparse address space is unavailable.

12 unique focused tests pass, zero skips. Seven shared graphics/mirror unit tests pass on main (9.12 s) and candidate (8.01 s). The same real Vulkan BDA-device and array-layer tests pass on main (4.78 s) and candidate (4.50 s). The three additional PR-specific tests are resident heap mirror, sparse mirror budget and queue plan; all pass. The four-test extended device group (including the shared BDA test) passes in 5.21 s. Every individual test finishes below 30 seconds.

All compared runs use ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and the same RTX 4070. The shared graphics/mirror unit tests use mocked interfaces; hardware coverage comes from the real Vulkan controls and resident fixture. Loader logs confirm Khronos 1.4.304 loads for the hardware runs, with no missing-layer diagnostics. Matched hardware logs contain identical existing VUID-VkDeviceCreateInfo-pNext-pNext diagnostics for structure 1000574000 unknown to this older layer. The additional resident test reports the same known diagnostic; no new validation-error signatures are introduced. Zero total validation errors is not claimed.

Diff and conventions checks against the contribution's target branch pass. The required stale-fork origin/main check was attempted and fails with Windows WinError 206; the actual target check succeeds. tools/pr_overlap.py --branch codex/resident-windows-tests --repo fma-rc/AnyPS5 --base fix/agc-heap-mirror-resident reports no overlap.

This is Windows test coverage, not a new gameplay, memory saving or FPS measurement. Native AMD, Linux and other vendors were not rerun for this test-only contribution.

Checklist

  • Based on current main; no other open PR implements the same functions (this contribution targets the current fix(agc): bind heap mirrors only where the guest holds bytes boykopovar/AnyPS5#7647 source branch; main is tested separately)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • 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 4070, driver 610.88, Windows 11 build 26200
  • AI-assisted: yes, OpenAI Codex

@fma-rc

fma-rc commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Cherry-picked into fix/agc-heap-mirror-resident as 2d50c08 (you as author), thanks.

@fma-rc fma-rc closed this Oct 21, 2026
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.

2 participants