mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-31 12:35:51 +00:00
A draw with DB_RENDER_CONTROL.DEPTH_COPY ran as a compute pass over the whole surface, chosen when the viewport and scissor covered it. It now runs as the title's own draw: the precheck rewrites the draw's registers to bind no depth target and a driver-authored guest pixel program, then draws it through the normal path. The program reads POS_FIXED_PT, loads one sample of the Z_32_FLOAT plane through a T# built from the DB registers (DepthCopySourceWords), and exports it to color target 0 as 32_R, so only the pixels the draw covers are written, and the normal draw path orders it after the draws that rendered the plane. - The plane is decoded by decodeDepthPlane, factored out of decodeDepth, so its address, pipe-bank XOR and slice match the registered surface. - Two programs, one per source kind: image_load 2D_MSAA with the sample in s8, and image_load 2D. They are published with the null pixel program and prepared at use. - A multisampled plane is read from its host image or sample shadow without the guest-memory import checks of native multisample sampling, inside a DepthCopySourceScope opened by Graphics::Draw for draws whose decode found the multisampled copy program (State::depthCopySource). - The compute pass, its shader and the CopySample path are removed. - A new execution test draws depth over a triangle, copies it with the same triangle and compares the covered texels with a reference draw. Co-Authored-By: Claude Opus 5.5 <[email protected]>