Repository navigation
fix(agc): preserve resident multisample baselines before unwatch - #16483
oneandonlydean merged 7 commits into
Conversation
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Radeon RX 6700 XT, AMD driver 26.10.1. Run through the Windows test queue with
AI-assisted: yes. |
|
Linux arm with the validation layer, for the Windows runs above: Ubuntu 26.04, RTX 4070 Ti, NVIDIA 615.71.09, GCC 15.2, Khronos validation 1.4.363. I compared
Correction (11-10): the Khronos validation layer these runs used (1.4.363) was not installed when they ran, and AnyPS5's test programs don't print the loader's "was not found" error. So the "no AI-assisted: yes (Claude Code) |
|
Additional AMD data point on head Selection
The three failures are Not run in this selection: |
|
Thanks for the Vega results. Both new fixtures pass 3/3 at Those tests and that assertion have prior history in #14380. That investigation narrowed its failure to The assertion alone does not establish the same mechanism on Vega. If that case is investigated further, the useful next datum is the first failing format, DCC key, alpha placement, and actual/expected texel bytes, linked back to #14380. Your current control supports keeping these failures separate from the unwatch change. AI-assisted review. |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
|
Validation addendum: |
gabichuuuuu
left a comment
There was a problem hiding this comment.
Ran d0aced879f merged on main 302864d on Windows 11 x64 (WinLibs GCC 15.2), on an NVIDIA laptop GPU (Turing, driver 621) and an Intel iGPU (driver 101.70xx), with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Khronos validation layer 1.4.368), ctest -R 'alpha_to_coverage|agc_driver_msaa_dcc' -V.
main (17 tests) |
change without the two Texture.cpp hook calls (19) |
change, 2 runs each (19) | |
|---|---|---|---|
| NVIDIA | 17/17 | 14/19 | 19/19 |
| Intel | 16/17 | 14/19 | 19/19 |
- For the middle column I kept the PR whole and removed only
MultisampleDccUnwatchLocksGpufromUnwatchHookLocksGpuandSaveMultisampleDccBeforeUnwatchfromSaveBeforeUnwatch. On both GPUs, the newmsaa_dcc_unwatchandmsaa_dcc_publish_gatefail, and so domsaa_dcc_clear_2/4/8with "multisampled DCC target reuse requires watched guest memory". With the calls back in, all of them pass every time. - On
main,agc_driver_msaa_dcc_clear_2failed once on the Intel iGPU with the same "requires watched guest memory" message (color range, 2 samples). The change passed it in both Intel runs. I ranmainonly once, so I can't say how often it fails there. msaa_dcc_compared_import_2/4/8skip on both GPUs in every build, so this run doesn't cover them.- The layer was inserted in every device test. No log has
was not found but was requested by env var VK_INSTANCE_LAYERS, and no log on either side has aVUID-. To be sure validation messages reach these logs, the same layer with best practices on printed 28BestPractices-warnings into anagc_driver_recorderlog on each GPU.
AI-assisted: yes.
…ed entries, move the debt edits into a fragment
|
Ran the 19-case set from the Tested section with the Khronos validation layer on Linux and an NVIDIA GPU; the posted NVIDIA runs are on Windows, and the Linux one is for an older head. Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor
The same four tests skip on both sides because of the device, not the change. The three No new AI-assisted: yes (Claude Code) |
|
@cookie42073-cmd the test this PR added,
Your mutation table makes the unchanged-data assertion the NVIDIA failure when the MSAA snapshot callback is disabled, so the callback may not take effect on these cards. Can you look and send a fix? If it needs a card you do not have, a run on the RTX 2060 or 5080 from the reporters is available. |
|
@cookie42073-cmd one more reproduction for the same test, from our own machine: an RTX 4050 Laptop (Windows driver 32.0.16.1047, about 610.47) on main 8dbb3bf fails The same file passes |
|
@cookie42073-cmd, a follow-up on #16483 from #22930 and #22931, which are one failure. On an RTX 4050 (Windows), main 0af6acc, agc_driver_msaa_dcc_unwatch modes 0 to 6 behave as expected. Only mode 7 (8 samples, FMASK unwatched) is refused with "writes to a resident multisampled DCC target or its metadata are not implemented (DCC range 0x200200000+0x1000, 8 samples)". So on NVIDIA something marks the DCC metadata page as written in the 8-sample FMASK path, after the FmaskDecompress pass, although the test only unwatches the FMASK block. Two questions: which step writes the DCC metadata there, and does it take a different path on NVIDIA (for example an 8-sample format or a storage-image fallback)? A fix PR is welcome and we can run it on our 4050. We are keeping the deadline at the end of 21 Nov NZ. |
What
Preserve an already resident multisampled DCC target when a host import removes write watching from its guest memory. Previously, later reuse could refuse unchanged data because the original watch proof was gone.
The shared unwatch callback now saves a complete baseline for each affected tracked range only when its write generation, mapping, metadata and pending-write checks still prove it current. Owner tracking, an import preflight and a publication hold coordinate target registration with concurrent imports while preserving GPU/import lock order. Failed proof and changed data retain their refusal paths. Two focused fixtures cover preservation/refusal cases and publication/import ordering.
This addresses the resident-MSAA DCC portion of #12522; it does not close that multi-failure issue. Same-value CPU stores after watch removal remain unobservable by byte comparison alone. The original contribution
0635d91d793758ee6705fe33a996acfe92191b96and Blazing Cook's authorship are retained in history.Tested
Native AGC execution fixtures on the same Windows 11 Pro machine, OS 10.0.26300, GCC 15.2 Release. Tests ran serially on each GPU listed below.
6fd097073810784f8e3455d36320542cd59252bf.d0aced879ffb5a0ba1922b819de013cb4d46c2de.Both new tests,
agc_driver_msaa_dcc_unwatchandagc_driver_msaa_dcc_publish_gate, pass on both GPUs in both candidate runs. Intelagc_driver_msaa_dcc_clear_2changes from the watched-memory reuse refusal to PASS. Every other common passing case remains passing.Intel
agc_driver_native_depth_publicationstill fails withnative D32S8 publication lost live samples, HTILE, padding or guest writes, identically on main and both candidate runs. Intelagc_import_settle_initial_dccstill skips because no second settle queue is available; the skip is not counted as a pass. These separate outcomes are unchanged by this patch.Runs used
ctest -V,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Verbose logs confirm the selected GPU and actual Khronos layer insertion for every invocation; the new cases and controls also enableAPS5_ASSERT_GPU_LOCK=1. There are no VUID/SYNC diagnostics or new validation errors/warnings. Three pre-existing loader errors for missing third-party implicit-layer manifests remain identical; validation still loads. The logs are not error-free.Three single-mechanism mutations were separately built and exercised on both GPUs:
All six controls fail for their intended mechanism, without skip, timeout, device loss or validation diagnostic. Both source files were restored byte-for-byte, all four targets rebuilt, and the complete 19-case selection repeated on both GPUs. Independent review audited all 116 test invocations and all 47 original evidence files.
Tracked AnyPS5 source is clean for the unmutated runs. The checkout retains an identical QuickJS submodule dirty marker from 153 missing JavaScript fixtures in nested test262, with its commit pin unchanged. QuickJS/NKWebKit/test262 are not inputs to these four AGC targets; this is not a globally clean recursive-checkout claim.
The candidate cleanly merges with newer main
9e432fbfa47ea68a70cfc10c507d9b252684a891in a source-only preview. No AGC production file changed between tested main and that preview base. The combined newer tree was not runtime-tested. The pre-push conventions check passed without warnings. No title, native-console, Linux/macOS, AMD, performance or full-suite result is claimed.Overlap review: the official scan against main
578dd09c42edb71eb17e9ad7b6fa7fea7978e7ffexamined 1,901 open PRs and 164 relevant merge comparisons. It exited 2, reporting five confirmed conflicts and 62 unresolved shared-file comparisons. All 67 have explicit pinned manual dispositions in the evidence; no duplicate implementation or prerequisite for this standalone change was found. The official result remains exit 2.Existing author coordination supports a separate main-based fix. For future combinations, preserve DCC owner/refusal tracking alongside the plain-color publication stack (#6987/#6989/#6995/#7002). #13963 ordering is storage-result flush, then
DccPublication, thenTargetsLock. #10233's two-sample native FMASK expansion must extend both the publication span and owner-bearing guard; #6808's older blanket retirement must not replace current DCC lifetime/refusal rules. These are future integration requirements, not dependencies or tested combinations.Logs, receipts, manifests and independent reviews. The public manifest maps normalized/redacted evidence to original hashes; receipt log hashes refer to the originals.
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)