test(agc): agc_driver_pipelined_dispatch_item fails in about 1 of 70 Windows runs when VirtualAlloc puts its two targets in different 4 GiB regions #9680

Closed
opened 2026-10-22 08:11:40 +00:00 by gdols · 0 comments
gdols commented 2026-10-22 08:11:40 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by gdols on 2026-10-22T08:11:40Z.


What happens

agc_driver_pipelined_dispatch_item sometimes stops before it submits anything: pipelined dispatch: the two targets do not share their high address dword.

Title, test or build step

agc_driver_pipelined_dispatch_item (agc_driver_pipelined_dispatch_tests.exe)

AnyPS5 commit

main d6eafa54d

System

Windows 11 Pro 26300, GeForce RTX 3080 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7, Release

Steps to reproduce

Run the test on its own many times, each run in its own ctest call (under a second each):

$env:ANYPS5_REQUIRE_VULKAN = "1"; $env:ANYPS5_NO_SHADER_CACHE = "1"
foreach ($i in 1..100) { ctest --test-dir build -R "^agc_driver_pipelined_dispatch_item$" --output-on-failure }

Log

pipelined dispatch: the two targets do not share their high address dword

What was checked

  • On main d6eafa54d it failed 2 of 100 runs, and 1 of 40 in another batch, always with this message. It also failed once in a parallel ^agc_ run with #8998 applied (1 of 20 in isolation there); that PR touches neither this test nor its allocations.
  • NewBlock reserves each 64 KiB block with its own VirtualAlloc. The table rounds alternate between TargetA and TargetB, and TableFills switches the table's buffer descriptor by rewriting only its low dword, so the test needs both targets in the same 4 GiB region and checks that at PipelinedDispatch.cpp:176.
  • With a local fprintf of the six block addresses (not committed), 3 of 279 runs failed. In each, TargetB lands in the next 4 GiB region after a gap, not next to TargetA:
    TargetA=000001bce8dd0000 TargetB=000001bd2b1e0000
    TargetA=000001f5e7280000 TargetB=000001f63d040000
    TargetA=0000024cea1f0000 TargetB=0000024d2c600000
    
    In the three passing runs I printed, the six blocks are consecutive, for example Input=000001d792500000 to TargetB=000001d792550000.
  • No other test has this check (git grep); it came with #1747.
  • One way out: take both targets from a single VirtualAlloc of three blocks and use two neighbours that don't cross a 4 GiB boundary.
  • Not tried: Linux, where NewBlock uses aligned_alloc.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5975591645 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9680). Originally posted by [gdols](https://github.com/gdols) on 2026-10-22T08:11:40Z. --- ### What happens `agc_driver_pipelined_dispatch_item` sometimes stops before it submits anything: `pipelined dispatch: the two targets do not share their high address dword`. ### Title, test or build step `agc_driver_pipelined_dispatch_item` (`agc_driver_pipelined_dispatch_tests.exe`) ### AnyPS5 commit `main` d6eafa54d ### System Windows 11 Pro 26300, GeForce RTX 3080 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7, Release ### Steps to reproduce Run the test on its own many times, each run in its own ctest call (under a second each): ```powershell $env:ANYPS5_REQUIRE_VULKAN = "1"; $env:ANYPS5_NO_SHADER_CACHE = "1" foreach ($i in 1..100) { ctest --test-dir build -R "^agc_driver_pipelined_dispatch_item$" --output-on-failure } ``` ### Log ```text pipelined dispatch: the two targets do not share their high address dword ``` ### What was checked - On `main` d6eafa54d it failed 2 of 100 runs, and 1 of 40 in another batch, always with this message. It also failed once in a parallel `^agc_` run with #8998 applied (1 of 20 in isolation there); that PR touches neither this test nor its allocations. - `NewBlock` reserves each 64 KiB block with its own `VirtualAlloc`. The table rounds alternate between `TargetA` and `TargetB`, and `TableFills` switches the table's buffer descriptor by rewriting only its low dword, so the test needs both targets in the same 4 GiB region and checks that at `PipelinedDispatch.cpp:176`. - With a local `fprintf` of the six block addresses (not committed), 3 of 279 runs failed. In each, `TargetB` lands in the next 4 GiB region after a gap, not next to `TargetA`: ```text TargetA=000001bce8dd0000 TargetB=000001bd2b1e0000 TargetA=000001f5e7280000 TargetB=000001f63d040000 TargetA=0000024cea1f0000 TargetB=0000024d2c600000 ``` In the three passing runs I printed, the six blocks are consecutive, for example `Input=000001d792500000` to `TargetB=000001d792550000`. - No other test has this check (`git grep`); it came with #1747. - One way out: take both targets from a single `VirtualAlloc` of three blocks and use two neighbours that don't cross a 4 GiB boundary. - Not tried: Linux, where `NewBlock` uses `aligned_alloc`. AI-assisted: yes
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#9680
No description provided.