Skip to content

fix(agc): hold a pending producer batch with a timeline semaphore - #7913

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
mazen320:fix/pending-producer-event-sync
Oct 20, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
mazen320:fix/pending-producer-event-sync

Conversation

@mazen320

Copy link
Copy Markdown
Contributor

What

The pending-producer fixture kept its earlier label batch from completing by waiting on a host event and calling vkSetEvent only after the leased producer was submitted. Vulkan rejects that: a HOST wait has to be signaled before the command buffer is submitted (VUID-vkCmdWaitEvents-srcStageMask-01158), and vkSetEvent is illegal while that wait is still pending (VUID-vkSetEvent-event-09543). The fixture now submits the label batch with a wait on a timeline semaphore and signals that semaphore from the host after the producer submission. The label stays pending, the producer stays unsubmitted until the indirect dispatch, and that dispatch still takes the pending-label CPU fallback (cpuReason 2). The five-second watchdog still releases the wait and the fixture still fails if the producer was never submitted.

Tested

Windows 11, NVIDIA GeForce RTX 5090, driver 617.42. agc_driver_indirect_arguments_pending_producer_tests with ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation (Khronos 1.4.304): 3/3 fresh runs passed, each reporting pending producer CPU fallback: cpuReason 2. VUID-vkCmdWaitEvents-srcStageMask-01158 and VUID-vkSetEvent-event-09543 did not appear. The same layer reports VUID-VkDeviceCreateInfo-pNext-pNext at device creation because it does not know a structure in this tree's Vulkan headers; that report is unchanged by this fix.

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: AGC: pending-producer fixture passes with invalid host-event synchronization #7868
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5090, driver 617.42, Windows 11
  • AI-assisted: yes

A host event cannot stay unsignaled across vkQueueSubmit, and vkSetEvent is illegal while that wait is still pending. The fixture now waits on a timeline semaphore and signals it only after the leased producer is submitted, so the earlier label stays pending and the indirect dispatch still takes the CPU fallback.
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6658 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L806
PR 7464 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L806

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5431 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6185 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6682 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp

@github-actions github-actions Bot added fix error Closes an issue (Fixes #N) agc libSceAgc* labels Oct 19, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor

I reviewed this against #7868. The label submission waits on the timeline semaphore, and the host signals it only after the producer submission is observed, so the pending-label fallback remains the condition under test while avoiding the invalid event wait/signal sequence. The reported three RTX 5090 runs retain cpuReason 2 and contain neither of the two fixture VUIDs. I found no issue in this focused change. I did not independently run Vulkan hardware validation on this host.

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

Labels

agc libSceAgc* fix error Closes an issue (Fixes #N)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AGC: pending-producer fixture passes with invalid host-event synchronization

3 participants