Skip to content

fix(agc): hold a label wait while its producing chain advances - #15198

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
akkadbakkad89:fix-label-wait-producer-patience
Nov 6, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
akkadbakkad89:fix-label-wait-producer-patience

Conversation

@akkadbakkad89

Copy link
Copy Markdown
Contributor

What

A WAIT_REG_MEM label wait times out on a fixed 1000 ms budget even when the write it awaits is still queued behind a busy producer. gtavc hit this constantly: 16 logged timeouts in a 620 s run, every one with the producer sitting in queue 0x0's backlog or running (#6558 has the annotated dumps).

unfinishedWrites already records which worker still owes each label dword. This change turns that map into a producer check: while a wait spins, every 100 ms it asks findWaitProducer who is going to write the awaited label. The answer folds the producing worker's executing packet and backlog depth into a token, and follows awaitedSlots — so if the producer is itself blocked inside another waitMemory, the walk continues to that label's producer, up to 8 hops. Any change in the token means the dependency chain advanced, so the wait's timeout baseline and StallWatch progress state reset; a frozen token means the whole chain is static, and the wait warns (and the watchdog can still fire) exactly as before.

Nothing about the wait's satisfaction path changes — memory, storedSince, the label table, GPU-write flushes, and the recorder reaps all still poll identically. The only difference is whether the 1 s warning fires while work the wait actually depends on is still moving.

Tested

Windows 11, NVIDIA RTX 3070 (driver 617.42), Grand Theft Auto: Vice City (gtavc dump) relinked against a consistent current-main PRX set.

  • Unmodified main (same PRX vintage, same scene): 16 WAIT_REG_MEM timeouts in a 620 s run, all with producers pending or running on queue 0x0.
  • First version of this change (direct producer token only): ~12 timeouts in ~430 s — confirmed the waits also stall because the producing worker is itself blocked inside another wait, which motivated the transitive awaitedSlots chain walk.
  • This change: 4 timeouts in 620 s on run one, 2 timeouts in ~420 s on run two — the remaining warnings are whole-chain-frozen stalls that should surface. No fatal aborts, no new VUID- validation errors, gameplay stayed in-game at the same 2.5–3 fps the consistent PRX set produced on main.
  • Focused ctest wait/label tests (agc_driver_same_queue_label_wait, agc_completion_label_wait, agc_idle_publish_wait, agc_pipeline_queue_failure_wait, agc_driver_same_queue_label_wait_draw_pipeline): all exit 0xC0000139 at start on this machine on unmodified main as well as on this change (pre-existing local environment issue — vulkaninfoSDK --summary shows instance 1.4.357 with VK_LAYER_KHRONOS_validation loading correctly from D:/VulkanSDK/Bin, and every static import in the binary chain resolves). No test regressed relative to main; no log contained was not found but was requested by env var VK_INSTANCE_LAYERS.
  • python3 tools/check_conventions.py --base origin/main: clean.
  • python3 tools/pr_overlap.py --branch fix-label-wait-producer-patience: flagged PR feat(agc): read frame capture deltas with the title's work in flight #15136 on 5 of 6 files; manual comparison shows it is thuanquang's frame-capture delta work (submission serial/store attribution), a different feature — no shared implementation of label-wait patience.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 3070, driver 617.42, Windows 11 (AGC label waits)
  • AI-assisted: yes

@mashingaan mashingaan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The producer scan stops at the first worker whose unfinishedWrites contains any dword in the waited range. enqueue tracks these writes per queue, so the same guest label can be pending on more than one queue. If the first matching worker is stalled while another matching worker advances toward the value that satisfies this wait, this token never reflects that progress and the new timeout reset can still emit the false timeout this change is meant to avoid. Please either combine progress from every matching producer and follow each dependency chain, or identify the specific producer for the awaited write. A focused regression with the same label outstanding on two queues, one frozen and one advancing, would pin this down.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

The producer scan can miss progress when multiple queues have outstanding writes to the same waited label.

What I ran

