mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-03 12:57:27 +00:00
A bind of slice 1 or later of a depth array read the slice's HTILE but took its clear only when all its words were equal, because the HTILE word layout of those slices is not modelled. Neither step needs the layout: the clear is taken when every word of the range has ZMask 0 (a check over the set of words), and the store-back rewrites each word in place from its own bits. The value the surface is cleared to is DB_DEPTH_CLEAR, which the DB's depth test reads for every cleared tile whatever its Min/Max Z (HTILE_Z_CLEAR_REG in Mesa's src/amd/common/ac_descriptors.h), the same rule slice 0 already follows. PPSA05684 resets the four slices of its 2048x2048 D16 sun cascade array every frame by writing ZMask 0 words with Min/Max Z 0 or 1 into their HTILE. Slices 1 to 3 kept the previous frame's depth, and the main menu lost its volumetric sun shafts and sunlit foliage. agc_driver_depth_fast_clear_submit: slice 1 with words alternating 0x0 and 0xfffffff0 takes the clear, stores them back expanded and leaves slice 0's HTILE alone. The refusal case keeps a word left expanded and is renamed. AI-assisted: yes