test: increase pool sizes for 16KB pages on Apple Silicon #48
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/48"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by ShivamCodesBS on 2026-11-26T11:20:58Z.
Test pools were created with 4-8 pages assuming 4KB pages, but Apple Silicon uses 16KB pages on both arm64 and x86_64 (Rosetta). This caused tests to access memory past the pool boundary at offsets like 16KB, 32KB, etc.
Fix: increase pool pages from 4→8/16 and 2→8 across all native test files:
All tests now pass on x86_64-apple-darwin (Rosetta) with 16KB pages.
What this changes
How it was tested
cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victorycargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningsChecklist
VICTORY_*variable and documentedImported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T11:42:46Z.
Review: CHANGES_REQUESTED
Thanks for catching the descriptor-table arena. Could you narrow this to that fix?
page_size().max(16384).victory-metal/tests/resources.rs, please derive the page count from the two 16 KiB buffers and the reported page size, instead of a fixed 8 pages (that's 128 KiB on arm64).A short note on Rosetta's 4 KiB reported page size in
docs/native-host.mdwould help too.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T12:01:48Z.
Review: CHANGES_REQUESTED
Thanks for catching the arena bounds failure. Please keep this PR to
srv_and_uav_through_a_descriptor_table, size its arena from the two 16 KiB buffers and the reported page size (rather than a hard-coded eight pages), and add a sentence to the existing Rosetta alignment note indocs/native-host.md(~237). The GPU test helpers on main already clamp the allocation unit to 16 KiB, so the other pool increases aren't needed.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T12:10:08Z.
Review: CHANGES_REQUESTED
Thanks for deriving the descriptor-table arena size from the reported page size; that part is right. Please keep that fix and revert the other GPU and Metal arena changes still in the diff (
native/tests.rs,texture_tests.rs,title_tests.rs,victory-metal/tests/render.rs, andtexture_over_zero_copy_memoryinresources.rs). Move the docs into the existing Rosetta alignment note indocs/native-host.md(~239) as one sentence explaining that two reported 4 KiB pages cannot hold the two 16 KiB buffers. Note that the 16 KiB clamp lives in the GPU test helpers, notvictory-metal::mem(which returnssysconf(_SC_PAGESIZE)directly).Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T14:55:10Z.
Superseded by #77 (same fix, current with main). Closing; please carry the remaining asks there.
Pull request closed