test(agc): keep pipelined dispatch targets in one address window #9696
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9696"
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 boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T08:54:19Z.
What
Fixes #9680 by reserving a contiguous three-block target region for the pipelined dispatch test and selecting two adjacent blocks whose upper 32 address bits match. This removes the Windows allocation-order dependency that made the test intermittently fail when separate
VirtualAlloccalls straddled a 4 GiB boundary. Adds focused boundary-selection coverage.Tested
agc_driver_target_address_window_testsandagc_driver_pipelined_dispatch_tests: passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-22T09:04:18Z.
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T09:53:43Z.
Review: COMMENTED
Ran this on an RTX 3070 and lavapipe, including a forced red→green: on Linux the split from #9680 doesn't happen on its own, so I placed the blocks across a 4 GiB boundary.
Ubuntu 26.04, i7-8700, GCC 15.2, Release, head
351ec4edf(basemain7e2ba73e4),ANYPS5_REQUIRE_VULKAN=1. GPUs: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), picked withANYPS5_GPUand checked in theSelected GPUline.aligned_alloctakes the blocks one after the other from the main heap here, somainpassed 100 of 100 separate runs on each device, idle and with 10 busy loops on the CPU. To force the split, anLD_PRELOADshim (not in the repo) maps the test's 64 KiBaligned_allocblocks withmmap(MAP_FIXED_NOREPLACE)next to0x500000000000:main, fifth block at0x4fffffff0000, sixth at0x500000000000the two targets do not share their high address dword0x4fffffff0000(boundary at block 1, pair {1, 2})0x4ffffffe0000(boundary at block 2, pair {0, 1})agc_driver_pipelined*+agc_driver_target_address_window(9 tests), 3 timesThe forced runs pass all four descriptor rounds. The check is needed, not just defensive: on
mainwith the check removed and the targets forced apart, the test fails atdescriptor round 1: lane 0 of the output is 1, expected 1802174467, because the table keepsTargetA's high dword and getsTargetB's low dword.GPUs tested: NVIDIA GeForce RTX 3070, driver 595.99.02, Ubuntu 26.04; lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T14:14:04Z.
Tested head 351ec4edf4 with fresh builds.
Linux (GCC, Release):
agc_driver_pipelined_dispatch_itempassed 10/10 andagc_driver_target_address_windowpassed.Windows (MinGW GCC 16.2 in the DWARF mode from docs/dev/BUILD.md, run under Wine):
agc_driver_pipelined_dispatchandagc_driver_pipelined_dispatch_itempassed 5/5.agc_driver_target_address_window_testsdoes not link:With
-fno-asynchronous-unwind-tables, the toolchain's libstdc++ has only__gxx_personality_seh0, and__gxx_personality_v0comes fromlibc(exception/Personality.cpp). This target links nothing. Once I linkedliblibc.dll.aby hand, it built, but the expectedstd::runtime_errorescaped thecatchand aborted the test, because the.eh_framerename fromconfigure_windows_unwindwas missing. After applying that rename, it printedtarget address window test passed. The Windows job on this PR was skipped, so CI has not exercised it yet.Changes that made it pass here, matching
agc_driver_mesh_testsand theagc_spirv_*tests:Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T14:51:55Z.
Follow-up: I reproduced the link failure with the exact toolchain the Windows job uses (WinLibs
winlibs-x86_64-posix-seh-gcc-15.2.0-mingw-w64ucrt-14.0.0-r7, DWARF mode). I compiledTargetAddressWindow.cppwith the build's flags (-O3 -std=gnu++20 -fno-asynchronous-unwind-tables) and linked it withoutlibc, which gives the sameundefined reference to '__gxx_personality_v0'. The three CMake lines above are still needed.