[bug] agc_driver_dcc_keys_first_write fails on main on a real NVIDIA GPU #2188
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Dextroid17 on 2026-10-09T11:08:08Z.
agc_driver_dcc_keys_first_writefails onmainon a real GPU, and I could not find which change is responsible — reporting with the reproduction and with two suspects I was able to rule out.Reproduction
On a clean
upstream/main(d70b8998), Linux,BUILD_TESTING=ON:naming the assertion
an unchanged pending image was uploaded again. It fails with and withoutAPS5_WRITE_WATCH_IMPORTS=watch, so the write-watch workaround from #1289 is not masking or causing it.Environment
BUILD_TESTING=ON[gpu] storage image 0x…: guest memory changed while GPU results were pending; keeping the CPU's blocksTwo suspects ruled out, by experiment
The test's introducing commit is
b8d30603("fix(agc): store uncompressed DCC keys at the first write of a fast-cleared image", 2026-10-06), and the three most recent changes to that machinery are mine, so I tested them instead of leaving them as a suspicion:driverID != VK_DRIVER_ID_NVIDIA_PROPRIETARYclause fromVulkanDevice.cpp:878, i.e. restoring the pre-#1329 behaviour, still fails with the same message.StoredOver) — neutralisingWriteTracker::noteCpuStoresendsStoredOverdown its own no-page-record fallback, which returns the pre-#1387 whole-block answer; still fails with the same message.core/relinker/**, so it cannot be involved.So the cause is somewhere between
b8d30603andmain, and it is not the recently merged Dextroid17 PRs.Why it may be going unnoticed
The
linuxCI job installs lavapipe and runs the execution tests on it. If this failure needs a real NVIDIA GPU — which the "guest memory changed while GPU results were pending" line suggests, since import watching behaves differently on that driver — then a green CI run would not contradict this report.What I did not do
A bisect. Reverting the two files wholesale to their pre-merge state does not compile against current
main(the interfaces moved), and I stopped there rather than rebuilding an older tree and guessing. If it would help, I can run one from any commit you point at.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T11:12:50Z.
Confirmed device-specific, as the body suspected. On lavapipe — the same software device the linux CI job installs, Mesa 26.2.4 / LLVM 23.1.1 / 256 bits — the test passes; on the RTX 3080 Ti it fails with the same message. So the lavapipe job cannot see this.
To re-check on a machine with both: install or extract
vulkan-swrast, thenThat reproduces the CI device on a workstation without touching the NVIDIA install.
Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T11:15:28Z.
Closing this myself, because by this project's own ground rules it should not have been filed: the failure reproduces only on the NVIDIA proprietary driver, that path is not expected to work on Linux yet, and the same test passes on lavapipe, which is the device CI actually runs. My framing above — a CI blind spot — was wrong; this is an unsupported device, not a defect.
Leaving it visible rather than deleting it, since the lavapipe half is the useful part: on the CI device the test passes, so nothing is hidden from CI.
Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-09T17:41:19Z.
The bisect the report left open.
git bisect runbetweenf1451396(the base of #1979, assumed good; the assertion does not exist there) andd70b8998, 95 commits, 9 steps, 7 of them built and tested once each on an RTX 3080 (615.71.09, Linux, CachyOS kernel 7.2.9, GCC 16.2.1, Release) and 2 skipped because they do not build (6cc0503d,0ab2a04d): the first bad commit is0e1d25a8("fix(agc): avoid redundant transfers for untracked imported textures", merged through #2096), the commit that added the assertionan unchanged pending image was uploaded againtoDccKeysFirstWrite.cpp. Tested directly with the same build and GPU, its parenta8b032b2passes 3 of 3 and0e1d25a8fails. Atd70b8998the test fails 3 of 3 runs on the RTX 3080 and passes 3 of 3 on RADV (Mesa 26.2.4, Ryzen 7950X3D iGPU) on the same machine. On Windows, popcoder565's run on #2096 (RTX 3060 Laptop, 616.92, head3ed0d036) hasagc_driver_dcc_keys_first_writepassing 30 of 30, and #2155 attributes thestorageRefreshTestsfailure ofagc_driver_recorder_testson that machine to the same commit.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-10T01:27:04Z.
This reproduces on
main0c0dc1e9with an RTX 5080 (615.71.09, Linux 7.2.9, GCC 16.2.1, Release), and the trigger is not the NVIDIA driver as such: it is host imports staying write-watched.mainmain+ patch belowAPS5_WRITE_WATCH_IMPORTS=watchAPS5_WRITE_WATCH_IMPORTS=unwatchAPS5_WRITE_WATCH_IMPORTS=watchThe probe reports
0 of 4 scratch pages written after a GPU read ... imported ranges stay watchedon NVIDIA and4 of 4 ... imported ranges are comparedon RADV.In the code:
GuestMemory::ImportWatchedstamps the blocks withStampKind::ImportWindow, whichChangedBlocksreports asBlockMaybeWritten.StorageTexture::Refreshtreats any non-zero stamp as changed (Texture.cppL1289), a changed pending unit blocks theequalsOriginal()rescue (L1326), and it is not droppable because it is notBlockWritten(L1388). So the unit is written back and the image uploaded again. The unwatched path instead compares againstoriginal(L1271).Candidate (7 lines, in
scanBlocks): for a tracked block unit stampedBlockMaybeWritten, compare it againstoriginalwithcompareUntrackedand mark it unchanged when equal.With it, on the RTX 5080 the full ctest goes from 564 of 565 to 565 of 565; on RADV
ctest -R ^agc_is 266 of 266 before and after.tools/check_conventions.pypasses.Retested on
mainee501326: same results in the table; full ctest on the RTX 5080 583 of 584 → 584 of 584, RADVctest -R ^agc_269 of 269 before and after.Not established: any effect on a title; the non-block-unit branch (L1298–1305); Windows. The RADV forced-
watchrow still fails with the patch, at a later assertion.compareUntrackedcallsFlushGpuWrites, which this adds to the tracked path.Patch against main
0c0dc1e9AI-assisted: yes.