Repository navigation
fix(agc): leave a single-sample view over a published native multisample depth owner to guest memory - #16365
Conversation
…ple depth owner to guest memory
|
Correction (rerun): my first run rebuilt only the main test target, but the test pattern also matched 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. |
✅ NVIDIA 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 (4, not counted against this PR)Validation IDs already present on main (9 IDs in 588 tests)Skipped (53)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. |
|
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.
|
…ished-depth # Conflicts: # core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
|
#15688 now merges The only conflict was in With the validation layer, I ran the description's command (now 57 tests):
|
gabichuuuuu
left a comment
There was a problem hiding this comment.
Windows check of head 4b409e76e8, merged onto main 4e44ed59b2 (clean merge), with main from the same build directory as the control.
Setup: Windows 11 x64, WinLibs GCC 15.2.0 r7, Release, full build. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -R '^agc_driver_native_depth_', 3 runs per GPU on each side.
| NVIDIA laptop GPU, driver 610 | Intel iGPU, same machine | |
|---|---|---|
main |
3 of 3 runs pass | 3 of 3 runs fail stencil_view, uniform_planes and publication |
| this PR | 2 of 3 runs pass all 20; run 3 timed out in native_depth_stencil |
the same three, plus publication_without_htile, 3 of 3 |
- The new
agc_driver_native_depth_single_sample_viewpasses in every run on both GPUs. - The timeout is this machine stalling, not the change: in that run a skipped test took 25.5 s and
aliased_depth_depth_only24 s, against under 1 s normally, andnative_depth_stencilpasses in the other runs on both GPUs. publication_without_htilecomes with the #15688 commits this branch merges. On the Intel iGPU it fails witha written D32S8 owner without HTILE did not publish its stencil samples and padding, the same D32S8 stencil pattern as the three tests that already fail onmainthere, and it passes on the NVIDIA GPU. I'm looking into that separately; it doesn't block this PR.- Not run with
VK_LAYER_KHRONOS_validation.
AI-assisted: yes.
|
We have a fix for the same descriptor on a downstream stack, with a test that may be useful here. A single-sample descriptor at the base of a native multisample depth owner reads the guest bytes through the ordinary texture path, the same cut as Where ours goes further is an owner the host has written since its last publication. It publishes first and then returns to the texture path: Our test, The two fit with one shared condition. Your uniform-plane case needs no publication; ours publishes when It is up as #16880, stacked on #9950 for now, since the test needs its D32 publication. If this PR lands first, I rebase #16880 on it and take the shared condition above. If you prefer, I can instead hand over the host-written case and its test as a commit on top of this PR. AI-assisted: yes |
|
#15688 now merges The only conflict was in With the validation layer, I ran the same command as before (
|
|
#15688 is merged now, so I merged With the validation layer, I ran the same command as before, now 62 tests:
I left |
|
#15707 is merged now, and its With the validation layer, the same command as before, now 63 tests:
|
|
@muhmuhkuh Thanks. I'd go with your first option: keep #16880 as its own PR and rebase it onto whichever lands first. Its test needs the D32 publication from #9950 (or #16501), which this PR doesn't have, so taking the host-written case here would make this PR depend on #9950. The shared condition looks right to me as the end state, with one correction: this PR's test does change under it. I tried it on this PR's earlier head
Neither run logged a |
|
#16363 is merged. It added With the validation layer, the same command as before, 64 tests:
|
|
Re-checked after #16363 merged: |
DepthSurface.cpp conflicted with #16365: its GuestHoldsSamples() member goes before PublishToGuest's declaration, which keeps this PR's bool PublishToGuest(DepthReadCause cause). The debt file conflicted with #16364 in the Native D32S8 guest publication entry: it keeps this PR's text, with #16364's change as "pending storage writes over a plane", and "a kept plane holding the host's bytes" shortened to "a kept plane of host bytes" to stay within 1000 characters.
What
A title can read the memory of a native multisample D32S8 target without HTILE through a single-sample view at the depth base. Assassin's Creed Mirage (PPSA13960) does: a compute reads mip 0 of an R11G11B10F chain it wrote over the planes, at the depth address (
resource 0x10f5d40000 3440x1936 x1 fmt 36against the owner1720x968 x4).DepthSurfaceTexturetakes every view at the base of an owner into the native path, and a single-sample view fails its identity check there:native multisample depth sampled identity or format mismatch.For an owner the host has not written since its import or its last publication (#15688), guest memory already holds every sample. The import only accepts planes that each hold one value, and a publication writes all samples back to the planes.
This change:
DepthSurface::GuestHoldsSamples: a multisampled owner without HTILE, imported for sampling, with no refusal, not written by the host since its import or publication;Tested
Linux 7.2.11, AMD Radeon RX 9070 XT, RADV (Mesa 26.2.6), Release with tests.
agc_driver_native_depth_single_sample_view(--single-sample-view), at 2, 4 and 8 samples, on a 200x130 D32S8 target without HTILE whose planes hold 1.0 and 0x5a. A single-sample R11G11B10F view (400x260,kStandard64KB) at the depth base:AGC graphics: native multisample depth sampled identity or format mismatch.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V -R "native_depth|native_multisample|depth_storage|depth_surface|agc_storage_|multisample_guest|repeat_storage_guard|cached_image|storage_flush_ordering|storage_one_slice|storage_read_during|storage_write_back|msaa_address_on_plane", 55 tests):VUID-line or "was not found but was requested". Both have the same 20WARNING-VkImageSubresourceRange-layerCount-compatibilitylines.tools/check_conventions.py --base fa590e435a: passes.compute shader 0x10b4c8ad00: AGC graphics: native multisample depth sampled identity or format mismatch(the read above). This change is one of four that move the title pastnative multisample depth plane without HTILE does not hold one depth value in [0, 1]: fix(agc): import a native multisample D32S8 target over uneven planes once its first draw wrote every sample #16363 (overwrite proof), fix(agc): publish native multisample depth next to a storage image whose pending units lie past its planes #16364 (pending units) and fix(agc): publish a reused native multisample depth target with the guest's undecided bytes, then retire its owner #15941 (or a change that starts a new owner under pending storage results). Its effect shows only together with the others, so the runs are in fix(agc): import a native multisample D32S8 target over uneven planes once its first draw wrote every sample #16363. In short, onmain5299939 + fix(agc): store storage results pending under a multisampled color target before it takes the memory #13963 (7d54822) + fix(agc): release a published native multisample depth owner whose plane a written storage view covers #15707 (a8c5df4), the run without the changes stopped at 484 s on that message, and none of the four runs with them stopped on it or on the identity mismatch (their stops, all later and separate: 452 s and 468 s, or the local VRAM guard at 482 s and 496 s).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)