Repository navigation
feat(agc): draw EQAA color targets at their coverage sample count - #9700
Conversation
|
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
|
|
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.
|
jotitadev
left a comment
There was a problem hiding this comment.
Apple GPU run of 22766ab: the new test passes on MoltenVK and fails without the change.
Setup: Apple M2 Max, macOS 27.2, x86-64 under Rosetta 2, Release. Base is #8658 (feat/macos-port) @ f48446a (main plus the macOS port), not main; your diff from 7e2ba73 applies cleanly on it. Two drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363) and MoltenVK main + SPIRV-Cross #2704. ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 30.
- This PR:
agc_driver_eqaa_color_targetpasses 3 of 3 on both drivers:4-sample 2-fragment draws resolve like 4x MSAA (262144 bytes), 410 quarter-coverage channels, FMASK guarded. That is the same 410 channels as on your 4090, so Metal's 4x sample positions give the same edge coverage. Your focused set (32 ctest entries:agc_driver_graphics, the new test, and the MSAA, FMASK, CMASK and journal tests) with--repeat until-fail:3: the only failures aremultisample_retirementandsample_mask_multisample. Both fail the same way on the base without this PR. - Test only, production files at the base (new
EqaaColorTarget.cppand its CMake line): fails on both drivers withAGC graphics: color targets with fewer fragments than samples (EQAA) are unsupported, the same as yourmaincontrol. - Full
^agc(857 entries, without flip/display/lds_atomics64): MoltenVK main + #2704 gives exactly the base's 16 failures. MoltenVK 1.4.2 gives the base's 17, plusagc_driver_uint8x4_color_target, which is intermittent on Apple without this PR too (it fails in 19 of 150 runs on the base). No new failures. - The
sizeof(State) == 792assert is under__linux__ && __GLIBCXX__, so it doesn't apply to the macOS libc++ build. The macOS build compiles with no errors.
GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
|
||
| bool sameTarget(const ColorTarget& a, const ColorTarget& b) { | ||
| return a.surfaceAddress == b.surfaceAddress && a.format == b.format && a.extent.width == b.extent.width && a.extent.height == b.extent.height && a.samples == b.samples; | ||
| return a.surfaceAddress == b.surfaceAddress && a.format == b.format && a.extent.width == b.extent.width && a.extent.height == b.extent.height && a.samples == b.samples && a.eqaaFragments == b.eqaaFragments; |
There was a problem hiding this comment.
This cache key distinguishes EQAA fragment count but omits the newly guarded FMASK address. If the same color surface is rendered again with a different fmaskAddress, acquire() finds the existing target and returns it without refreshing guarded(), so the old FMASK range remains protected while the current FMASK range is not. Please include the FMASK address in target identity/recreation or explicitly replace that guard when it changes, and add a regression that renders the same color target with two FMASK bases and verifies the guard follows the active base.
There was a problem hiding this comment.
Thanks, that was a real gap. Fixed in 53d00af: when acquire() reuses an EQAA target whose FMASK base changed, it replaces the target's FMASK guard with one at the new base, and 81eca78 keeps the FMASK pipe/bank XOR with it. I kept the FMASK base out of the target's identity, so the host target and its samples carry over to the next draw.
The regression is in EqaaColorTarget.cpp: it draws the same color surface again with a second FMASK block, then requires a read of the new base to be refused by name and the old base to be unguarded. Without the change in acquire() it fails with a read of the FMASK base the EQAA target was last drawn with was not refused by name. Results are in the body.
AI-assisted: yes (Claude Code)
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the decode, fragment-sized guest footprint, FMASK guard, resolve path, and the execution test. The author reports 62/62 focused tests on an RTX 4090 with three repeats and validation-layer comparison; an independent Apple/MoltenVK report also says the new test passes. I could not independently build or run the C++ tests in this Linux checkout because no configured product build is available.
There is a guard-lifetime issue at sameTarget (I left an inline comment): the cache key includes eqaaFragments but omits fmaskAddress. If the same color surface is reused with a different FMASK base, acquire() can return the existing target without refreshing its guard, leaving the new FMASK range unprotected. Please make the target/guard follow the current FMASK address and add a regression that changes the FMASK base for the same color surface.
Please also update this branch to current main (8b3a6ba88d8fc74e768f1a7e8e9e36fb69842768); the current head is based on 7e2ba73e4c, 13 commits behind. Rerun the focused tests after rebasing.
The overlap report lists shared changes with #7948 and #9450, which this description already discusses, and newly open #9672 through #9675, which touch State.hpp's register ranges and/or State.cpp's target decode. The repository asks authors to agree on landing order for overlapping code and declare Depends on when a stack is required. Please coordinate with those authors and update the checklist if this change depends on a particular order. I am treating these as shared-file coordination needs, not assuming the separate PS4/PS5 behavior is duplicate work.
Local checks: git diff --check is clean. GitHub conventions, eligibility, intake, labels and report checks pass; product CI jobs are skipped by the repository gates. I did not independently reproduce the author-reported GPU results.
|
@frankea a merge-order note: #9533, with #9717 and #9742 stacked on it, moves the guarded byte count out of |
|
@EagleBearerYS thank you for working that out. I've recorded it in the checklist: #9533, with #9717 and #9742, goes after this PR and takes the fragment count in AI-assisted: yes (Claude Code) |
|
@MarcZX10 the FMASK guard follows the active FMASK base since 53d00af, with the regression you asked for, and the branch now merges AI-assisted: yes (Claude Code) |
# Conflicts: # core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp # docs/dev/debt/libSceAgcDriver.md
Main's guards now retire a target on access when watched memory under the accessed range was written after the target's last use. The use stamp collects writes over the color plane only, so CPU writes to the FMASK plane made before the draw were first collected at the access, counted as newer, and retired the EQAA target instead of refusing the access. Collect the FMASK plane before each stamp.
# Conflicts: # core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
|
@MarcZX10 Merged
RTX 4090 (NVIDIA 616.92, Windows 11), each test run three times: the 186 ctest entries of the focused set's executables, AI-assisted: yes (Claude Code) |
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (5 IDs in 420 tests)Skipped (42)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
Stale: the requested main merge is in (8efaff3); it merges cleanly and CI is green on that head.
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (4, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (5 IDs in 483 tests)Skipped (46)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Hi frankea, main moved today, and this PR no longer merges cleanly with main. These conflicts overlap your changes, so they need your call:
Could you merge main into this branch and resolve them, keeping what main added? A merge commit is fine; no need to rebase or force-push. Once it's pushed we'll re-review the merge. |
MultisampleTarget.cpp: main moved PrimedSharedMutex to libc and guardedColorBytes earlier in the file; GuardedRange keeps the PR's plane member, and guardedColorBytes (at its new place) keeps the PR's storedFragments change. Debt doc: main's new written type-0/type-1 descriptor line stays, the multisampled color targets line keeps the PR's wording.
XairRrR
left a comment
There was a problem hiding this comment.
Re-checked — approved
The PR now merges cleanly with current main. Since 802f23b it drops the DCC-refusal test case, adds a regression for the retireUnmapped change, and adds a fix (3e3ddc1) that collects FMASK-plane writes before each use stamp. On the merged tree the build passes, the focused tests pass, and three negative controls fail where they should.
What changed since my last review
- New commits: 60a182e (drops the DCC-with-FMASK decode case), 1c1de36 (adds the test that removes either plane of an EQAA target), and 3e3ddc1 (
collectFmaskWrites, called before everystampUseof an EQAA target). Also merges ofmainup to 086c068 (8efaff3, 8bc11fa). The last merge adapts the PR to #8223'sTargetUseguards, #6628's guarded-range generation, andguardedColorBytesmoving. - The description's What and Tested sections are updated for these. The author's comments of 2026-10-29 and 2026-10-30 explain the changes.
What I ran
- Head
8bc11fae31b0ef03e768e14938cd5b6036f8d57b,main04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, merged tree3440987aaccb56783b07dd403c97d9c71265210d. - Machine: Debian 13 VM (32 vCPU, Xeon Gold 6136), GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6). The script built the merged tree and ran the selected tests and the validation-layer comparison.
git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...8bc11fae31b0ef03e768e14938cd5b6036f8d57b
python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24
# negative control 1: State.hpp, State.cpp, MultisampleTarget.cpp from main
ninja -C build agc_driver_eqaa_color_target_tests
ctest --test-dir build --output-on-failure -R '^agc_driver_eqaa_color_target$'
# negative control 2: merged tree, collectFmaskWrites made to return at once (3e3ddc10c undone)
# negative control 3: merged tree, retireUnmapped second pass back to `range.metadataValid && !range.active->load(...)`
# (same build and ctest for both)
# restore the merged files, then:
ninja -C build agc_driver_eqaa_color_target_tests agc_driver_graphics_tests
ctest --test-dir build -j8 --output-on-failure -R '^(agc_driver_eqaa_color_target|agc_multisample_guest_access|agc_driver_multisample_retirement|agc_driver_native_fmask|agc_driver_fmask_image_reads)$'
git status --porcelain| Check | Result |
|---|---|
Merge into main 04a9eb4 |
Clean |
git diff --check |
Clean |
check_conventions.py |
0 errors, 1 warning (see the non-blocking finding below) |
Build, libs |
OK |
| Selected tests (2241 run by the script) | No new failures and no timeouts. All 7 failures also fail on the main baseline. agc_driver_eqaa_color_target, agc_driver_graphics, agc_multisample_guest_access and agc_driver_multisample_retirement pass |
| Validation layer (784 tests, layer loaded in 783, missing in none) | No new VUID- line in any test this PR touches. The only test flagged is agc_driver_image_gather_volume: its sampler address-mode VUIDs are marked "test not run on main", and this PR changes no sampler code |
| Focused rerun after restoring the files | 5/5 passed |
| Worktree after the controls | git status --porcelain empty |
Negative controls
# 1: production files from main
AGC graphics: color targets with more than one but fewer fragments than samples (EQAA) are unsupported
# 2: collectFmaskWrites disabled
AGC graphics: a read of the EQAA target's FMASK was not refused by name:
# 3: old retireUnmapped second pass
AGC graphics: removing only the FMASK allocation of an EQAA target left its color plane guarded
All three match the controls the author reports in the description.
Previous findings
- Blocking — conflict with
mainindocs/dev/debt/libSceAgcDriver.md: Resolved. The PR merges cleanly into 04a9eb4. The merged tree builds and passes the selected tests, as shown above. - Non-blocking —
retireUnmappedchange had no test: Resolved. 1c1de36 covers both directions (EqaaColorTarget.cpp L299 and L312). With the old second pass restored, the test fails (control 3). - Non-blocking — DCC refusal case still in the decode test: Resolved. 60a182e removes it, and no DCC case is left in
eqaaColorTargetTests. The productionRequirestays, as I suggested. - Non-blocking — debt entry length: Resolved for the entry I named.
Multisampled target guest accessis nowmain's text unchanged, and the fragment-count detail is in theEQAA color targetsentry. A different entry now trips the same warning (see below).
New findings
Blocking
None.
Non-blocking
Multisampled color targetsdebt entry is over 1000 characters.check_conventions.pywarns atdocs/dev/debt/libSceAgcDriver.md:148: 1061 characters. Onmainthe entry is just under the limit. This PR's added clause ", the color plane or an EQAA target's FMASK plane, ... with every guard" pushes it over (head L147). Suggested fix: keep this entry as "An unmap or allocation removal of a whole guarded range also retires it with every guard". Then add "either plane's unmap retires both" to theEQAA color targetsentry, which already lists the FMASK plane.
I reviewed 3e3ddc1 itself:
collectFmaskWritesonly advances the FMASK plane's write generation beforestampUsestores the use generation.CollectWritesstamps generations and does not consume writes, so it hides nothing from other consumers of that range.- It runs on all three stamp paths:
guard,holdHostOnlyand the reuse path ofacquire(L997-L1001). - The broader
retireUnmappederase (L978) feeds #6628's generation bump.
Not verified
- Hardware GPUs. The script ran the GPU tests on lavapipe only. The RTX 4090 runs with the validation layer are as the author reports them; the NVIDIA runs are from TechLevelZero's CI comments.
agc_driver_graphicstook 35.0 s here, over the 30 s rule. TechLevelZero's CI reported 36.6 s on an earlier head too. This PR only adds a few decode calls to it, and I did not time it onmain, so I don't attribute this to the PR.- The FMASK
Z_64KB_Xfootprint against console or addrlib output, and Gran Turismo 7 behaviour; I did not run any title.
|
RADV/RX 9060 XT: the new 4-sample/2-fragment EQAA draw and resolve test passes 3/3 on this head. Head Sensitivity control: on the merged tree, temporarily reinstating main's refusal of more than one but fewer fragments than samples made the new GPU test fail 3/3 with the expected EQAA unsupported message. After restoring the PR condition it passed 3/3. This is a deliberate mutation, not an unmodified-main run of the PR-only test. Host: CachyOS, Linux ReproductionBuild the relevant test targets on main and the PR merged onto it, then run three times on each: export ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1
export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer
export VK_LAYER_PATH="$HOME/.local/share/anyps5-tester/vk-layers/usr/share/vulkan/explicit_layer.d"
ctest --test-dir build-main -V -R '^(agc_driver_sample_mask_multisample|agc_driver_sample_multisample_target)$'On the merged tree also run Limits: synthetic tests only, no title or console hardware; this does not establish console EQAA behavior beyond the tested cases. The broader CPU graphics fixture passed on both arms but reported unavailable guest-arena mirror subcases; those are not included in the three GPU results above. AI-assisted independent hardware test run (GPT-6.1 Terra). |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (8, not counted against this PR)Validated but not compared (58, not in the main baseline's validation pass)Validation IDs already present on main (8 IDs in 518 tests)Skipped (58)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
What
DecodeColorBufferrefused every color target whoseCB_COLOR_ATTRIB.NUM_FRAGMENTSis belowNUM_SAMPLES(EQAA): "color targets with fewer fragments than samples (EQAA) are unsupported". This accepts such a target when it has FMASK (CB_COLOR_INFO.COMPRESSIONand aCB_COLOR*_FMASKbase) and no DCC, and draws it as the existing host multisampled target at its coverage sample count.ColorTargetgainseqaaFragments(0 when the fragments equal the samples). The FMASK base is feat(agc): expose expanded FMASK for tracked native owners #7948'sfmaskAddress, whichmaindecodes for every multisampled target;CB_COLOR*_FMASK_BASE_EXT(context 0x3a0 + slot) is now inDrawKeyRegisters.samplesstaysNUM_SAMPLES, asmain'scoverageSamplesis, so pipelines, draws, CMASK fast clears, the FMASK decompress and the CB resolve are the existing MSAA path.eqaaFragmentsfits in existing padding, sosizeof(State)and the pipeline journal are unchanged; a pipeline depends on the coverage sample count, not the fragment count.MultisampledColorBytes, the guarded range, color fills) uses the fragment count, as addrlib sizes the surface: a 4-sample 2-fragment 512x512 RGBA8 target occupies 2 MiB, not 4.Z_64KB_Xsurface of 1, 2 or 4 bytes per pixel, so a T#, CPU or DMA read of it throws by name ("overlaps the FMASK of EQAA color target") instead of reading memory the host never wrote. An unmap or allocation removal of either plane retires all of the target's guards; the second pass ofretireUnmappednow drops every inactive range, not only metadata ranges.CB_COLOR*_FMASKbase,acquire()replaces its FMASK guard with one at the new base and keeps the target and its samples. The target's identity stays surface, format, extent, samples and fragments, so its contents carry over. The move bumpsmain's guarded-range generation (fix(agc): exclude native MSAA spans from BDA tables #6628), as every other guard change does.main, the FMASK range shares the target'sTargetUse: a bind of another target over it claims the target, and a CPU write over it after the target's last use retires it, as for the color plane. Each use stamp first collects the FMASK plane's writes (3e3ddc1), so CPU writes made before the draw do not count as overwrites.main(one sample,samples1 andcoverageSamplesNUM_SAMPLES, FMASK guarded);coverageSamplesstays the sample count for this PR's targets too, so fix(agc): draw a one-fragment multisampled color target as one sample with sample 0's coverage #9450's one-fragment checks see them as ordinary N-sample targets.main.GPU semantics, with sources:
NUM_SAMPLESis the coverage sample count andNUM_FRAGMENTSthe number of colors stored per pixel. PAL and Mesa program them that way: PAL gfx9ColorTargetView.cpp and Mesa ac_descriptors.c.NUM_FRAGMENTSdistinct colors. Where more primitives meet in a pixel, the console marks samples unknown and the CB resolve drops them (radeonsi si_state.c). Which samples it drops is not documented or measured, so a resolve here can differ at those pixels. The debt entry says so.GL_AMD_framebuffer_multisample_advanced, RDNA2) show the split: with 2 or 4 storage samples, draws that cover part of a pixel resolve to blends, as a host color per sample does; with 1 storage sample only what sample 0 covers survives.Why: Gran Turismo 7 (PPSA01317) stops on this refusal when it loads the World Map and when it delivers a purchased car, at a 512x512 RGBA8 target with 4 samples and 2 fragments (
CB_COLOR_INFO0x0000e028,CB_COLOR_ATTRIB0x0000a000, CMASK and FMASK). The title consumes the target only through a CB resolve.Overlap with other PRs:
FMASK8_S4_F2included. With this PR, such a read of a host EQAA target's FMASK throws through the guard until the driver serves FMASK from the host target, as feat(agc): expose expanded FMASK for tracked native owners #7948 does for 8-fragment targets.mainmerged in, the two cover disjoint fragment counts in one decode: one fragment takes fix(agc): draw a one-fragment multisampled color target as one sample with sample 0's coverage #9450's branch, two or more below the samples this PR's. fix(agc): draw a one-fragment multisampled color target as one sample with sample 0's coverage #9450's FMASK ranges and this PR's are separate guard kinds with their own messages.!metadataValid && !fmask) would also match this PR's EQAA FMASK range, so whichever lands second keeps that range out of the test. The two also conflict in the libSceAgcDriver debt file.guardedColorBytes(target), as @EagleBearerYS noted.mainnow has that function from fix(agc): retire a multisampled color target the title wrote over #8223, and this PR takes the fragment count there.NUM_FRAGMENTSthanNUM_SAMPLESinDecodeColorBuffer.Tested
Refreshed onto
mainee9a9a6 (47d9c51; fix(agc): retire a multisampled color target the title wrote over #8223's guard rework resolved as described in the comments), fixed in 3e3ddc1, and refreshed ontomainb1b5353 (head 9465e32; fix(agc): exclude native MSAA spans from BDA tables #6628), RTX 4090 (NVIDIA 616.92, Windows 11), each test run three times: the 186 ctest entries of the focused set's executables,agc_driver_eqaa_color_targetamong them, pass 186/186 on 9465e32, and 186/186 under the validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V): 785Insert instance layerlines, noVUID-line, and 13 warnings, the onesmainshows in the same tests.mainb1b5353 passes a 207-entry set holding all of these but the EQAA test in both runs, with noVUID-line. Control: 47d9c51 without 3e3ddc1 failsagc_driver_eqaa_color_targetwitha read of the EQAA target's FMASK was not refused by name:(the access retired the target).Refreshed onto
mainbb04a4f (head 1c1de36; the debt-file conflict resolved by keepingmain's "Multisampled target guest access" text and moving the fragment-count detail into the "EQAA color targets" entry), RTX 4090, each test run three times: the 176 ctest entries of the focused set's executables pass 176/176, and 176/176 under the validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V), with 775Insert instance layerlines and noVUID-line orwas not found but was requested by env var VK_INSTANCE_LAYERS.mainbb04a4f passes its 175 (noagc_driver_eqaa_color_target) in both runs, 770Insert instance layerlines, noVUID-line.agc_host_import_cut_lifetime(agc_host_import_cut_lifetime fails on Windows since the merge of #9159 #10746) passes on both now.Control for the
retireUnmappedchange: this head with the old second pass (range.metadataValid && !range.active->load(...)):agc_driver_eqaa_color_targetfails withremoving only the FMASK allocation of an EQAA target left its color plane guarded.Refreshed onto
mainca6e29e (head 802f23b; the debt-file conflict resolved by keeping both changes): of the 164 ctest entries of the focused set's executables, 163 pass,agc_driver_eqaa_color_targetamong them, and the same 163 under the validation layer (same settings as below), where the loader inserted the layer and the log has noVUID-line orwas not found but was requested by env var VK_INSTANCE_LAYERS. The one failure,agc_host_import_cut_lifetime(the larger side of an unmap of 1440 KiB at the start of the import's first 2 MiB run left the write watch), fails the same way onmainca6e29e, which passes 162 of its 163 entries (it has noagc_driver_eqaa_color_target) in both runs.On @adriadam10's rebase onto
main8a85a5c and his e6b1952, after mergingmain1c90644 (f9971fc) and followingmain's one-fragment decode in two decode-test expectations (51969a1), RTX 4090, each test run three times. The set is 159 ctest entries of 20 targets: the 19 below plusagc_driver_recorder_tests, whose multisample guest access and one-fragment FMASK guard tests share the guard list this PR extends.agc_host_import_cut_lifetime(agc_host_import_cut_lifetime fails on Windows since the merge of #9159 #10746), which fails the same way onmain.maind31f372: 157/158, the same agc_host_import_cut_lifetime fails on Windows since the merge of #9159 #10746 failure.maind31f372 with only this PR's GPU test:agc_driver_eqaa_color_targetfails withmain'scolor targets with more than one but fewer fragments than samples (EQAA) are unsupported.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V) on the same entries, onmainand on this PR: the layer is inserted in both logs (685 and 690Insert instance layerlines), neither has aVUID-line orwas not found but was requested by env var VK_INSTANCE_LAYERS, and both fail only agc_host_import_cut_lifetime fails on Windows since the merge of #9159 #10746's entry.sizeof(State)stays atmain's 840 (a macOS probe gives 840 for bothmain1c90644 and this head, the value ofmain's Linux guard).Refreshed onto
main0db47b2 (head d902416; no conflicts), RTX 4090 (NVIDIA 616.92, Windows 11): the 64 ctest entries of the focused set below (withagc_driver_eqaa_color_target) pass 64/64, each test run three times, and 64/64 under the validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V), with noVUID-line; its only messages aremain's threeUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings fromagc_driver_alpha_to_coverage.main0db47b2 passes the union of the refreshed sets, 115/115, under the same layer settings with noVUID-line.Windows 11 (build 26200), NVIDIA GeForce RTX 4090 (driver 616.92), MinGW GCC Release build with
BUILD_TESTING=ON, all on one machine.Focused set: the 63 ctest entries of 19 targets (62 before the
mainmerge). These areagc_driver_graphics_tests(the CPU decode tests, with a new EQAA case), the newagc_driver_eqaa_color_target_tests, and the MSAA, FMASK, CMASK and journal tests: alpha_to_coverage, cached_image_multisample_guard, cmask_fast_clear, color565_target, fmask_image_reads, image_msaa_address_on_plane, msaa_enable_single_sample, multisample_fill_host_only, multisample_readback, multisample_retirement, multisampled_pass_order, native_multisample_depth, pipeline_journal, pixel_sample_coverage, sample_mask_multisample, sample_multisample_target, staged_clear_sampled_read.This PR (43a9181, which merges
main7e69be6): 63/63 passed, each test run three times (ctest --repeat until-fail:3).After the merge,
main(feat(agc): expose expanded FMASK for tracked native owners #7948) decodes an FMASK base for every multisampled target, so 43a9181 drops the decode test's check that a 4-sample 4-fragment target has none; it still checks that such a target is not EQAA.Control for the FMASK guard move: this head without the move in
acquire(). The new test fails witha read of the FMASK base the EQAA target was last drawn with was not refused by name.Validation layer:
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Vulkan SDK 1.4.363.0),ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1withctest -V, onmain83462cc (7e69be6 plus eight commits totools/only) (62/62; the new test isn't onmain) and on this PR (63/63). Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS. Neither log has aVUID-line. Both have the same threeUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings, frommain'sagc_driver_alpha_to_coverage.Before the
mainmerge (22766ab onmain7e2ba73): 62/62 three times.maincontrol there:main6ef5a1c plus only the new GPU test and its CMake line; the test fails withAGC graphics: color targets with fewer fragments than samples (EQAA) are unsupported.The GPU test draws two slanted triangles, red and green, into a 256x256 RGBA8 target with 4 samples and 2 fragments and into the same target at 4 fragments, then CB-resolves both into one-sample targets. It requires byte-identical results, with edge texels at one-quarter and three-quarter coverage (410 such channels). It also checks that a read of the EQAA FMASK range is refused by name, that the color guard ends at the 2-fragment footprint (512 KiB, not 1 MiB), and that the 4x target's FMASK is not guarded. Then it draws the EQAA color surface again with a second FMASK base and checks that a read of the new base is refused by name and the old base is no longer guarded. Last, it removes only the FMASK allocation of a drawn EQAA target and checks that its color plane is no longer guarded and that the next draw guards a new target, then removes only the color allocation of another and checks that its FMASK range goes.
The CPU tests decode GT7's registers (
PA_SC_AA_CONFIG0x0020c002,CB_COLOR_INFO0xe028,CB_COLOR_ATTRIB0xa000, an FMASK base with pipe-bank bits) through the draw-key register facade (0x3a0 now covered), as well as 8 samples with 4 fragments. They check the refusals: more fragments than samples, noCOMPRESSION, no FMASK base and a badFMASK_BASE_EXT. They also check the CB resolve's source decode and the 4x, 4s/2f and 8s/4f footprints.Not run on Linux.
sizeof(State)stays atmain's 808: a probe built on macOS gives 784, 792 and 808 formain7e2ba73, this PR's previous head andmain7e69be6, the values of their Linux guards, and 808 for this head.tools/check_conventions.pypasses.Gran Turismo 7 (PPSA01317) on a local stack of
mainwith the open PRs it needs before this stop (fix(agc): write a replace blend into a packed color target without blending #7243, feat(agc): render layered draws into a depth view of several slices #7256, fix(shader): answer image_get_resinfo on any T# dimension #7550, fix(agc): raise no end-of-pipe event from flips and carry the release's interrupt context #7978, feat(agc): merge partial writes into 4_4_4_4 UNORM color targets #8564, feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020, feat(agc): draw alpha-tested packed-target merges that write depth as a depth pass and an EQUAL merge pass #9335, fix(shader): link table callees that together exceed s_call_b64 range #9068), with its diagnostic switches that skip refused compute dispatches (at the revision before the one-fragment refusal; GT7's target has two fragments): the run no longer stops on the EQAA refusal, and nothing hits the FMASK or color guard. After CROSS at the main menu it renders the car loading screens, then stops on the next pass:a one-sample depth target under a multisampled rasterizer without MSAA_ENABLE is unsupported for points or lines and with ... DB_EQAA Z interpolation or overrasterization. That pass keeps the EQAA pass's 4xPA_SC_AA_CONFIGwithDB_EQAA0x00050000 (INTERPOLATE_COMP_Z); it is a separate topic for a follow-up PR.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)mainand keeps both. fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 (with feat(agc): sample the stencil plane of a native multisampled D32S8 target #9717 and fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742) goes after this PR and rebases over it.mainnow coversCB_COLOR*_FMASK_BASE_EXTinDrawKeyRegistersitself, so this PR no longer extends that list and no longer overlaps feat(libSceAgcDriver): draw PS4 (GCN) command buffers #9431 there. fix(agc): retire a multisampled color target a write-only storage image overwrites #10049 (mine): whichever lands second keeps this PR's EQAA FMASK range out of fix(agc): retire a multisampled color target a write-only storage image overwrites #10049's color-plane test.