freedreno/a6xx: Track location of gl_Position out as we link it
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 13 Sep 2019 22:20:05 +0000 (15:20 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Wed, 18 Sep 2019 23:59:10 +0000 (16:59 -0700)
commitbe38480064a78c4a4391f87e45f7dd78dc88edce
tree08324f0963a69dbe6272601711a294e59da078ef
parentd38e0a6326310d8c92e8344a5feeda1e869760e8
freedreno/a6xx: Track location of gl_Position out as we link it

When using xfb and rasterizing, the fragment shader may have fewer
inputs than the vertex shader outputs. We can't rely on gl_Position to
be placed at fs->total_in, but have to instead remember where we add
it in the link map and use that location.

Fixes 100+ tesselation dEQPs under

  dEQP-GLES31.functional.tessellation.primitive_discard.*
  dEQP-GLES31.functional.tessellation.user_defined_io.*

Reviewed-by: Eric Anholt <eric@anholt.net>
src/freedreno/registers/a6xx.xml
src/freedreno/vulkan/tu_pipeline.c
src/gallium/drivers/freedreno/a6xx/fd6_program.c