Compare real DXR hits at guest AS addresses with identical low 40 bits #1300
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1307"
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:26:23Z.
Refs #874.
This source-built check registers two synthetic guest address ranges separated by 1 TiB with the existing title-to-GPU range table. Each range points to a separate live desktop buffer containing a BLAS at offset 512. Each BLAS contains a triangle at a different position and distance. A TLAS also starts 512 bytes inside its buffer. Its instances are built with distinct masks and IDs and use the resolved interior addresses.
Both the normal and the deliberately truncated cases perform real BLAS/TLAS builds and DispatchRays. Masking both instance references to 40 bits selects a different valid BLAS for the second instance. On both adapters the four rays returned:
Every payload word is checked, including primitive index and the distance bits. This is a test of host range translation consumed by DXR. Encodings used by external builders remain an open question.
At
6e029d1a, Windows 11 build 26200.9974, MSVC x64 Release, debug layer enabled. RTX 4060 Laptop (32.0.16.1656) and Microsoft WARP (10.0.26100.9818) both passed. Eight checks passed with zero skips, zero D3D12 warnings and zero errors.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:40:28Z.
Review: COMMENTED
Reviewed at commit
6e029d1af78d4cd97afcd71b3a49421794167489.Code Review
tests/dxr_check.cpp:AddressSceneregisters two live AS buffers at0x2300000000and0x2300000000 + (1ull << 40)inera_title_va::Table, verifying both interior 512-byte AS offsets (2 * D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT) and full 64-bit guest-to-host range translation.SetComputeRootShaderResourceView(0, top.DestAccelerationStructureData)ensures the TLAS SRV respects the interior offset whenaddressSceneis active, and bothotherBlas/otherVerticesremain live until after readback.scene.truncate = true, masking to 40 bits beforeranges.translate) cleanly proves that collapsing the high bits misroutes instance 11 onto the first BLAS (hit11@1and a miss).Verification
6e029d1a):git diff --check origin/main...HEAD: pass/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: pass (16 Markdown files, 289 links)/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: pass (1086 files)--target offscreen_check):--preset dev):ctest --preset dev -R '^dxr_(address_ranges|pipeline|query)_warp$' --parallel 4 --no-tests=error --output-on-failure— 3/3 passed (dxr_address_ranges_warp,dxr_pipeline_warp,dxr_query_warp)/O2(--preset release):ctest --preset release -R '^dxr_(address_ranges|pipeline|query)_warp$' --parallel 4 --no-tests=error --output-on-failure— 3/3 passed (dxr_address_ranges_warp,dxr_pipeline_warp,dxr_query_warp)