st/mesa: keep serialized NIR instead of nir_shader in st_program
authorMarek Olšák <marek.olsak@amd.com>
Sat, 2 Nov 2019 03:55:58 +0000 (23:55 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Mar 2020 18:17:46 +0000 (18:17 +0000)
commita398a9d7e7f8fe19eaa0c33b36ab6816472b698c
tree4102ce11b129b6d757ac35ac64b7cf75cc59422a
parent86d270cde49f4d74d5c1f45851ce571686ca01cc
st/mesa: keep serialized NIR instead of nir_shader in st_program

This decreases memory usage, because serialized NIR is more compact.

The first variant is created from nir_shader for uncached shaders.
All other variants are created from serialized NIR.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2909>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2909>
src/mesa/state_tracker/st_cb_program.c
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/st_program.h
src/mesa/state_tracker/st_shader_cache.c