mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
TessellationLowering refused every domain-program read of the off-chip ring outside its patch's control points, so domain programs that read the hull's patch constants, like the quad terrain domain in Ghost of Yotei at 0x8000 - 208 * (rel + 1), aborted. Such reads now lower to a new PatchInput kind and become Patch inputs. Hull outputs and domain inputs place a constant by its off-chip address modulo the record stride, in a record-sized array at location ceil(hsStride / 16); each program derives both on its own, so the two interfaces match although they compile separately. Domain reads at an address that does not move with the relative patch, across more than one record or inside the control-point region still throw, as does a domain program that reads patch constants but no control point. Hull patch-constant writes now take the same bound: above the control points of all NUM_PATCHES patches, not just one patch's.