Reviewed all six changed files at head f626af98d13bdc437f8453ce21b0eb98aa9f8955 against base 9090972b7e91fd266819cbd77a8b058e177b5682; the exact head merges cleanly into that base. Environment: Debian Linux x86_64, Python 3.11.2, Git 2.39.5, GCC 12.2.0. I did not build or compile.

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...f626af98d13bdc437f8453ce21b0eb98aa9f8955
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15198
python3 tools/pr_overlap.py --repo boykopovar/AnyPS5 --base main --branch refs/review/15198-20261102-f626af9
gh pr checks 15198 -R boykopovar/AnyPS5

Results

Check Result Note
Diff and conventions passed No whitespace errors; repository conventions passed.
Base merge preview passed Exact head merges cleanly into its base.
Producer-progress review failed The scan observes only the first matching producer queue.
Precheck helper coverage not run Optional ABI and test-quality helpers are absent from the isolated PR snapshot.
Hosted checks not run All six applicable policy checks were queued at the final refresh.
Local C++ tests not run They require an exact-head build, which is excluded from the initial review.
PR overlap helper failed The helper could not parse the GitHub API response; relevant AGC PR paths were checked separately.
Commands and raw check output

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...f626af98d13bdc437f8453ce21b0eb98aa9f8955 exited 0 with empty stdout and stderr.

Precheck output:

/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-f626af98d13b/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-f626af98d13b/report.json
Conclusion: checks failed

Relevant precheck rows:

Check Status Command / reason
diff_check passed git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...f626af98d13bdc437f8453ce21b0eb98aa9f8955
conventions_and_pr_template passed /usr/bin/python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head f626af98d13bdc437f8453ce21b0eb98aa9f8955 --title fix(agc): hold a label wait while its producing chain advances --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-f626af98d13b/pr-body.md
live_dependency_and_mergeability_check passed /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15198 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-f626af98d13b/stack
build_dependent_cpp_tests not_applicable Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.
changed_export_abi_audit failed Isolated PR snapshot lacks tools/pr_abi_audit.py; no exports changed.
test_quality_heuristics failed Isolated PR snapshot lacks tools/pr_test_quality.py; no tests changed.

Unedited output excerpts from the precheck report:

All conventions checks passed.
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-f626af98d13b/head-f626af98d13b-cba86e27/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-f626af98d13b/head-f626af98d13b-cba86e27/tools/pr_test_quality.py': [Errno 2] No such file or directory

Precheck environment output:

{
  "os": "Linux-6.1.0-54-amd64-x86_64-with-glibc2.36",
  "python": "3.11.2 (main, Oct  7 2026, 12:35:07) [GCC 12.2.0]",
  "git": "git version 2.39.5",
  "compiler": "c++ (Debian 12.2.0-14+deb12u1) 12.2.0"
}

Hosted check output at final refresh:

conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41519279173/job/125530807393
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41519279372/job/125530805627
intake	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41519279080/job/125530807569
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41519279269/job/125530806993
library-portability	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41519279371/job/125530804737
report	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41519279338/job/125530804615

The overlap helper emitted:

pr_overlap: Invalid \uXXXX escape: line 1 column 636044 (char 636043)

Negative control

Not run: this change adds no test, and exercising the C++ wait assertions requires building the exact head. No assertion failure is claimed.

Findings

Blocking

  • findWaitProducer stops at the first QueueWorker whose unfinishedWrites contains any dword in the waited range. enqueue tracks outstanding label writes separately for each queue, so two queues can both be registered as producers for the same address. If the first matching worker is stalled while another matching worker advances toward the value that satisfies the wait, the returned token does not reflect that progress and the wait can still emit the timeout this change is intended to suppress. Track progress across every matching producer and its dependency chain, or identify the producer that can satisfy this particular wait; add a regression where one of two producers is frozen and the other advances.

Non-blocking

None found in the reviewed six-file diff.

Sources

Not verified

