Skip to content

[upstream #939] acphal: match the APU virtual address lookup ABI - #155

Closed
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/939
Closed

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/939

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Correct the ACP virtual-address lookup ABI. Ordinary callers pass one virtual address and consume the returned 32-bit APU token. The old implementation expected an output pointer, an address and a length.

What is in it

  • In crates/xcl/src/hle/acphal.rs, resolve allocation interiors and return zero for unregistered addresses. Keep the bounded span helper internal and retain full-width 0/1 validity with alignment checking.
  • Add a test that checks the published export pointer against the caller's ABI, round-trips an interior token, and verifies that lookup leaves caller bytes unchanged. The range, overflow and rollback tests from [upstream #1060] Tests: GPU UMA tests skip where D3D12 has no heaps over process memory #90 remain covered.

Tested

  • Windows 11 build 26300, GeForce RTX 4070 driver 621.35, Intel Core i7-13700K, rustc 1.94.1. Debug workspace tests and release smoke builds.
  • cargo build --offline --locked --workspace completed. cargo test --offline --locked --workspace -- --test-threads=4 --show-output reported 717 passed, 0 failed, 41 ignored. Two reported passes explicitly skipped for no wave64: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.
  • The focused ACP suite passed 8 tests. The typed caller fixture failed to compile against the old mapper signature.

Regression run
Both clean builds used the upstream smoke script for 60 seconds offline, with fresh profiles and separate cold DXIL caches at 1920×1080.

Main

xcl-smoke v1
commit: 077ce40c3e371cf3df8c57985b1cc6b1db39e75a
gpu: NVIDIA GeForce RTX 4070
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1027 (PresentX 1027)
presents per 2 s (last 3): 47 49 49
device removals: 0
crashes: 0
peak commit: 15334 MB

This PR

xcl-smoke v1
commit: 37e2dcad707cdecc6ebee67963cc8097de760566
gpu: NVIDIA GeForce RTX 4070
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 872 (PresentX 872)
presents per 2 s (last 3): 34 38 43
device removals: 0
crashes: 0
peak commit: 15333 MB

Not tested

  • AMD, Intel GPU or Wine. The 60-second smoke is a startup regression check. The synthetic export test exercises the mapper directly.

AI use

  • Codex (GPT-6) wrote the implementation and fixture and ran and reviewed the checks.

Mirror of xcl-dev#939 (auto-synced, do not edit).

Return the APU token for a registered virtual address without writing caller data. Test the published export pointer, interior addresses, and alignment while preserving existing range allocation and rollback checks.

Assisted-by: Codex (GPT-6)
@ufoptg

ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Upstream PR xcl-dev#939 was closed or merged.

@ufoptg ufoptg closed this Nov 25, 2026
@ufoptg
ufoptg deleted the upstream-pr/939 branch November 25, 2026 00:08
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