freedreno/ir3: move nir finalization to after cache miss
authorRob Clark <robdclark@chromium.org>
Tue, 23 Jun 2020 17:09:30 +0000 (10:09 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 26 Jun 2020 15:55:21 +0000 (08:55 -0700)
commit189a0fecf54139cea128731fcc6ae00d46565cd4
tree498d07ca111c6405317ddc3a63509ee4d9e3742b
parentf97acb4bb4b18f127b62aa8eeb57cdf3d8fe3aa2
freedreno/ir3: move nir finalization to after cache miss

In cases where every variant is a shader-cache-hit, we never need the
post-finalize round of nir opt/lowering passes.  So defer this until
the first shader-cache-miss to avoid doing pointless work.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
src/freedreno/ir3/ir3_shader.c
src/freedreno/ir3/ir3_shader.h