glsl/nir: free GLSL IR right after we convert to NIR
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 16 Feb 2022 03:41:45 +0000 (14:41 +1100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 24 Feb 2022 01:10:49 +0000 (01:10 +0000)
commit6eec8fcbfa6e90431d47919479debf76fb04b8b0
tree7c5b0d8a7eba6b79e078baebcba41b2be4680e20
parent0fda2ac4f09b81bc0dcd63ba9dd1c7134ffdb511
glsl/nir: free GLSL IR right after we convert to NIR

Gives us memory back faster which is useful for pathalogical CTS
tests.

The GLSL IR was previously used after converting to NIR for things
like building the GL resource list but we have had a NIR version
for this for some time and I don't believe there are any other
use cases left for keeping the old IR hanging around this long.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15127>
src/compiler/glsl/glsl_to_nir.cpp
src/mesa/state_tracker/st_glsl_to_nir.cpp