test(agc): expect the stored-again flush waits only while the earlier store is pending #21741
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21741"
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 androidbaklava on 2026-11-16T18:04:55Z.
What
agc_driver_storage_flush_orderingfails on every run on an Intel UHD iGPU on Windows since #12070:On this GPU the driver has one queue, so Windows direct host imports are compared instead of watched (
[write-watch] Windows direct host imports use comparisons). When the restore dispatch refreshes the image,GuestMemory::ChangedBlocksreports the range as untracked andStorageTexture::awaitStoredSavesyncs the recorder through the earlier write-back (Recorder::SyncThrough). The earlier store has finished before the secondFlushPendingruns, so that flush has nothing to wait for and the open serial does not change. The test only excuses compared imports throughComparedHostImportCovers, which always returnsfalseon Windows.The test now reads
Recorder::PendingWriteOverlapsover the flushed range just before the second flush, and expects that flush to wait only while the earlier store is still pending, inRunStoredAgainand inRunStoredAloneAfterJoint. Where the earlier store is still pending (watched imports, Linux, macOS) the checks are unchanged. The check that the newer texels land over the earlier store is unchanged everywhere. No production code changes.Tested
Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,mained957ca35c.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R '^agc_driver_storage_flush_ordering' -V, 3 runs each, rebuilding in between:agc_driver_storage_flush_orderingagc_driver_storage_flush_ordering_no_importVUID-linesmainEvery log shows
Insert instance layer "VK_LAYER_KHRONOS_validation"and none showswas not found but was requested. The wait in the restore dispatch was found by breaking onRecorder::SyncandRecorder::SyncThroughunder gdb: the only sync between the two flushes isSyncThroughfromStorageTexture::awaitStoredSave. To buildmainon Windows I applied #19899's_putenv_schange toUploadCacheReadOnlyFlush.cpplocally; it is not part of this PR.Not tested on Linux, macOS or a GPU with a second queue, where the earlier store is still pending at the second flush and the expectations are the same as before.
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)8086:a7a8), Intel driver 101.7084, Windows 11Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T12:47:28Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this test-only change; the inspected code supports conditioning the wait assertion on whether overlapping writes remain pending.
What I ran
Reviewed head
cc14d60ac4feebdfa26f2412e1a6d61373e77536. No commands or tests were run. Read the PR description, commits, manifest, diff, the complete changed test file,Recorder::PendingWriteOverlaps, and a related recorder test assertion.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The PR-reported Windows test runs were not independently run. Linux, macOS, and second-queue behavior were not tested in this review. No files were excluded by the provided manifest.
To get this to a good state
Nothing is required.