fix(agc): publish native multisample depth over a colour alias its owner took in #16301
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16301"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-11-06T06:36:58Z.
What
fix(agc): publish native multisample depth over a colour alias its owner took inA native D32S8 owner can take in a multisampled colour target that lies over one of its planes. There are two such cases:
The guest publication from #13021 refused whenever any colour target was resident over a plane. Ghost of Tsushima has both kinds of alias over its 2-sample D32S8 target.
Why the owner's bytes are newer. If the colour target has not cleared, drawn or taken a fill since the owner took its content in, every depth or stencil write of the owner came after the target's last change. The published bytes are then what the memory holds. A fill over a plane is also noted to the depth owner, and publication already refuses while such a fill has not been applied. So a stencil-plane alias's latest fill is always one the owner has absorbed.
The change:
Test:
agc_driver_native_depth_publicationgets five cases, each for 2, 4 and 8 samples:On
mainthe test fails withAGC graphics: native multisample depth publication over a resident colour target is not implemented. With the change it passes.Tested
Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release.
relinker --windows --registry --module-dir prospero.maine322066f82it stops as quoted above, at +270 s with a cold cache and +60 s with a warm one.ctest -R '^agc_driver_native_depth_publication$'fails onmainwith the message above and passes with the change.ctest -R "agc_driver.*(depth|multisample|msaa|stencil|alias|fmask|dcc|cmask|htile)"passes 114 of 114, andpatched_librariespasses.ctest -V -R agc_driver_native_depth(17 tests) onmainand on this change, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.was not found but was requested by env var VK_INSTANCE_LAYERS.Insert instance layer "VK_LAYER_KHRONOS_validation"32 times (VK_LOADER_DEBUG=layer).VUID-line.mainonlyagc_driver_native_depth_publicationfails, with the title's message.agc_driver_native_depth_driver_queued_fillskips in both.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)compute shader 0x20001f3500: AGC graphics: native multisample depth publication over a resident colour target is not implemented)Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-07T17:55:54Z.
Review: COMMENTED
Windows check of head
af10404d23, merged ontomain4e44ed59b2(clean merge), withmainfrom 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.mainstencil_view,uniform_planesandpublicationnative_depth_clearsmain, nothing new--publication, soagc_driver_native_depth_publicationcovers them: it passes in every run on the NVIDIA GPU. On the Intel iGPU that test already fails onmain(native D32S8 publication lost live samples, HTILE, padding or guest writes) in the earlier cases, so the new ones never run there; this run says nothing about them on that GPU.publication,retirement,aliased_stencilandexpand_gateeach took about 26 s, against under 2 s normally, andnative_depth_clearspasses in the other runs on both GPUs.VK_LAYER_KHRONOS_validation.AI-assisted: yes.