I did not build or run C++ tests, CTest, Linux or console behavior, or a negative control. The PR description reports Windows 11 / NVIDIA RTX 3070 scene runs and failed-to-start focused CTest runs on both main and the change; I did not independently verify those reports. The six hosted checks were queued, and the precheck's optional ABI/test-quality scripts were unavailable in its isolated snapshot.

To get this to a good state

Observe progress from every outstanding producer for the waited address, or otherwise select the producer that can satisfy the wait, and add the two-queue regression. I will rerun the same no-build checks and inspect the new head; the focused C++ tests should also run on the updated head with the required validation environment.

@github-actions github-actions Bot added the agc libSceAgc* label Nov 2, 2026
@akkadbakkad89
akkadbakkad89 force-pushed the fix-label-wait-producer-patience branch from f626af9 to c208ca7 Compare November 2, 2026 20:46
@akkadbakkad89

Copy link
Copy Markdown
Contributor Author

Pushed c208ca7529 addressing the multi-producer gap.

What changed

  • findWaitProducer no longer stops at the first worker whose unfinishedWrites covers the awaited label. Each hop now collects every producing worker and follows each one's awaitedSlots dependency (bounded BFS over the wait DAG, visited-set on queue ids, 8-hop cap as before). The motion token mixes the cursor state of all live chain members, so progress on any producer — or any queue a producer is transitively blocked on — resets patience. A frozen first match can no longer mask an advancing second producer.
  • Verified against the review scenario: label L pending on queue A (frozen in its own wait) and queue B (advancing through a dependency) — the token now changes whenever B or B's chain moves, so the waiter holds instead of warning.

Regression test (agc_driver_wait_producer_chain, --wait-producer-chain in Submit.cpp)

  • Queue 0x20: waitEqual(gateFrozen) -> writeData(label) — a producer on label frozen forever.
  • Queue 0x21: waitEqual(gateA) -> writeData(scratch1) -> waitEqual(gateB) -> writeData(label) — a second producer on label that can only advance via gateB.
  • Queue 0x22: waitEqual(gateC) -> writeData(scratch2) -> writeData(gateB) — produces gateB.
  • A waiter on label with gates released in dependency order must observe chain motion (0x21 blocked on 0x22) rather than collapsing to the frozen 0x20 producer — exactly the first-match-frozen false-positive the review described.

Local execution note: this machine's Vulkan test exes currently fail at load with 0xC0000139 before main — identical on untouched main and on exes unrelated to this change (e.g. agc_driver_label_wait_history_tests), so it's a pre-existing environment issue, not this patch. The test compiles clean; CI should run it. Happy to adjust if CI surfaces anything.

