freedreno, tu, ir3: Fix gl_PrimitiveID for tessellation
We were using the wrong mechanism for the user-visible gl_PrimitiveID
, conflating the index in the buffer and gl_PrimitiveID
. This breaks gl_PrimitiveID
with subdraws and gl_PrimitiveID
in the FS when tess (but not GS) is enabled. It turns out that there is some dedicated HW to handle this, which was missed in the initial tess reverse-engineering.