mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
DecodeShaderStages accepted only clockwise triangle patches and no HOS level clamp narrower than [1, 63], so terrain drawn as TRI_CCW quad patches with VGT_HOS_MAX_TESS_LEVEL 9 aborted. Quad domains and TRI_CCW now decode and emit Quads and VertexOrderCcw; isolines, other partitionings and point or line output still throw. VGT_HOS_MIN/MAX_TESS_LEVEL are read per draw and pushed in the last 8 bytes of the pre-rasterization push constant slot, where the hull reads them to clamp its factors; they stay out of every key and the recompile request, so one hull serves every level. Zero, negative and NaN outer factors still cull; clamps outside 0 <= min <= 63, max >= 1, min <= max throw. Quad hulls write four outer and two inner factors at a 24-byte stride, the layout Mesa's TF ring store uses.