Repository navigation
Conversation
Both paths ignored ADD_TID_ENABLE (V# word 3 bit 23): every lane of a buffer load without IDXEN read element 0. RDNA2 takes the lane as the index when IDXEN is clear and ignores ADD_TID with IDXEN (AnyPS5#21970, measured on gfx1036; #24781 applies it to graphics stages). Loads, stores and atomics, both paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested I ran the checked-in stride-4
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:TEMP = 'L:\XclTooling\pr2066\run-b81d47c-20261125T025448907Z\temp'
$env:TMP = $env:TEMP
& 'C:/Users/ljensen/.cargo/bin/cargo.exe' +stable-x86_64-pc-windows-msvc test --locked -p xcl --lib -j 2 --no-run --message-format=jsonThe following ran once with $env:XCL_ADAPTER = 'A770'
$env:XCL_DXC_DIR = 'C:/Users/ljensen/AppData/Local/XclTooling/dxc-1.9.2609/bin/x64'
$env:XCL_REQUIRE_GPU = 'wave64'
$child = @"
& 'L:/XclTooling/Invoke-ArcTest.ps1' -WaitMinutes 30 -Test { & 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target\debug\build\xcl/97fdf2b9ff8e1482\out\xcl-97fdf2b9ff8e1482.exe' gpu::recomp::tests::gpu_buffer_add_tid_indexes_by_lane --exact --nocapture --test-threads=1 }; exit `$LASTEXITCODE
"@
& 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe' -NoProfile -ExecutionPolicy RemoteSigned -Command $child
The fixture's exact vector assertion passed on both backends. For each lane from 0 through 63, the readback equaled Not tested Other descriptor or address combinations, writes, atomics, other GPU adapters, the full workspace suite, and retail-title smoke runs. AI use T3 Code / Codex ( |
|
A run with vkd3d-proton as the host D3D12. The DXIL goes through dxil-spirv and then the NVIDIA Vulkan driver, a different compiler from a native-Windows run: this PR's new test passes. Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
Code review on Only missing piece before merge is an AMD synthetic GPU test run ( |
|
AMD synthetic GPU run of Tested
Not tested
AI use |
…he swizzled offset gpu_buffer_swizzle_window_from_swizzled_offset: three swizzled loads with two memory windows - an offset carry from below window 0 into window 1, an index * stride product that carries into window 1, and a product past 2^32 that must read 0. Fails on main + xcl-dev#2066 on both paths, passes with the swizzle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both paths ignored
ADD_TID_ENABLE(V# word 3 bit 23). Every lane of a buffer access withoutIDXENused index 0, so a 64-lanebuffer_load_dwordthrough such a V# read element 0 in every lane. RDNA2 takes the lane as the index whenIDXENis clear, and ignoresADD_TIDwhenIDXENis set.Source for the rule: boykopovar/AnyPS5#21970 measured it on gfx1036 with their hardware oracle (compute), and boykopovar/AnyPS5#24781 applies the same rule to graphics stages.
What is in it
recomp/emit.rsanddxil/lower_mem.rs: whenIDXENis clear, the MUBUF index isselect(V# word 3 bit 23, lane, 0)instead of 0. This applies at all five sites: loads and stores, sub-dword D16, and atomics. The atomic sites now read V# word 3.recomp/tests.rs:gpu_buffer_add_tid_indexes_by_laneuses a stride-4 V# withADD_TID, and each lane should read its own dword. The test sits next to the other buffer tests rather than at the end of the file.Tested
b81d47c, as-is: Radeon RX 7800 XT (RDNA3, driver 32.0.31035.1003), Windows 11, debug, DXC 1.9.0.5512.gpu_buffer_add_tid_indexes_by_lanepasses;cargo test --workspace --no-fail-fast -- --test-threads=4: 1146 passed, 1 failed, 46 ignored. The failure,fuzz_validate_and_gpu_1(seed 722), fails the same way onmain1a0bbe3on that machine.main5ce558f:mainfails on both paths (every lane reads0xA000). This branch passes withXCL_DIRECT_DXIL=0and1.gpu_tests (--skip gpu_sparse_vram): 133 passed withXCL_DIRECT_DXIL=0; with1, 132 passed and 1 failed,gpu_image_get_resinfo_1d_array, which also fails onmain(Direct DXIL: image_get_resinfo of a 1D array gives the layers in y #2046 fixes it).dxil::andbuffer_formatunits: 138 passed.Regression run
Run by Toons29 on an AMD Radeon RX 9070 (comment),
mainand this head, pasted unedited:Not tested
stride * laneaddress after the new index (recomp/emit.rs:2089,:2099,:4117,:4124,:4174,:4184;dxil/lower_mem.rs:1179-1181,:1840-1842). fix(shader): address swizzled buffers like RDNA2 boykopovar/AnyPS5#21970 measured on gfx1036 (compute, through HIP; the PR is open) that the swizzle does apply with ADD_TID:step = 8 << INDEX_STRIDE,addr = ((idx/step)*stride + (off&~3))*step + (idx%step)*4 + (off&3). This doesn't make anything worse, becausemainhas no buffer swizzle on either path (withIDXENeither). The test here uses stride 4 with the bit clear, where both rules give4l, so it can't tell them apart. Swizzle is a separate change: Recompiler: swizzled buffer V#s address records in dword-interleaved groups #2325, stacked on this one.AI use
🤖 Generated with Claude Code