gpu: check live aliases with colliding low 40 address bits #1298
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1305"
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 R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T07:23:31Z.
Refs #874. This extends the source-built GPU address regression for contributors working on guest address translation.
Two independently backed 256 KiB GPU buffers receive synthetic guest addresses differing only in bit 40. A dispatch writes 4,096 transformed words to the high range. A second launch deliberately clears bit 40 and writes the low range. Each launch checks both CPU-visible buffers and the guards. Removing the high range must preserve the low mapping.
Ran on Windows 11 build 26200.9974 at
6b8b7fa9with the debug layer enabled. RTX 4060 Laptop driver 32.0.16.1656 and WARP 10.0.26100.9818 both passed with zero debug errors and warnings. Two passed, zero failed, zero skipped.The guest addresses are synthetic. This test checks two separately backed D3D12 buffers and the address table, and makes no inference about address-space placement in other programs.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:27:13Z.
Review: COMMENTED
Dual-platform review at commit
6b8b7fa95e890c2690689158c1ebe84f1ad1480e:Verification
git diff --check origin/main...HEAD: clean (exit 0)/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: passed (16 Markdown files, 289 links)/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: passed (1086 tracked files)--preset dev):cmake --build --preset dev --target offscreen_check -- -j 6(4.78s)ctest --preset dev -R '^gpu_alias(_.*)?_warp$' --parallel 4 --no-tests=error --output-on-failure: 5/5 passed (0.16s:gpu_alias_warp,gpu_alias_window_warp,gpu_alias_lookup_warp,gpu_alias_lookup_writes_warp,gpu_alias_registry_warp)/O2(--preset release):cmake --build --preset release --target offscreen_check -- -j 6(2.25s)ctest --preset release -R '^gpu_alias(_.*)?_warp$' --parallel 4 --no-tests=error --output-on-failure: 5/5 passed (0.16s:gpu_alias_warp,gpu_alias_window_warp,gpu_alias_lookup_warp,gpu_alias_lookup_writes_warp,gpu_alias_registry_warp)Code Review Notes
tests/gpu_alias.cpp: Extractingdispatch(...)cleanly deduplicates the compute submission path, andif (dst_buffer != src_buffer)avoids redundant UAV/COMMON transitions when reading and writing the same alias.check_address_width: DeclaresTitleAllocation highbeforeera_gpu_alias::Alias high_alias, so RAII destruction releases the D3D12 resource/heap before releasing the underlying title allocation.0x20000000vs(1ull << 40) | 0x20000000), guard words (low_dst[-1],high_dst[-1], andcount..count+guard_words-1), untouched-buffer assertions, andtable.remove(high_address)isolation are all sound.docs/experiments.md: Accurately documents the new bit-40 collision check and ctest invocation.