This series mainly changes the way patch constant outputs are generated
in hull shaders to always use a private array variable. This is done to
fix several issues in the current imlementation, and to avoid excessive
complexity in dealing with patch constants which stem from DXBC's design:
1) Tessellation factors and regular patch constants share the same
�� ��register space in DXBC and can both be dynamically or statically
�� ��indexed. The current implementation only works correctly in case
�� ��tessellation factors do not share registers with regular outputs,
�� ��and does not support all indexing patterns, leading to invalid
�� ��code being generated in some cases.
2) Join phases can read patch constants written by a fork phase,
�� ��also with dynamic indexing. However, the index ranges used by
�� ��the join phase are not known at the time the fork phase is
�� ��compiled.
With these changes, tessellation shaders work correctly in Shadow of
the Tomb Raider, which previously contained invalid SPIR-V and would
crash the game if enabled.
Note that enabling the tessellation option in the game triggers a
separate issue related to descriptor updates, which will have to
be addressed separately.