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)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 19 Nov 2019 23:02:06 +0000 (18:02 -0500)
commitdb0c89d4bffa01ab15dfa819dbb518739131e1a9
tree7908350fbcce56ef4030fc6a1e677cf315bd868d
parent610fb0e19cb5eb83677b485bb931e3f71e976f4d
st/mesa: keep serialized NIR instead of nir_shader in st_program

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

If shader_has_one_variant is true and the shader is uncached, the first
variant is created from nir_shader, otherwise the first variant and
all other variants are created from serialized NIR.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
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