iris: Fix TES gl_PatchVerticesIn handling.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 8 Mar 2019 04:14:59 +0000 (20:14 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Mar 2019 21:07:16 +0000 (14:07 -0700)
commit04ff2e3fbbb981606aa4d469316f6f00cc8083db
tree8653b67662e0cc8840e4ea87448482918af9b19a
parent2f51cb5e67524d55508ec7bc1ee2a9d4d1087291
iris: Fix TES gl_PatchVerticesIn handling.

1. If we switch the TCS for one with a different number of output
   vertices, then the TES's gl_PatchVerticesIn value will change.
   We need to re-upload in this case.  For now, re-emit constants
   whenever the TCS/TES are swapped out.

2. If there is no TCS, then we can't grab gl_PatchVerticesIn from
   the TCS info.  Since it's a passthrough, we can just use the
   primitive's patch count (like the TCS gl_PatchVerticesIn does).

Fixes KHR-GL45.tessellation_shader.single.max_patch_vertices and
KHR-GL45.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_PatchVerticesIn.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/gallium/drivers/iris/iris_program.c
src/gallium/drivers/iris/iris_state.c