turnip: don't set SP_FS_CTRL_REG0_VARYING if only fragcoord is used
authorJonathan Marek <jonathan@marek.ca>
Tue, 17 Dec 2019 23:15:45 +0000 (18:15 -0500)
committerJonathan Marek <jonathan@marek.ca>
Thu, 19 Dec 2019 00:03:37 +0000 (19:03 -0500)
commit5785bcc8a0ff9c5072c647337bf73f696c63cbe6
tree2bf7bbbd8db36177d7a5b2bf06ef97dc7c2f1948
parent4a59bc6df2baf3be1d8bc8dbcd04b7b02df13560
turnip: don't set SP_FS_CTRL_REG0_VARYING if only fragcoord is used

Fixes artifacts in the subpasses demo, which has a shader using fragcoord
without any varyings. It looks like setting this bit when there are no
varyings can cause weirdness in some cases (without this change, if the
previous shader had <= 8 varyings it would work, but with 9 varyings it
would have artifacts).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3143>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3143>
src/freedreno/vulkan/tu_pipeline.c