Repository navigation
feat(agc): expose expanded FMASK for tracked native owners - #7948
Conversation
|
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.
|
|
Rebase handoff with a build-blocking finding you'll need to design around — rebased onto current
Everything else is resolved and the branch carries it: the union above, your State.cpp/SampleMultisampleTarget/GuestTextureResource changes applied cleanly. To pick it up (after your canonicalization work): Head is |
|
Latest fixture correction: 6dd3501fba, addressing the llvmpipe review. Skip native FMASK before drawing when multisampled storage is unavailable or
Previous fixture capture correction at ed373fa@oneandonlydean Linux fixture compile correction: Linux GCC 13.3 reproduces the original exact fixture failure and compiles the corrected fixture with this head's actual headers. This is syntax-only translation-unit validation, not a new Linux full build or runtime result. The Windows fixture rebuilds and all three registered modes pass 3/3 on each physical GPU (18 passes, RTX 5080/610.62 and Radeon/32.0.21036.18). Khronos 1.4.363 loaded, required Vulkan, app cache/journal disabled: no VUIDs, validation errors/warnings, skips or timeouts; driver caches uncontrolled and loader notices retained. Conventions/whitespace pass. Cppcheck/clang-tidy complete with one unchanged allocation advisory and no selected clang diagnostic. The description retains the earlier full build, paired-main matrix and controls at their actual pins. Clean source merge against Earlier rebase qualification at its stated pinsThanks @blawesom — the rebase and qualification are complete at
Linux evidence and Cppcheck/clang-tidy findings keep their earlier pins; the Linux-tested State.hpp, PipelineJournal.cpp and Graphics.cpp blobs match this head. No full Linux/GPU or fresh title/FPS claim. Main advanced during testing; source review through Overlap: @milescoviello confirmed ordering and combined edits for #8429/#6612, and offered RTX 4070 Ti validation. #6959 shares the journal guard; #8223 shares fixture edits. Our dependent publication stack will be updated after this topic. These combinations remain unqualified; already-conflicting PRs are not treated as clean overlap comparisons. AI-assisted: yes (Codex); author responsible. |
a69c022 to
3d7b744
Compare
|
@Amoenus Agreed on both. If #7948 lands first, I'll rebase my two:
If #8429 or #6612 lands first, the same two edits fall to you, and I'm happy to run the combination on the RTX 4070 Ti. AI-assisted: yes (Claude Code) |
Import an eight-fragment DCC-cleared owner with disjoint watched metadata, capture its independent CB FMASK address and XOR, and expose expanded indices only for an exact matching native view. Reject standalone compressed reads, descriptor mismatches and metadata writes. Exercise direct/registered/prepared dispatches and invalidation with a cold GPU fixture. Descriptor metadata normalization builds on Romans Pokrovskis and MarcZX100 work in boykopovar#4790; standalone CPU decoding remains outside this change. Expanded indices follow AMD PAL c5e800072a32f68b6ccc4422936d96167c6e0728. Written with AI assistance. Co-authored-by: MarcZX100 <marczxrr@gmail.com>
3d7b744 to
70bc319
Compare
|
Full CI on 70bc319 (run 39451865417) builds and passes on Windows, but the Linux build stops in this PR's test (GCC 13): Inside |
|
First AMD-on-Linux (RADV) run of the current head, AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.
GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
|
Linux CI (run 39466527758 on ed373fa) fails the new The fixture hard-codes an 8-sample target ( Could you skip it there when the device can't render 8 color samples, with a line that const auto& context = AgcDriver::VulkanDeviceTestAccess::ContextOf(*device);
if (!context.storageImageMultisample || (context.limits.framebufferColorSampleCounts & VK_SAMPLE_COUNT_8_BIT) == 0) {
std::puts("native FMASK skipped, the device does not render or store 8-sample color");
return VulkanTestSkipped;
}(The text needs |
|
@oneandonlydean Thanks, addressed in 6dd3501fba: both missing multisampled storage and missing 8x color rendering now skip with the requested reason. I scoped the context copy before Changed-fixture build and 18 fresh GPU runs pass (three modes × three runs × RTX 5080/Radeon Graphics), with Khronos loaded and no validation errors/warnings, skips or timeouts. The exact-guard harness passes 16 synthetic capability combinations, and the skipped-JUnit control passes Linux/Windows skip policy. Conventions and analysis are checked; the maintained report retains details and earlier qualification pins. Could you run fresh CI on this head? I have not rerun the full Linux fixture locally, and this change does not address the separate |
…MASK range boykopovar#7948 tracks the FMASK of an eight-fragment DCC target and requires it to be write-watched at the initial import ("native FMASK contents require watched guest memory") and at each reuse ("native FMASK sampling requires watched guest memory"). In Linux comparison mode a host import over the FMASK unwatches it, so the target is refused one check after the color, DCC and CMASK ranges that the previous commit accepts. Treat an FMASK range that a compared host import covers (ComparedHostImportCovers) as the color and metadata ranges are treated: keep a copy and its NewestStamp at the initial import, skip it in the import's UnchangedSinceAll, and at reuse require the stamp and the bytes to be unchanged, comparing them at most once per collect epoch. An explicitly unwatched FMASK range is still refused. Four-sample targets take no FMASK range, so this changes nothing for them. Refs boykopovar#9724
…al multisampled DCC import boykopovar#7948 requires the FMASK of an eight-fragment DCC target to be write-watched at the initial import and at each reuse. On Windows an FMASK in a host import whose deferred settle has not run yet is still compared, so the target is refused with "native FMASK contents require watched guest memory" after the previous commit has settled its color and metadata ranges. Call WatchedAfterSettle for the FMASK range at both checks, as the initial import already does for the color, DCC and CMASK ranges. A range that is unwatched without an import awaiting its read is still refused, and nothing changes off Windows. Four-sample targets take no FMASK range, so this changes nothing for them. Refs boykopovar#9724
What
Expose expanded FMASK indices for an exact, tracked resident native eight-fragment color target. Sonic Unleashed Recompiled (PPSA99902, #4443) needs this read; #3219 and #7260 retain the existing title context. A fixture on unchanged main production code stops with:
Capture CB FMASK base/XOR independently from color, carry CMASK separately from color DCC, and validate the resident owner, extent/subresource and disjoint watched planes. Native samples are stored independently, so their FMASK view uses expanded indices. Descriptor mismatches, metadata stores (including same-value stores), missing/ambiguous owners and unsupported layouts throw. No guest metadata publication or reusable recipe is introduced.
The expanded value follows AMD PAL c5e80007, Gfx9Fmask::GetPackedExpandedValue. This is a reference-backed host representation, not a PS5 hardware measurement; remaining gaps are in technical debt. Descriptor normalization builds on Romans Pokrovskis/MarcZX100's #4790 work, with coauthor attribution retained. Its standalone compressed decoder is not included. The general #3219 gap stays open.
Earlier qualification used main
5f7aa5570c333997f650fc4d9ea5d7f80a89b510; its head6dd3501fba885b468d1b17602dd794290975caf8retains the explicit fixture-lambda capture and adds the reviewed eight-sample capability gate to qualified rebase70bc319c34c0cf0b4695deb043d32bfb9c529f8c. Production is unchanged. Thanks @blawesom for identifying the Linux journal size guard:Related #8429 expands uncompressed FMASK storage formats and still rejects compression; it does not implement this tracked native-owner path. Shared insertion points need coordination if it merges first.
Tested
Main refresh — 2026-10-22
Current head
b8c6a94572314facbb39cf067cd25be867e6a741incorporates main8499ea52e571b0edfc1feecfd3f6b9944012b359, preserving published6dd3501fbaas an ancestor. The topic's exact added/removed lines are unchanged. Main's resident tracking, per-layer refresh, resource-cache and shader-data changes are retained. This does not incorporate #9597; the agreed #9597-before-#7948 merge order and subsequent combined-layout check still stand.Affected-library, graphics and actual execution-fixture targets rebuild on Windows 11 / WinLibs GCC 15.2 r7. 13 fresh passes: CPU graphics once; native FMASK three times per RTX 5080/Radeon Graphics; native MSAA vertex input, sample-target and readback once per GPU. The FMASK runs retain expanded-index, owner/descriptor rejection, metadata invalidation and recreation assertions. Physical devices and loaded Khronos 1.4.363 verified, required Vulkan, app shader cache/journal disabled: zero VUIDs, validation errors/warnings, skips or timeouts; every invocation below 30 s. Literal main's matching graphics, sample-target and readback groups pass with the same diagnostic counts. Other earlier paired groups retain their original pins.
Cppcheck then clang-tidy on all nine changed C++ translation units completes in 205.209 analyzer seconds without parser/configuration failures or timeouts. Eleven Cppcheck and nine clang advisories were inspected: nineteen diagnostic contexts already occur on main; the remaining checked-allocation context is unchanged from the previous published head and checks allocation before memset. No suppression, auto-fix or static-clean claim. Conventions/whitespace pass. Historical full builds, Linux/peer results and negative controls below retain their pins. No fresh title/FPS or broader compressed-FMASK/publication support is claimed.
Latest fixture correction: 6dd3501fba, addressing the llvmpipe review. Skip native FMASK before drawing when multisampled storage is unavailable or
framebufferColorSampleCountslacksVK_SAMPLE_COUNT_8_BIT, and print the requestedskipped, the device does not ...reason. Production and the eight-sample positive assertions are unchanged.NativeFmask(): that fixture resets its device internally. Keeping the context alive across the call retained its shared buffer pool; two local development runs completed the FMASK assertions but then reportedVUID-vkDestroyDevice-device-05137and crashed during teardown. The submitted scope correction removes that regression.1 | 4color samples. Synthetic skipped JUnit passes both Linux and Windowscheck_skips.pypolicies. These controls are not a fresh full-fixture Linux/lavapipe runtime result.9a97ac784da5d40cc7b7d968898ffbf5b8b5377a; that newer composition was not executed. Earlier full-build/main comparisons retain their stated pins. A fresh maintainer Linux CI run is still needed; the preceding run also failedagc_driver_sgpr_pattern_fill_keys, which this fixture-only patch does not address. No new title or performance claim.Previous fixture capture correction at ed373fa
Previous fixture capture correction:
ed373faf9e3635a3bba9c3b9d85d39f5000a3d5a. The Linux CI failure at70bc319c34merged onto main1a48337f13is an uncapturedsentinelin the nested refusal-output predicate. Explicit[sentinel]capture fixes that compiler error; no production code changes.d0852defa2a5fbc7f64ab20abddb7e1c24733345; no execution claim for that newer composition. The previous full Windows build and 78-check paired-main matrix below retain their original pins; they were not repeated for this fixture-only capture correction.Windows 11 Enterprise 26200, supported WinLibs GCC 15.2.0 r7/UCRT, Release, SPIRV-Tools enabled. NVIDIA GeForce RTX 5080, driver 610.62 / 32.0.16.1062; AMD Radeon(TM) Graphics, driver 32.0.21036.18. No performance claim.
Previous rebase qualification (retained pins): head
70bc319c34, production-main control5f7aa5570c, same machine and physical GPUs:libs,relinkerand selected fixture targets pass at the tested head. Main control builds the selected fixtures and their dependencies; no full-main build or full-suite execution claim.fmaskRange.reset();. All twelve processes have zero Vulkan diagnostics, skips or timeouts.1d41645527.de02d8c791fails the actual journal compilation at800 == 784;fa9f22290dcompiles. At00215dbf82, the graphics target builds and journal, long-path journal and graphics each pass three fresh CPU/mock-Vulkan processes. State.hpp, PipelineJournal.cpp and Graphics.cpp blobs match the final head. No full Linux build or physical Linux GPU result is claimed.3d7b744a8e/maind50ec76da0: Cppcheck 2.20 then clang-tidy 23.1.3 over all nine changed C++ translation units: 192.971 analyzer seconds, no parser/configuration errors or timeouts. Ten Cppcheck findings and one clang-tidy finding were inspected. Ten had unchanged seven-line source contexts on that main base; the allocation warning overlooks this PR's throwing check directly before memset. Other findings concern batch flow, cache lifetime, pass-by-value/initialization suggestions and existing journal/timer paths. They are not suppressed or presented as a clean main analyzer result.Historical AMD DCC-clear assertion failures remain recorded in #7936; that separate matrix was not rerun for this refresh. No fresh title run, gameplay unblock, console-equivalence or FPS result is claimed. The unsupported compressed snapshot/publication cases remain explicit refusals.
Agreed integration order: #9597 before #7948, confirmed in this reply. After #9597 merges, rebase this PR, preserve both sets of target fields and update the shared State size assertion to the actual combined layout; rerun affected validation. The combination has not been tested.
Conventions and whitespace checks pass. Overlap coordination remains with #6612/#6959 (shared journal guards), #8223 (fixture edits), #8429 (complementary uncompressed decoder expansion) and our dependent publication stack. The #8429/#6612 author confirmed ordering and shared edits; combinations have not been qualified together. Merged #7650's guard/debt changes are retained, and its new cached-image regression is included in the matched runs. Already-conflicting PRs remain incompletely compared by the overlap audit.
Main advanced during qualification. Source review through
7526640c3c1c5ea236c33b43b854681e8d169745merges cleanly and leaves this patch's FMASK lookup, owner tracking, state and recipe codec unchanged. Its write-only render-pass batching and storage-cache budget changes are outside these FMASK edits. The matrix above retains its actual tested head/base; the newer merged composition was not executed. No claim of testing a later main revision is made.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)