Repository navigation
fix(agc): keep the template data buffer in dispatch run accesses - #21780
oneandonlydean merged 1 commit into
Conversation
|
The AI-assisted: yes |
|
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.
|
|
Linux / real-AMD datapoint, since this PR was tested on Windows/NVIDIA only. On RADV NAVI31 (RX 7900 GRE, gfx1100, Linux), head (The case is host-side recorder bookkeeping — AI-assisted: yes |
Dispatch overlap compares run accesses, and the buffer that holds a template's data was missing from them. A dispatch that rewrites that buffer could therefore join a run whose earlier dispatch still reads it. The buffer is now a run access, written when the dispatch refreshes the template's data, and a buffer access never matches an image or a guest range of the same handle value. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
8a642c4 to
2ab2802
Compare
|
Thanks @tablefrogpillow for the RADV NAVI31 run. It fills the Linux/AMD gap of our Windows/NVIDIA test. AI-assisted: yes |
|
Ran every Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor
|
main 1adc0e2f4b |
this PR | |
|---|---|---|
| Result | 120 passed, 7 skipped, 0 failed (127) | 120 passed, 7 skipped, 0 failed (127) |
Insert instance layer "VK_LAYER_KHRONOS_validation" |
123 | 123 |
was not found but was requested by env var VK_INSTANCE_LAYERS |
0 | 0 |
VUID- |
none | none |
On this build 127 entries run agc_driver_recorder_tests (151 on the Tested section's Windows build). agc_driver_recorder, which holds the new dataRunAccessTests, passes. The same seven tests skip on both sides for device reasons: agc_import_settle_initial_dcc (no deferred settle of host imports), agc_idle_publish_dmabuf_wait (no dma-buf import), and agc_driver_bda_reads_shadowed_results, _per_build, agc_hook_clear_access, _off and agc_unit_shadow_completion_store (the device reports watched host memory written when it imports or reads it). Every opened device was the RTX 4090.
No new VUID- errors; all focused tests pass on Ada.
AI-assisted: yes (Claude Code)
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change at head 2ab28024e21417ee192efc28e96fed6a761bbe55 adds 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
| Check | Result | Note |
|---|---|---|
| Changed files read | passed | 6 of 6 |
| Tests in this review | not run | No execution performed |
| Author-reported tests | not applicable | Reported in the PR description |
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
- VulkanDevice.cpp at the reviewed head
- ShaderResources.cpp at the reviewed head
- Recorder.cpp at the reviewed head
- Recorder test at the reviewed head
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, and tests/Recorder.cpp. No changed files were excluded from this review.
To get this to a good state
Nothing is required.
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
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 onmaine602d6a and 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(e602d6a at 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