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 <mesa/mesa!2909>
Part-of: <mesa/mesa!2909>
45 jobs for !2909 with st-nir-less-memory in 24 minutes and 20 seconds (queued for 5 seconds)
detached
Status Job ID Name Coverage
  Container
passed #1904371
aarch64
arm_build

00:00:20

passed #1904372
aarch64
arm_test

00:00:19

passed #1904364
x86_build

00:00:20

passed #1904369
x86_build_old

00:00:18

passed #1904366
x86_test-gl

00:00:17

passed #1904367
x86_test-vk

00:00:21

 
  Meson X86 64
passed #1904375
meson-clang

00:10:09

passed #1904376
meson-clover

00:08:07

passed #1904377
meson-clover-old-llvm

00:08:16

passed #1904374
meson-main

00:03:46

passed #1904373
meson-testing

00:08:39

passed #1904378
meson-vulkan

00:03:05

 
  Scons
passed #1904381
scons

00:08:58

passed #1904382
scons-old-llvm

00:03:46

passed #1904379
scons-swr

00:07:39

passed #1904380
scons-win64

00:03:35

 
  Meson Misc
passed #1904384
aarch64
meson-arm64

00:01:27

passed #1904385
aarch64
meson-arm64-build-test

00:01:58

passed #1904383
aarch64
meson-armhf

00:02:25

passed #1904386
meson-i386

00:04:52

passed #1904389
meson-mingw32-x86_64

00:04:05

passed #1904388
meson-ppc64el

00:05:51

passed #1904387
meson-s390x

00:03:06

 
  Llvmpipe
passed #1904393
llvmpipe-gles2

00:04:13

passed #1904394
llvmpipe-traces

00:00:39

passed #1904391
piglit-glslparser

00:04:55

passed #1904390
piglit-quick_gl

00:09:04

passed #1904392
piglit-quick_shader

00:07:37

 
  Softpipe
passed #1904395
softpipe-gles2

00:01:50

passed #1904398
softpipe-gles31 1/4

00:02:07

passed #1904396
softpipe-gles3 1/2

00:04:52

passed #1904399
softpipe-gles31 2/4

00:08:59

passed #1904400
softpipe-gles31 3/4

00:03:36

passed #1904402
softpipe-gles31 4/4

00:03:35

passed #1904397
softpipe-gles3 2/2

00:05:03

 
  Freedreno
passed #1904406
db410c
arm64_a306_gles2

00:06:13

passed #1904403
mesa-cheza
arm64_a630_gles2

00:03:39

passed #1904405
mesa-cheza
arm64_a630_gles3

00:12:35

passed #1904404
mesa-cheza
arm64_a630_gles31

00:08:06

 
  Panfrost
passed #1904407
lava-sun50i-h6-pine-h64
panfrost-t720-gles2:arm64

00:07:14

passed #1904408
lava-rk3288-veyron-jaq
panfrost-t760-gles2:armhf

00:05:16

passed #1904409
lava-rk3399-gru-kevin
panfrost-t860-gles2:arm64

00:04:49

passed #1904410
lava-rk3399-gru-kevin
panfrost-t860-gles3:arm64

00:04:10

 
  Misc Tests
passed #1904411
lava-meson-gxl-s905x-libretech-cc
lima-mali450-test:arm64

00:08:26

passed #1904412
radv-polaris10-fossils

00:00:15