fix(agc): keep the template data buffer in dispatch run accesses #21780
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21780"
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 muhmuhkuh on 2026-11-16T19:28:49Z.
What
A recorded dispatch that refreshes its template's data (
DataRefreshother than none) writes the buffer that holds the template's data words.ShaderResources::RunAccesses, which the dispatch overlap check compares between dispatches of a run, lists guest ranges, a BDA marker and storage images, but not that buffer. A dispatch rewriting the template's data could therefore join a run whose earlier dispatch still reads it, with no barrier between them.RunAccessesnow also lists the buffers of the resources' own allocations as a buffer access (Recorder::RunAccessBuffer), written when the dispatch refreshes the data (VulkanDevice.cpppassesrecord.dataRefresh != None). The overlap check treats a buffer access as a kind of its own, like an image access, so it never matches another access with the same handle value.This was found by reading the code. The test shows it at the level of
RunAccessesandOverlapCommands, not with a real dispatch series.Overlap with open pull requests: none found. 66 open PRs that touch
ShaderResources.cppwere searched for changed lines containingRunAccesses,RunAccessBufferordataRunAccess.Tested
Windows 11 Pro (10.0.26200), NVIDIA GeForce RTX 3080 Ti, driver 610.88, MinGW GCC 15.2 (UCRT, POSIX threads, SEH), Release, validation layer on (
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation). Built on the same machine onmaine602d6a587and on this change at the same base.dataRunAccessTestsruns insideagc_driver_recorder. Everyctestentry that runsagc_driver_recorder_tests(151 entries): all pass onmainand all pass on this change.RunAccessesskipped,agc_driver_recorderfails with "the template's data buffer is missing from its run accesses".VUID-lines in both logs. The loader log shows the validation layer inserted in every run; the phrasewas not found but was requested by env var VK_INSTANCE_LAYERS: 0 occurrences in both.Checklist
main(e602d6a587at posting time); 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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T11:25:55Z.
Review: APPROVED
Reviewed — looks good
The reviewed change at head
2ab28024e21417ee192efc28e96fed6a761bbe55adds refreshed template data buffers to dispatch overlap checks, and I found no blocking defect.What I ran
Read the prepared diff and all six changed files at the pinned head. No commands or tests were run in this review.
Results
Negative control
Not run in this review. The PR description reports a red probe with the new access loop skipped; it is author-reported, not independently verified.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No tests were run. The PR description reports passing recorder tests on Windows with an NVIDIA GeForce RTX 3080 Ti; that result was not independently confirmed. Linux, other AGC tests, and title behavior were not run. All changed files were read:
VulkanDevice.cpp,Recorder.hpp,ShaderResources.hpp,Recorder.cpp,ShaderResources.cpp, andtests/Recorder.cpp. No changed files were excluded from this review.To get this to a good state
Nothing is required.