Hi Philip,

Is the descriptor update issue expected to crash the game? Using these patches and tessellation I get a hard crash requiring reboot at the start of benchmark scene 2. Mesa 19.2.1 and AMD RX 580.

On Thu, Oct 17, 2019 at 5:57 AM Philip Rebohle <philip.rebohle@tu-dortmund.de> wrote:

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.