Skip to content

[upstream #1058] d3d12x: accelerate sparse UMA window chunk scanning - #92

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

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

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

This pull request accelerates the sparse UMA window chunk scanner:

In crates/xcl/src/hle/d3d12x/sparse.rs, scan_page and read_chunk_words scanned 64-byte chunks with scalar 64-bit integer arithmetic and unaligned reads. We optimize read_chunk_words with an aligned pointer cast for page-aligned allocations, enabling 256-bit vector loads. In scan_page, we add an 8-word zero reduction test so unchanged zero chunks across mapped sparse windows bypass the 5-multiplication hash computation entirely, eliminating CPU sync latency during command list execution.

Originally part of xcl-dev#985, split into its own single-purpose PR per CONTRIBUTING.md.

Tested

  • Hardware: Intel Arc A770 (16GB, Driver 32.0.101.9175), AMD Ryzen 7 5700X, 32 GB RAM, Windows 11 Pro, MSVC 14.44.35207
  • Full workspace test suite: cargo test --workspace (672 passed, 0 failed, 21 ignored in lib; 13/13 console_dlls_e2e passed; 3/3 console_shaders passed; 1/1 disasm_e2e passed; 3/3 e2e passed; 1/1 sparse_reinit passed; 1/1 texture_states passed; 6/6 xg_oracle passed)
  • hle::d3d12x::sparse::tests: 13 passed, 0 failed, 1 ignored, verifying scan_page_lazy_alloc_and_coalesce and dirty chunk detection.

Regression run
main (e74dda2):

xcl-smoke v1
commit: e74dda2d4b5c28a81cfa971d14bc417a6be966aa
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1660 (PresentX 1660)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14862 MB

PR (dbcaee7):

xcl-smoke v1
commit: dbcaee766a1d9e0d9c1f9894c63eaf29dc843046
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1665 (PresentX 1665)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14860 MB

Not tested

  • RDNA3 / older RDNA1 GPUs, Linux/Wine

AI use

  • Claude Code and Antigravity assisted in profiling sparse chunk scan overhead and validating 8-word reduction behavior.

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

@ufoptg

ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

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

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