nir/gcm: allow derivative dependent intrinisics to be moved earlier
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 22 Mar 2019 04:32:22 +0000 (15:32 +1100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 20 Apr 2020 03:46:29 +0000 (03:46 +0000)
commitbf4a6c99d242022e6ad42af68682609401ffcd73
tree28d229ff79ee424c040b07f59f0e7ddc5c43fb02
parent50a6dd0d6534f802ca36b607ab5a453b531f4d78
nir/gcm: allow derivative dependent intrinisics to be moved earlier

We can't move them later as we could move them into non-uniform
control flow, but moving them earlier should be fine.

This helps avoid a bunch of spilling in unigine shaders due to
moving the tex instructions sources earlier (outside if branches)
but not the instruction itself.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4636>
src/compiler/nir/nir_opt_gcm.c