fix(agc): order queued labels behind every earlier write at submit #11886
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11886"
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 Sumaiter on 2026-10-27T11:35:52Z.
What
Use
VK_ACCESS_MEMORY_WRITE_BITas the source access for the barrier ahead of GPU label stores queued untilSubmit. This orders the label behind every earlier write in the batch, including writes not covered by the previous shader, transfer and color-attachment mask. On Intel Arc under Windows, the narrower mask allowed a polling CPU to observe the label before earlier copied bytes reached the host import.Add
agc_driver_label_after_import_copy, which checks 32 rounds of a 256 KiB GPU copy between host imports, each followed by a GPU label and a destination read when the CPU observes that label. Record the remaining limitation for label runs forced in place.Carried from @BKlaasWerkman's
fix/label-run-memory-writebranch, rebased onto currentmain, with the original authorship preserved. The Intel investigation and standalone Vulkan reproduction are in #10199.Tested
Windows 11 10.0.26200, WinLibs GCC 15.2.0, Release, NVIDIA GeForce RTX 4060 Laptop GPU, NVIDIA 621.01. Every GPU run used
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationwith Khronos validation 1.4.363. Loader output confirms that the layer was inserted.agc_driver_alias_copy_labelagc_driver_label_after_import_copymain3fea2a937ba955722a42e2ecThe focused expression was
label|store_run|alias_copy|copied_writer|completion|write_back|barrier|^agc_recorder|agc_driver_graphics. Neither themainnor the PR logs containVUID-orwas not found but was requested by env var VK_INSTANCE_LAYERS. The full build completed on both trees.python tools/check_conventions.py --base origin/mainandtools/pr_overlap.py --branch fix/issue-10199-label-memory-writewere run; open PRs touchingRecorder.cppwere also checked manually for thiscloseStoreRunpath.The original Intel Arc Graphics (Meteor Lake, driver 101.9150) testing is documented in #10199: the change removed the alias-copy failures in 40 runs and the new regression test passed 10 runs.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T11:43:23Z.
Review: APPROVED
I reviewed the submit-time barrier scope and the regression.
VK_PIPELINE_STAGE_ALL_COMMANDS_BITwithVK_ACCESS_MEMORY_WRITE_BITcovers the earlier writes the prior type-specific mask missed, and the transfer/host-read destination scope matches the queued GPU labels and CPU pollers. The forced in-place limitation remains explicitly recorded in technical debt. The test reads destination bytes as soon as the label is observed, which exercises the ordering guarantee directly. The PR provides same-machinemain/change runs with validation enabled, plus the Intel Arc reproduction data in #10199; hosted conventions, Windows, and Linux checks are green where configured. Approved.