mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
Once its D32S8 target imports, The Grinch: Christmas Adventures (PPSA07656) samples the depth plane through a T# with no metadata (META_DATA_ADDRESS 0, not pipe-aligned) while the target has its HTILE. The pipe/bank XOR and ITERATE_256 match. CheckResource required the descriptor's metadata to be the target's HTILE and stopped the title with "native multisample depth sampled metadata or XOR mismatch". The host image keeps the depth decompressed, so a descriptor that reads the plane without metadata reads the values a metadata-aware one does. CheckResource now accepts a descriptor with no metadata at all beside one naming the target's HTILE, when its address, format, XOR and ITERATE_256 match. A descriptor with any other metadata keeps refusing. Assumption: on hardware such a read returns the decompressed depth only once the guest has expanded the plane (an in-place expand with compression disabled). Main draws an in-place expand as an ordinary draw that writes the depth attachment (DB_RENDER_CONTROL compress-disable bits are not refused), over a host image that already holds the decompressed depth, and has no out-of-place expand for multisampled planes. Nothing here observes whether the guest expanded first; a title that samples the plane unexpanded gets the decompressed values instead of the raw plane. Tested: agc_driver_native_depth_separate_stencil samples the separate stencil target through a descriptor without metadata, before and after raster writes and after a depth-only HTILE fill, and gets the depth. The same descriptor with another XOR and one naming other metadata are refused. Without the change the first sample refuses "native multisample depth sampled metadata or XOR mismatch".