Repository navigation
feat(agc): sample native multisampled depth attachments - #5496
Conversation
77c1fbc to
08e15d5
Compare
08e15d5 to
6733508
Compare
|
Checked the newly surfaced overlaps at main bf8dc61. #5445 imports uniform guest color memory; #5499 performs a DB depth-to-color copy. Neither duplicates descriptor-based native-depth sampling here or the release retirement in #5524. @codingreapermaps: #5499 and this PR share sampled-depth image/capability setup. I propose merging #5496 then #5524 first, so your copy path can reuse that foundation and skip inactive owners in its new lookup. If #5499 lands first, I can rebase this pair instead. The separate copy eligibility needs to remain explicit: your no-HTILE/two-sample clear0.375 fixture differs from this PR's creation-proven numeric sampling subset; this is a source composition check, not runtime validation of your PR. @nicolasabosch: #5445 builds on #4820's color lookup. The inactive-owner correction is being validated in our existing #4820 comment. #5445's uniform import makes a no-resident lookup a supported path, so the important remap control there is selecting the new contents rather than imposing #4820's current no-draw refusal. The functional prerequisites for this PR remain #4820; #5524 depends on this PR. AI-assisted: Codex. |
751ca8d to
7b8996a
Compare
7b8996a to
db71c52
Compare
|
@Gashrod1 Implemented and tested the narrow ordering correction in head804c1b390, rebased onto main411e5e6d9. The existing stencil byte-format filter now runs before native multisample routing. The CPU regression covers D16S8/D24S8/D32S8 ×2/4/8 samples:27 color aliases are declined and18 plane-reader recording checks remain. The native device fixture checks a single-sample R11G11B10 request at a D32S8 stencil address is declined while actual stencil access retains its unsupported-import refusal. Published615 production with test-only additions builds and fails on the erroneous recording requirement;804 passes. Full Windows app/libs/checkers and14 groups once+5 under NVIDIA/AMD selectors pass without failures/skips, max5.85142s; runtime device identities are verified. Combined depth/stencil import and Windows tracking remain unsupported. This is classification validation, not a replay of DAVE THE DIVER or verification of its other bypasses. Items1/4 remain associated with #5554's completion-proven clear work. |
6154640 to
804c1b3
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the update, the head builds on its own now. I rebuilt it merged onto current main (the only conflict was the include list in MultisampleTarget.cpp:3, keep both ColorTargetLayout.hpp and DepthSurface.hpp), agc_driver_native_multisample_depth passes. I then mutated the code to check that the new tests pin the behaviour, and two mutants survive:
Graphics/src/Draw.cpp:2115: deleting theRequireNoNativeDepthFeedback_nid_no_patch(...)call leaves every test green.tests/execution/NativeMultisampleDepth.cpp:536-547calls the function directly, so nothing checks thatDrawactually calls it before the pipeline is created. Please add a case that goes through a draw sampling the attached native depth image and expects the refusal.Graphics/src/DepthSurface.cpp:67: changingif (depth == 0u) return clearDepth == 0.0f;toreturn true;also passes. The clear-value refusals atNativeMultisampleDepth.cpp:668-674never use all-zero HTILE withclearDepth = 1.0f, which is the case that would import a wrong initial depth. Please add it (and the mirror:0xfffc0000/0xfffffff0words withclearDepth = 0).
Please also rebase onto main for the include conflict above and re-run agc_driver_native_multisample_depth, depth_surface_reuse and guest_texture_resource.
Not covered by what I could run here: the HTILE encodings and ITERATE_256 behaviour follow Mesa/PAL, not measured on a console, and nothing ran on NVIDIA/Windows.
Reject native sampled views of the depth image attached by the same draw before pipeline creation. Keep unrelated views, other devices and the single-sample path unaffected. Add unrun native-view refusal and scope controls; full dependency-stack build and runtime validation remain pending.
804c1b3 to
008f915
Compare
|
@adriadam10 Addressed both surviving mutants in 008f91501: the regression goes through the driver draw, and the four contradictory HTILE/clear cases are covered. All three fault controls fail for the intended assertion ×5 on NVIDIA and ×5 on AMD; production restored/rebuilt,14 groups pass once+5 per GPU. Depth-reuse/guest-texture cases run inside Merged: #5496 landed as |
|
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.
|
|
Independent test of 008f915 on a title: DAVE THE DIVER (PPSA19115), Windows 11, NVIDIA GeForce RTX 5060 (596.36). Same session, same dump, only the libs change:
So this PR moves the title past the ITERATE_256 refusal on current The next stop is outside this PR: a 2x Z_X depth texture sampled before any draw, with an all-zero HTILE. I have a follow-up for it (undrawn Z/D 64 KiB swizzle textures, and Z ones whose HTILE is all cleared, load as a uniform value). With it on top of this PR the title reaches frame 17 and stops on the D32S8 native depth case I described on #5554. I will open it once this PR is merged, since it is only reachable after it. AI-assisted: yes |
adriadam10
left a comment
There was a problem hiding this comment.
Checked the new head: the two surviving mutants now fail (removing the RequireNoNativeDepthFeedback_nid_no_patch call in Draw.cpp:2203 and return true at DepthSurface.cpp:74 both fail agc_driver_native_multisample_depth). Built merged onto current main with no conflicts; agc_driver_native_multisample_depth and agc_driver_graphics (which runs depth_surface_reuse and guest_texture_resource) pass. agc_driver_tessellation segfaults here, but it does the same on a plain main build. Merging once the full Build is green.
What
Support numeric sampling of resident D16/D32 depth attachments with 2, 4 or 8 samples, one Z_X slice/mip, and a proven initial zero/one HTILE clear. Preserve ITERATE_256, attachment identity and image lifetime, and barrier depth writes before shader reads. Sampling an attached native depth image is refused before pipeline creation.
The existing stencil byte-format filter runs before multisample routing, so a color texture at a stencil-plane address is not claimed as a depth reader. Stencil import, comparison/raw-bit/storage/array sampling, unproven guest/external GPU changes and unsupported metadata/publication transitions remain explicit refusals. Retirement and completion-proven clears are separate follow-ups (#5524/#5554).
The conditional Sonic Unleashed Recompiled PPSA99902 need and pinned title controls are documented in #3262 and bring-up #4443. This focused PR builds independently; its current head has not been replayed on the title. The retained bring-up integration contains additional work and its progress is reported separately.
Sources: PAL ITERATE_256 bit10, descriptor construction, Addrlib dimensions. HTILE restrictions follow the Mesa sources recorded in #3262 and library debt. PS5 equivalence has not been measured on a console.
Tested
Head 008f91501, base main3c87cdfda, Windows 11 Enterprise 26200, WinLibs GCC15.2.0, Release, bundled dependencies, SPIRV-Tools enabled:
0xfffc0000/0xfffffff0with clear0.depth_surface_reuseandguest_texture_resourcecases execute throughagc_driver_graphics; they are not separate CTest registrations.The earlier stencil-ordering control and title/source history remain in #3262. Current evidence covers Windows fixtures; Linux, a full CTest suite and an isolated title replay were not run for this head. No performance claim.
Checklist
main(tested3c87; clean merge intoab9 checked); no other open PR implements the same functions.mdfiles or images added to the repository