fix(agc): avoid host synchronous drain on GDS DMA_DATA packets #13137
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13137"
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 ashwin280802 on 2026-10-30T04:04:22Z.
What
In
Driver::preparePacketMemory(), packets with PM4 opcode0x50(DMA_DATA) transferring data to GDS (Pm4::DmaDestination(packet) == Pm4::DmaSelectGds) unconditionally forced a device-wide store drain (drained = true), causing host pipeline serialization and cross-queue lock contention between queue workers.GDS (Global Data Share) is on-chip RDNA2 SRAM private to shader workgroups; transfers to GDS do not write to host-visible memory and must not trigger host-side store drains unless explicit synchronization bits request it.
This change avoids setting
drained = truefor GDS DMA transfers without sync bits, markingorderedAlready = trueanddrained = false.Covered by unit test
testDmaDataToGdsDoesNotDrain()incore/libs/prx/libSceAgcDriver/tests/Submit.cpp.Tested
Ran
agc_driver_testson Windows 11 (NVIDIA GeForce RTX 5070 vendor=0x10de device=0x2f04 subgroup=32, driver NVIDIA 617.42) with:ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationtestDmaDataToGdsDoesNotDrain: verifies that enqueuing aDMA_DATApacket to GDS does not incrementstoresDrainedand that subsequent labels land correctly: PassedSubmit.cppcases (testHeaderWithoutProgramAddress,testCopyIntoHostMemory,testLargeDataFill,testSmallCopyBehindPendingSource, etc.): Passedctest -R "agc_driver_(readonly_resummarize|eop_interrupts|small_copy_sync)" -V):agc_driver_readonly_resummarize: Passed (0.05s)agc_driver_eop_interrupts: Passed (0.07s)agc_driver_small_copy_sync: Passed (0.51s)VK_LAYER_KHRONOS_validationloaded cleanly: YesVUID-validation errors introduced: 0python tools/check_conventions.py --base origin/main: All conventions checks passed (0 errors).python tools/pr_overlap.py --branch fix/agc-gds-dma-drain: Checked across 1,457 open PRs. Independent of PR #7963 (which handles opcode 0x40 clock copies).PPSA01503): verified zero regressions in packet submission, DMA data routing, and presentation loops.PPSA26344): GDS DMA transfers in compute setup loops no longer force device drains on Queue 0x0 / Queue 0x48.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 repository (attach them to this PR)Pull request closed