feat(agc): publish a written native multisample D32 owner without stencil #16501
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16501"
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 JJenkx on 2026-11-06T22:58:38Z.
What
#13021 publishes a host-written native multisample D32S8 owner to its guest planes when the guest reads them. A native owner without stencil (
VK_FORMAT_D32_SFLOAT) is imported and guarded the same way, butPublishToGuestrefused it: a guest read of a host-written D32 owner threwsample-preserving guest publication of native multisample depth is not implemented for this owner.This publishes a D32 owner whose HTILE is depth-only, through the same path, without a stencil plane:
NoteHostWritecaptures the owner's planes (depth and HTILE) when the host first writes it, as for D32S8.PublishToGuestaccepts a D32 owner with two planes. It reads back and retiles only the depth plane (plane 2, the stencil plane, only when present). HTILE is stored expanded with the depth aspect only. That gives the same depth-only word,0xfffc000f, that a D32S8 owner with a separate stencil plane already gets.VUID-vkCmdCopyImage-aspectMask-00142/00143) and the published samples were wrong.Still refused, unchanged: D16 owners, and D32 owners whose HTILE keeps stencil fields. I don't know what the console leaves in those stencil fields when there is no stencil.
CheckDrawFeedbackkeeps covering that refusal. ThelibSceAgcDriverdebt entry is updated.Tested
Arch Linux 7.2.11, Ryzen 9 7950X, RX 6650 XT (RADV Mesa 26.2.6), GCC 16.2.1, Release, on
main1080643b1e. Tests ran withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1and Khronos validation 1.4.363 loaded;VK_LOADER_DEBUG=layer'sInsert instance layerlines confirm it.New check,
CheckDepthOnlyPublicationinagc_driver_native_depth_publication, at 2, 4 and 8 samples:0xa5. A draw writes0.25 + (sample + 1) / 16per sample.0xa5, every HTILE word must be0xfffc000f, and the owner must stay resident with the same view.0.5and a second read must publish again.Results,
ctest -R 'native_depth|native_multisample|depth_publication|write_track|guest_memory|multisample', 52 tests:--repeat until-fail:3), with noVUID-messages.agc_driver_guest_memory_lifetime_converted(needs the relinker and its fixture module) was run separately, three of three.DepthSurface.cpprestored frommainfailsagc_driver_native_depth_publicationon the refusal above. Everything else passes.Independent runs on other GPUs (both on head
b43c96c27b, without the validation layer):agc_driver_native_depth_publicationpasses 3 of 3, and each run checks 2, 4 and 8 samples.agc_driver_native_depth_publication, with the new check, passes 3 of 3.A title, Resident Evil Village (PPSA01556, #5169), 01.210.000,
APS5_PLAYGO_UNLISTED_CHUNKS=installed. Inputs: Cross at 30 and 40 s, Up at 48 s, Cross at 52 s, then Cross every 12 s, which answers "Play in VR Mode?" with No.main: it stops at 78 s on this refusal, from a compute shader reading a 128x64 4x D32 owner with a depth-only HTILE and no stencil.external GPU writes over native multisample depth are not implemented. With #15941 also merged, the stop is the same.So this does not unblock the title on its own.
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)Requireline inPublishToGuest; whichever lands second needs a one-line merge.Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T14:46:32Z.
Review: COMMENTED
Ran
b43c96c27bmerged onmain302864d48con Windows 11 x64 (WinLibs GCC 15.2), on an NVIDIA laptop GPU (Turing, driver 621) and an Intel iGPU (driver 101.70xx), withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Khronos validation layer 1.4.368),ctest -R '^agc_driver_native_(multisample_depth|depth_)' -V.mainmain+ only this PR'sNativeMultisampleDepth.cppdiffDepthSurface.cppchange, the new case makesagc_driver_native_depth_publicationfail with "sample-preserving guest publication of native multisample depth is not implemented for this owner". With it, the test passes both times.agc_driver_native_depth_publication(withstencil_viewanduniform_planes) already fails onmain(#16883), so Intel can't show the fix. The same three fail with the change, and nothing new fails there.NativeMultisampleDepth.cppgained 196 lines onmainsince the branch point.was not found but was requested by env var VK_INSTANCE_LAYERS, and no log on either side has aVUID-. To be sure validation messages reach these logs, the same layer with best practices on printed 28BestPractices-warnings into anagc_driver_recorderlog on each GPU.AI-assisted: yes.
Pull request closed