radv: use serialized NIR for graphics libs with the RETAIN flag
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 27 Mar 2023 16:00:39 +0000 (18:00 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 30 Mar 2023 09:02:20 +0000 (09:02 +0000)
commitd147cf5a566323ea9fcadfeaf0ee9e2676fd0d59
tree833a9e60a221eb275272a80e52054c1a727ec374
parent5e413f49198769298666939e361e92715f417b1b
radv: use serialized NIR for graphics libs with the RETAIN flag

Cloning NIR shaders consumes too much RAM and this can easily explode
in memory for games that create a ton of graphics libraries. Using
serialized NIR shaders help considerably.

This reduces RAM usage in dota2 with GPL from 3GiB to 400MiB.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22143>
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_private.h