tests: cover two UHD render target leases in the XMem pool #1394

Closed
Okachamie wants to merge 1 commit from upstream-pr/1394 into main
Okachamie commented 2026-11-24 23:15:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Okachamie on 2026-11-24T23:15:38Z.


Claimed in the coordination issue as: TEST-XMEM-POOL-FILL

What and why

Extend xs_proxy_mock_test to keep two synthetic 3840×2160 RGBA8 render targets alive at once through device slot 127. Check that each allocation hook sees a 31.875 MiB lease, leaving 256 KiB in a 64 MiB pool. Check that releasing each resource frees its matching lease with the expected attributes.

Tested

The saved Windows mock executable passed all six modes under Wine 11.22 on CachyOS Linux: default, --fail-virtualalloc, --fail-virtualprotect, --fail-veh, --env-slots, and --env-slots-invalid. Both target source files are byte-identical to the previously tested patched worktree. No game files used.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • A new translator rule is in the contract table of docs/design.md (n/a).
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5481944988 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1394). Originally posted by [Okachamie](https://github.com/Okachamie) on 2026-11-24T23:15:38Z. --- Claimed in the coordination issue as: [TEST-XMEM-POOL-FILL](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7146595011) ### What and why Extend `xs_proxy_mock_test` to keep two synthetic 3840×2160 RGBA8 render targets alive at once through device slot 127. Check that each allocation hook sees a 31.875 MiB lease, leaving 256 KiB in a 64 MiB pool. Check that releasing each resource frees its matching lease with the expected attributes. ### Tested The saved Windows mock executable passed all six modes under Wine 11.22 on CachyOS Linux: default, `--fail-virtualalloc`, `--fail-virtualprotect`, `--fail-veh`, `--env-slots`, and `--env-slots-invalid`. Both target source files are byte-identical to the previously tested patched worktree. No game files used. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [ ] A new translator rule is in the contract table of `docs/design.md` (n/a).
Okachamie commented 2026-11-25 02:27:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Okachamie on 2026-11-25T02:27:51Z.


I rebuilt xs_proxy_mock_test from the exact PR head d1a89d22b using clang-cl 23.1.5 and the Windows SDK. All six modes passed on CachyOS with Wine 11.22. In a scratch control, changing only the expected tile-row count from 17 to 18 caused the new slot 127 lease-size assertion to fail, confirming the two-lease case ran in this build. Synthetic COM objects only. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7150755981 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1394#issuecomment-7150755981). Originally posted by [Okachamie](https://github.com/Okachamie) on 2026-11-25T02:27:51Z. --- I rebuilt `xs_proxy_mock_test` from the exact PR head `d1a89d22b` using clang-cl 23.1.5 and the Windows SDK. All six modes passed on CachyOS with Wine 11.22. In a scratch control, changing only the expected tile-row count from 17 to 18 caused the new slot 127 lease-size assertion to fail, confirming the two-lease case ran in this build. Synthetic COM objects only. AI-assisted.
zmasi commented 2026-11-28 21:42:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T21:42:21Z.


#1394 | head d1a89d22b2 (merged cleanly with main aa918e5d9f) | ctest --test-dir runtime/build -C RelWithDebInfo -R "^xs_proxy_mock" --output-on-failure + tile-row perturbation Red control | red control: changing expected UHD RGBA8 tile rows from 17 to 18 (kTargetBytes = 30 * 18 * 65536) fails deterministically at g_heap_hook.last_alloc_size == kTargetBytes | green on PR+main: 9/9 native Windows 11 xs_proxy_mock* CTest modes pass (default, --fail-virtualalloc, --fail-virtualprotect, --fail-veh, --env-slots, --env-slots-invalid, --env-slots-70, --env-slots-74, --slot133-layout), confirming two 3840x2160 RGBA8 render targets lease 31.875 MiB each (256 KiB remaining in 64 MiB) and release cleanly; check_no_game_data.py 0 violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246211452 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1394#issuecomment-7246211452). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T21:42:21Z. --- #1394 | head d1a89d22b2db2dff93f3f0935cd9edbfda8e2962 (merged cleanly with main aa918e5d9f9e2f03e078d8f08854324890b5e176) | `ctest --test-dir runtime/build -C RelWithDebInfo -R "^xs_proxy_mock" --output-on-failure` + tile-row perturbation Red control | red control: changing expected UHD RGBA8 tile rows from `17` to `18` (`kTargetBytes = 30 * 18 * 65536`) fails deterministically at `g_heap_hook.last_alloc_size == kTargetBytes` | green on PR+main: `9/9` native Windows 11 `xs_proxy_mock*` CTest modes pass (default, `--fail-virtualalloc`, `--fail-virtualprotect`, `--fail-veh`, `--env-slots`, `--env-slots-invalid`, `--env-slots-70`, `--env-slots-74`, `--slot133-layout`), confirming two `3840x2160` RGBA8 render targets lease `31.875 MiB` each (`256 KiB` remaining in `64 MiB`) and release cleanly; `check_no_game_data.py` `0` violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes
OreoFR commented 2026-11-28 21:49:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:49:55Z.


Verified by OreoFR

  • Base: main c1ecf04ed + PR head d1a89d22b; green run in a merge package of 12 PRs, no new ctest failure vs main
  • Test: ctest -R ^xs_proxy_mock
  • Red on main: 9/9 OK
  • Green with the PR: 9/9 OK
  • Verdict: NO RED (test-only PR, covers behaviour already on main)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246305775 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1394#issuecomment-7246305775). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:49:55Z. --- **Verified by OreoFR** - Base: main `c1ecf04ed` + PR head `d1a89d22b`; green run in a merge package of 12 PRs, no new ctest failure vs main - Test: `ctest -R ^xs_proxy_mock` - Red on main: 9/9 OK - Green with the PR: 9/9 OK - Verdict: NO RED (test-only PR, covers behaviour already on main) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 16:35:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:35:31Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317859510 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1394#issuecomment-7317859510). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:35:31Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1394
No description provided.