Repository navigation
test(agc): watch the sparse flush image again when a GPU store leaves it unwatched - #28086
Conversation
… it unwatched On hosts whose host imports do not stay write-watched (Linux and macOS), the GPU store in SparsePendingWrite unwatches the image pages, so the interior-unwatch phase added in boykopovar#27438 always failed its precondition there. Register the image again before that phase; where the store keeps the pages watched (Windows) nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Other Merge Risk:
|
|
Windows data point for this one. I applied #28086 on main
On the UHD the interior case doesn't get its stored pages watched again after the imports settle, so it can't set itself up even with this change. A variant that runs the interior case only where that re-watch happens passes there, and the rest of the test still runs. I can rebase it on top of this PR once it lands, if that's useful. I'm not opening it now, to avoid a conflicting PR. AI-assisted: yes (Claude Code); the runs above are local. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this test-only change; the conditional re-registration restores the fixture’s intended watched coverage before it unwatches page 2.
What I ran
Read the prepared diff and the changed test at head 8b3eb6fb3c04a254d5ed70857e35cf862510cb4e, plus the relevant write-watch implementation and its usage. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed test | passed | One added line reviewed |
| Related write-watch behavior | passed | Registration is used for this range |
| Tests | not run | Author-reported runs only |
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not independently run the reported Linux or Windows tests. Read review/description.md, review/commits.md, review/manifest.json, review/diff.patch, core/libs/prx/libSceAgcDriver/tests/execution/UploadCacheReadOnlyFlush.cpp, core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp, and core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp. review/files.json was unavailable; the manifest lists one changed file, and its full text was included.
To get this to a good state
Nothing is required.
|
Tested on an Intel Arc B580 (Linux, Mesa ANV 26.2.5): real hardware where host imports are compared, not watched ( Setup: Intel Arc B580 (BMG-G21,
With the PR: Full sweep with validation: AI-assisted: yes (Claude Code) |
|
Tested
GPU: 4 GPU tests (AGC) passed twice on a GTX 1650 SUPER (Windows 11, Vulkan required, validation layer on, shader cache off), with this pull request merged into main AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
ligmaSec
left a comment
There was a problem hiding this comment.
Paired Linux runs reproduced the fixture problem. On b97867d3ce6b, agc_driver_upload_cache_read_only_flush failed before the sparse write because the intended watched and unwatched page layout was absent. The patched CTest passed after restoring the image's watch before unwatching the selected page. The scalar-buffer control passed on both. Both Mesa lavapipe logs show Khronos validation 1.4.369 inserted and zero VUID- errors.
AI-assisted: yes.
|
Linux/RADV data point for head On current The driver's probes on this device report:
Setup: Linux 7.3.6, RX 6650 XT (RADV, Mesa 26.3.1), Release. ctest filter: AI-assisted: yes |
What
agc_driver_upload_cache_read_only_flushfails on Linux at every run since #27438:The
SparsePendingWritecase in #27438 has three phases. Its third phase unwatches page 2 of the image and requires pages 0 and 3 to stay watched. On hosts whose host imports do not stay write-watched (Linux and macOS,ImportWatchedwithstaysWatched == false), the GPU store of the second phase already unwatches the whole image. A probe after each step on Linux shows it:So the third phase could never start there. On Windows the store keeps the pages watched, so the test passed there. #27438's
linuxjob was skipped, so CI never ran the case on Linux.The fix registers the image for write watching again before the third phase when it is no longer watched. The third phase then runs from the same mixed coverage as on Windows. On Windows the condition is false and nothing changes; the driver is not touched.
Tested
mainf51f7fe the test fails at every run. With this change it passes 5/5 (--repeat until-fail:5).ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layer(validation layer 1.4.363),ctest -R upload_cache -Vpasses on bothmainand the change. Both logs showInsert instance layer "VK_LAYER_KHRONOS_validation", neither containswas not found but was requested by env var VK_INSTANCE_LAYERS, and both have 0VUID-lines.ctestofmainon Linux on the same machine (7286 tests) has 13 failures. Two of them are environment specific: this one and theagc_driver_runtime_formatted_store*timeouts, which pass alone. The other llvmpipe failures already have open PRs (test(agc): skip the PS4 multisampled color fill test without 2-sample color targets #27800, test(agc): leave the LOD bias -192 case out on lavapipe before Mesa 26.1 #27777, test(agc): check filter mode 3 on devices without min/max filtering #27671, test(shader): keep the flat LDS bound stores of two lanes apart #28062), apart fromagc_driver_image_d16_load(llvmpipe quiets a signalling f16 NaN).python3 tools/check_conventions.pyandpython3 tools/pr_overlap.py --branch fix/agc-upload-cache-sparse-rewatch(no overlap; perf(agc): reuse read-only sparse buffer address uploads #27991 shares the file and merges cleanly) pass.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)🤖 Generated with Claude Code
Summary by CodeRabbit