Repository navigation
test(agc): pad the surfaces that leave the write watch so their cases run - #24872
oneandonlydean merged 2 commits into
Conversation
The case took an arena surface out of the write watch, and a settled host import could put it back before the first write-back, which then kept no saved bytes. A surface outside the arena stays unwatched, so the case now requires that and still checks the saved bytes and the second store. Co-authored-by: thalesdot1dot1 <296322452+thalesdot1dot1@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011TXsSW8zeAgKgHLCFsYwM3
… run The write-watch cases of agc_driver_store_over_untracked built 256 KiB surfaces (320 KiB with the lead page). On Windows a host import of write-watched memory stays watched only when it is settled, which takes at least settleFloorBytes (1 MiB), so these surfaces left the watch at their first store and the cases printed "not run, the surface is not write-watched". Give them the 16-block tail RunStoredThenLeftWatch already uses. Proposed by Superseabas in boykopovar#22670. Co-authored-by: Superseabas <131002911+Superseabas@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The diff makes the write-watch cases use larger surfaces and adds checks to the second-store case; I found no concrete defect in the changed code.
What I ran
- Reviewed head
be1791e1b962e98f5a4d8412b4cddcb4cc5c84aa. - Read the prepared description, commit list, manifest, diff, and the complete changed source file through
repo_read.py. - No tests or build commands were run.
Results
| Check | Result | Note |
|---|---|---|
| Changed-code review | passed | One changed file read in full |
| Tests | not run | Author reports Windows and GPU runs |
| Other files | not applicable | No other changed files in manifest |
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not independently run the tests, verify the reported Windows/GPU results, or inspect CI behavior on Linux and macOS. The author’s reported test results are not independently confirmed.
To get this to a good state
Nothing is required.
GPU test run: ✅ the skipped cases now run, and the test passes every time on an RTX 4080Basis: built and ran · head Checked
Findings: none from this run; this is a GPU run, not a code review. AI-assisted test run (Claude Code) · head |
|
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.
|
What
Second part of #22670. In
agc_driver_store_over_untracked,Run()built its write-watch surfaces asSurface surface(leaves, neighbour ? Page : 0): 256 KiB, or 320 KiB with the lead page. On Windows a host import of write-watched memory stays watched only when it is settled, which takes at leastsettleFloorBytes(1 MiB,importWatchinginGuestBufferMemory.cpp). So these surfaces left the watch at their first store, and the cases printednot run, the surface is not write-watched. "A surface that left the write watch" and "... whose first block left the write watch with the page before it" were skipped in every run here; without the validation layer, "written before it left" and "whose import left" were skipped too, often all four in the same run.The surfaces now get the 16-block tail that
RunStoredThenLeftWatchalready uses:Surface surface(leaves, neighbour ? Page : 0, leaves ? 16 * Block : 0). This is @Superseabas's change from #22670; the commit carries them as co-author. The driver is unchanged.What running them adds: disabling the unwatch hook is caught with or without the padding (as @Superseabas found), because the driver throws on that path from any case that reaches it. A narrower mutation shows the difference: removing only the save of pending results in
StorageTexture::SaveBeforeUnwatch(texture->saveBeforeUnwatch(address, bytes)foroverlapping), which only these four cases exercise, was caught without the validation layer in 4 of 10 unpadded runs on the RTX 5090 and 1 of 5 on the Radeon (every passing run had skipped all four cases), and in 10 of 10 and 5 of 5 padded runs. So the padded cases detect no new kind of regression, but they check the pending-at-unwatch path in every run instead of in roughly half of them."Not run" stays a skip rather than a failure: whether an import stays watched is decided by runtime probes (
watchPrivateImportson Windows,unwatchImportselsewhere), so a GPU or driver whose probe chooses comparison would fail for no fault of its own.RunStoredThenLeftWatchtreats it the same way.Tested
Windows 11 Enterprise 10.0.26300, Ryzen 7 9800X3D, WinLibs GCC 15.2.0, Release, validation layer 1.4.369.
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build -R '^agc_driver_store_over_untracked$' -V, a fresh process per run, withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layerand without it.5503a0cbff)mainb23daffaf9Every log with the layer shows
Insert instance layer "VK_LAYER_KHRONOS_validation", none showswas not found, and no log has aVUID-line. The test takes under 13 s. Not tested: Linux and macOS (CI), Intel GPUs.check_conventions.py --base upstream/mainpasses;pr_overlap.py --branchreports only #6188, which changesRunSecondStore, not this line. The branch carries #22764's commit underneath; once #22764 merges it rebases cleanly ontomain.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)1002:13c0), driver 32.0.21045.29003, Windows 11🤖 Generated with Claude Code