freedreno/ir3: Fix duplicated fine derivatives instructions.
authorEric Anholt <eric@anholt.net>
Tue, 30 Jun 2020 19:17:10 +0000 (12:17 -0700)
committerMarge Bot <eric+marge@anholt.net>
Sat, 18 Jul 2020 00:43:44 +0000 (00:43 +0000)
commit3d7d5d220b5e5c2b48fa522b16ced5be0edad94f
tree77647d8ef97bbb335705e2efaee4ef8d78db4ed9
parent862d85a63ff6942bc0d30ea3bb42a66433d3c936
freedreno/ir3: Fix duplicated fine derivatives instructions.

legalize_block() can get run multiple times, which I didn't notice when
adding fine derivs support.  Other instruction clones change things such
that the legalization won't trigger again, but that didn't apply to the
DS.PP legalization.  To keep someone else from tripping over this, split
the one-shot legalization out of the iterative sync flag application.

Fixes failures in dEQP-VK.glsl.derivate.dfdxfine.*

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3198
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5699>
.gitlab-ci/deqp-freedreno-a630-fails.txt
src/freedreno/ir3/disasm-a3xx.c
src/freedreno/ir3/instr-a3xx.h
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_legalize.c