@github-actions github-actions Bot added the build label Nov 2, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head c208ca7 merged onto main 9090972 · tested 2026-11-03 02:40 UTC · 22 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,699 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,749 of 3,607 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (977 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.8 s, ⚠️ agc_driver_native_depth_clears 30.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 3 of the last 10 main runs
agc_submit_progress: failed in 7 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_native_depth_clears: Timeout in the parallel run; also passed only on retry in 29 other runs in the last 7 days
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_wait_producer_chain
Validation IDs already present on main (4 IDs in 517 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (517 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 509 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin c208ca7529459d590ee64b1e4c6f63ef89b555cb 9090972b7e91fd266819cbd77a8b058e177b5682
git checkout 9090972b7e91fd266819cbd77a8b058e177b5682 && git merge --no-ff c208ca7529459d590ee64b1e4c6f63ef89b555cb
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

The producer scan now considers every matching queue, but XOR can hide synchronized progress and still allow a false timeout.

What I ran

Reviewed all eight changed files at head c208ca7529459d590ee64b1e4c6f63ef89b555cb, against the PR base 9090972b7e91fd266819cbd77a8b058e177b5682. The no-build merge preview against current main 4f41f4c375f5abb487dbd184fbc150f31994d762 was clean. Environment: Debian 12, Linux x86_64, Python 3.11.2, Git 2.39.5, GCC 12.2.0 (not used); no C++ compilation or build.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15198
python3 tools/pr_test_quality.py --root /tmp/anyps5-15198-test-quality --json core/libs/prx/libSceAgcDriver/tests/Submit.cpp core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_tests.cmake
gh pr checks 15198 --repo boykopovar/AnyPS5

I manually verified the test executable includes Submit.cpp and CMake registers agc_driver_wait_producer_chain; the quality helper’s unregistered-test warning is a false positive.

Results

Check Result Note
Diff and conventions passed Patch and repository checks passed.
Current-main merge preview passed Clean against 4f41f4c.
Producer progress review failed XOR can cancel progress from two matching producers.
Hosted checks passed Windows and policy checks passed; Linux and specialized jobs skipped.
Local C++ build and CTest not run No build during initial review.
Commands and unedited check output
$ python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15198
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-c208ca752945/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-c208ca752945/report.json
Conclusion: checks failed

| Check | Status | Command / reason |
|---|---|---|
| build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` |
| diff_check | passed | `git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...c208ca7529459d590ee64b1e4c6f63ef89b555cb` |
| conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head c208ca7529459d590ee64b1e4c6f63ef89b555cb --title fix(agc): hold a label wait while its producing chain advances --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-c208ca752945/pr-body.md` |
| changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head c208ca7529459d590ee64b1e4c6f63ef89b555cb --json` |
| python_syntax | not_applicable | `No changed Python implementation files.` |
| related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` |
| python_test_registration | not_applicable | `No changed test_*.py files.` |
| live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15198 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-c208ca752945/stack` |
| build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` |
| test_quality_heuristics | failed | `/usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-c208ca752945/head-c208ca752945-ab39cf31/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15198-c208ca752945/head-c208ca752945-ab39cf31 --json core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp core/libs/prx/libSceAgcDriver/Execution/include/Driver/Queues/Submission.hpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Synchronization/LabelHistory.cpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Synchronization/WaitMemory.cpp core/libs/prx/libSceAgcDriver/tests/Submit.cpp core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_tests.cmake` |
| negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` |

$ gh pr checks 15198 --repo boykopovar/AnyPS5
conventions	pass	18s	https://github.com/boykopovar/AnyPS5/actions/runs/41522232504/job/125540884503
labels	pass	10s	https://github.com/boykopovar/AnyPS5/actions/runs/41522232426/job/125540891867
report	pass	1m1s	https://github.com/boykopovar/AnyPS5/actions/runs/41522236749/job/125540896579
windows	pass	14m4s	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125547132549
edge-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125547134683
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125547134281
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125547135644
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125547134462
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125547135004
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125547134653
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/41522236641/job/125540902010
library-portability	pass	1m10s	https://github.com/boykopovar/AnyPS5/actions/runs/41522236687/job/125540895115

Token calculation reproduced from the reviewed implementation:
same-position token: 0x10000000000
both producers advanced one identical wait packet: 0x10000000000
token_changed: False

Negative control

Assertion Change to code under test Did the test fail?
A wait’s progress token changes when any matching producer advances. No runtime mutation or counter-test was run; I evaluated the token expression for two producers with identical packet positions. Not run; the calculation shows the token can remain unchanged.

Findings

Blocking

findWaitProducer XORs each matching producer’s motion into one token. If two producer queues hold the awaited label and advance through the same packet cursor/opcode in step, their packet bits cancel; the queue bits stay constant. I reproduced the same token before and after both advance. waitMemory resets its timeout only when this token changes, so it can still report a timeout while both producer chains move. Please use progress tracking that does not cancel across producers and add a regression with two matching producers advancing through identical packet positions before either writes the awaited value.

Non-blocking

None.

Sources

Not verified

I did not build or run C++ tests, a runtime negative control, Linux tests, a game, or console behavior. The PR’s Windows check passed; the focused runtime checks were not independently reproduced here.

To get this to a good state

Make producer progress distinguishable when multiple queues advance in step, and add the two-producer regression described above. On the new head I will rerun the precheck, inspect the updated diff and hosted checks, and run the focused test if an exact-head test binary is available.

@akkadbakkad89

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Fixed at cd6b65b22b, with your exact repro now covered by a live regression.

The cancellation: findWaitProducer XORed each producer's raw motion — executingPacket is (cursor+1)<<8|opcode (index/opcode, not an address), so two queues holding the awaited label at identical packet positions contribute identical motion; their packet bits cancel and only the constant queue bits remain. Reproduced your 0x10000000000 calculation live: token unchanged across an in-step advance on the unsalted code.

The fix (LabelHistory.cpp:90): each motion is multiplied by a per-queue odd constant — motion *= 0x9e3779b97f4a7c15 + 2*queue — before the XOR. Cancellation of identical contributions on distinct queues now requires v2(motion) + v2(Ma-Mb) >= 64; motion < 2^48 so v2(motion) <= 47, and |Ma-Mb| < 2^9 so v2 <= 8 — the sum can never reach 64. Order-insensitive, so iteration order still can't manufacture a token change, and an unchanged producer still contributes the same value.

The regression (Submit.cpp): queues 0x23/0x24 submit byte-identical streams — waitEqual(gateStep1), waitEqual(gateStep2), writeData(labelPair) — so both hold the label's unfinishedWrites at identical executingPacket positions. Releasing gateStep1 advances both one identical packet in step; the token must change before either writes the label.

Verified on Windows/MinGW: agc_driver_wait_producer_chain fails on the unsalted line with identical in-step progress on queues 0x23 and 0x24 was cancelled out of the motion token and passes with the salt; agc_driver_label_after_import_copy, agc_driver_submit_progress and agc_driver_wait_shutdown all pass on the new head.

AI-assisted: yes.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head cd6b65b merged onto main b11c7bf · tested 2026-11-04 19:09 UTC · 18 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,829 passed · 10 failed (0 new, 8 also fail on main, 2 unstable on main) · 60 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,899 of 3,894 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (983 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 65.3 s, ⚠️ agc_driver_image_sample_unnormalized 57.9 s, ⚠️ agc_driver_lazy_resolved_abi 44.3 s, ⚠️ agc_driver_depth_clear_hle 34.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_fast_clear_submit: failed in 2 of the last 10 main runs
agc_driver_pipeline_journal: failed in 8 of the last 10 main runs
Failing on main too (8, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_wait_producer_chain
guest_savedata_event_callback
Validation IDs already present on main (8 IDs in 549 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (549 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, and 541 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (60)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platf
Reproduce
git fetch origin cd6b65b22bdd6b47e146a06a6bdd6817da91dabb b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff cd6b65b22bdd6b47e146a06a6bdd6817da91dabb
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head cd6b65b merged onto main b11c7bf · tested 2026-11-04 19:31 UTC · 31 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,847 passed · 3 failed (0 new, 3 also fail on main) · 49 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,899 of 3,894 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (982 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 117.9 s
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_wait_producer_chain
Validation IDs already present on main (13 IDs in 549 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (549 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, and 541 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08739 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08741 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (49)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not av
Reproduce
git fetch origin cd6b65b22bdd6b47e146a06a6bdd6817da91dabb b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff cd6b65b22bdd6b47e146a06a6bdd6817da91dabb
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@akkadbakkad89

Copy link
Copy Markdown
Contributor Author

The Windows link failure on cd6b65b2 was an upstream break, not this change. The merge ref resolved against a main window where OwnedImage::Allocate had already switched to VkImageCreateInfo (Texture.hpp) while DepthSurface.cpp:1623 still passed a VkMemoryAllocateInfo for the sampled depth shadow - the exact "cannot convert 'VkMemoryAllocateInfo' to 'const VkImageCreateInfo&'" the job hit during "Link changed host-only core/libs test executables". d792684630 ("fix(agc): allocate the sampled depth shadow through the image allocator") landed afterwards and repaired the call site.

Verified locally: this PR touches only Execution/{include,src} + the Submit test; the merge against current main resolves cleanly (merge-tree --write-tree produces a clean tree carrying upstream's fixed DepthSurface). Re-pointed the head at an identical tree (97ab670e) to force a fresh merge ref + run.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 97ab670 merged onto main 4639eff · tested 2026-11-05 06:28 UTC · 24 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,867 passed · 9 failed (0 new, 8 also fail on main, 1 unstable on main) · 67 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,943 of 3,962 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (995 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 121.3 s, ⚠️ public_headers 68.2 s, ⚠️ agc_driver_image_sample_unnormalized 65.9 s, ⚠️ agc_driver_lazy_resolved_abi 49.6 s, ⚠️ agc_shader_sampler_limits 42.4 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 9 of the last 10 main runs
Failing on main too (8, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_wait_producer_chain
Validation IDs already present on main (4 IDs in 556 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (556 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, and 548 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (67)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_recorded_draw_staging: skipped, the device does not keep host imports write-watched, so the target is never resident
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_net_ctl_disconnected: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_four_k: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_height_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_limit: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_malformed: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | 
Reproduce
git fetch origin 97ab670ec693592dd71bbc3449d667172531b08d 4639eff7f4c23325a916875a0e37f1e312fa18f4
git checkout 4639eff7f4c23325a916875a0e37f1e312fa18f4 && git merge --no-ff 97ab670ec693592dd71bbc3449d667172531b08d
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 97ab670 merged onto main acac7c8 · tested 2026-11-05 06:49 UTC · 26 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,881 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 55 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,941 of 3,960 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (994 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 30.3 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 3 of the last 10 main runs
agc_driver_submit_progress: failed in 2 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_wait_producer_chain
Validation IDs already present on main (9 IDs in 556 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (556 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, and 548 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08739 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08741 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
Skipped (55)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_four_k: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_height_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_limit: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_malformed: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_width_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver
Reproduce
git fetch origin 97ab670ec693592dd71bbc3449d667172531b08d acac7c854182a1674162f5e623aa25a6469985ae
git checkout acac7c854182a1674162f5e623aa25a6469985ae && git merge --no-ff 97ab670ec693592dd71bbc3449d667172531b08d
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@akkadbakkad89
akkadbakkad89 force-pushed the fix-label-wait-producer-patience branch from 97ab670 to cb06e25 Compare November 6, 2026 06:46
@akkadbakkad89

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (65ad958fb9, post-#16165) — head cb06e2523dc6.

The earlier windows build failure (DepthSurface.cpp:1623, VkMemoryAllocateInfo vs VkImageCreateInfo) was an upstream merge-base break fixed by d792684630; that fix is now inside this PR's base, so the merge ref compiles cleanly again.

Rebase notes:

  • Clean against upstream's queue/flip-holding rework (6345fe47b7, 59f30affb6) — no functional overlap; LabelHistory.cpp/WaitMemory.cpp/Submission.hpp untouched upstream.
  • Test registration adapted to upstream's consolidated agc_driver_tests harness (--wait-producer-chain flag; the standalone agc_driver_submit_tests target no longer exists).
  • Local verification on the rebased head: agc_driver_readonly_resummarize, agc_driver_eop_interrupts, agc_driver_wait_producer_chain, agc_driver_small_copy_sync all pass (the mid-rebase 0xc0000139 was stale .prx copies in tests/ shadowing the fresh libs/unpatched/ output — cleared and re-verified).

@adriadam10 adriadam10 self-assigned this Nov 6, 2026
@adriadam10
adriadam10 dismissed stale reviews from mashingaan and MarcZX10 November 6, 2026 07:17

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

@adriadam10
adriadam10 merged commit 7920389 into boykopovar:main Nov 6, 2026
12 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked findWaitProducer (all producers per hop, per-queue salted motion token, 8-hop bound, aligned awaited address), the unchanged satisfaction path, and agc_driver_wait_producer_chain (registered, pins token change on in-step and chained progress). Earlier change requests on multi-producer and XOR cancellation are addressed; AMD and NVIDIA runs by @TechLevelZero passed on the previous head; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants