<div dir="ltr"><div>Hi Philip,</div><div><br></div><div>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.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 17, 2019 at 5:57 AM Philip Rebohle <<a href="mailto:philip.rebohle@tu-dortmund.de">philip.rebohle@tu-dortmund.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
This series mainly changes the way patch constant outputs are generated<br>
in hull shaders to always use a private array variable. This is done to<br>
fix several issues in the current imlementation, and to avoid excessive<br>
complexity in dealing with patch constants which stem from DXBC's design:<br>
<br>
1) Tessellation factors and regular patch constants share the same<br>
   register space in DXBC and can both be dynamically or statically<br>
   indexed. The current implementation only works correctly in case<br>
   tessellation factors do not share registers with regular outputs,<br>
   and does not support all indexing patterns, leading to invalid<br>
   code being generated in some cases.<br>
<br>
2) Join phases can read patch constants written by a fork phase,<br>
   also with dynamic indexing. However, the index ranges used by<br>
   the join phase are not known at the time the fork phase is<br>
   compiled.<br>
<br>
With these changes, tessellation shaders work correctly in Shadow of<br>
the Tomb Raider, which previously contained invalid SPIR-V and would<br>
crash the game if enabled.<br>
<br>
Note that enabling the tessellation option in the game triggers a<br>
separate issue related to descriptor updates, which will have to<br>
be addressed separately.<br>
<br>
<br>
</blockquote></div>