clover/nir: Copy global variables from libclc shader

We can't just copy functions from the libclc shader into the user
shader, but we also need to copy global variables where they exist and
are in use.

Signed-off-by: Daniel Stone <daniels@collabora.com>
48 jobs for !4323 with cl-use-libclc-spirv
latest detached
Status Job ID Name Coverage
  Container
manual #2219103
aarch64 manual
arm_build
manual #2219104
aarch64 manual
arm_test
manual #2219105
windows shell 1809 mesa manual
windows_build_vs2019
manual #2219099
manual
x86_build
manual #2219102
manual
x86_build_old
manual #2219100
manual
x86_test-gl
manual #2219101
manual
x86_test-vk
 
  Meson X86 64
created #2219109
meson-clang
created #2219108
meson-classic
created #2219110
meson-clover
created #2219111
meson-clover-old-llvm
created #2219107
meson-gallium
created #2219106
meson-testing
created #2219112
meson-vulkan
 
  Scons
created #2219113
allowed to fail
scons-win64
 
  Meson Misc
created #2219115
aarch64
meson-arm64
created #2219116
aarch64
meson-arm64-build-test
created #2219114
aarch64
meson-armhf
created #2219118
meson-i386
created #2219121
meson-mingw32-x86_64
created #2219120
kvm
meson-ppc64el
created #2219119
kvm
meson-s390x
created #2219117
windows docker 1809 mesa
meson-windows-vs2019
 
  Llvmpipe
created #2219125
llvmpipe-gles2
created #2219126
llvmpipe-traces
created #2219123
piglit-glslparser
created #2219122
piglit-quick_gl
created #2219124
piglit-quick_shader
 
  Softpipe
created #2219127
softpipe-gles2
created #2219130
softpipe-gles31 1/4
created #2219128
softpipe-gles3 1/2
created #2219131
softpipe-gles31 2/4
created #2219132
softpipe-gles31 3/4
created #2219133
softpipe-gles31 4/4
created #2219129
softpipe-gles3 2/2
 
  Freedreno
created #2219137
google-freedreno-db410c
arm64_a306_gles2
created #2219138
google-freedreno-db820c
arm64_a530_gles2
created #2219134
mesa-cheza
arm64_a630_gles2
created #2219136
mesa-cheza
arm64_a630_gles3
created #2219135
mesa-cheza
arm64_a630_gles31
 
  Panfrost
created #2219139
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64
created #2219140
mesa-ci-aarch64-lava-collabora
panfrost-t760-gles2:armhf
created #2219141
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64
created #2219142
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64
 
  Radv
created #2219143
radv-fossils
 
  Lima
created #2219144
mesa-ci-aarch64-lava-baylibre
lima-mali400-test:armhf 1/2
created #2219145
mesa-ci-aarch64-lava-baylibre
lima-mali400-test:armhf 2/2
created #2219146
mesa-ci-aarch64-lava-baylibre
lima-mali450-test:arm64