panfrost: Split panfrost_batch_submit to prevent stack overflows

panfrost_batch_submit can recurse to hundreds of levels to submit
dependencies, so split the actual submit code from the dependency
recursion, saving over a kilobyte of stack space per recursion
level. Enforce this with ATTRIBUTE_NOINLINE.

Use ATTRIBUTE_NOINLINE on panfrost_batch_submit itself as well to
prevent GCC from inlining the function into itself, which would use a
few hundred bytes of stack.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <mesa/mesa!10574>
154 jobs for stackoverflow
Status Job ID Name Coverage
  Container
manual #9388722
aarch64 manual
arm_build
manual #9388723
windows shell 1809 mesa manual
windows_build_vs2019
manual #9388720
manual
x86_build-base
manual #9388721
manual
x86_test-base
 
  Container 2
created #9388728
android_build
created #9388725
i386_build
created #9388731
kernel+rootfs_amd64
created #9388732
aarch64
kernel+rootfs_arm64
created #9388733
aarch64
kernel+rootfs_armhf
created #9388726
ppc64el_build
created #9388727
s390x_build
created #9388724
x86_build
created #9388729
x86_test-gl
created #9388730
x86_test-vk
 
  Meson X86 64
created #9388739
meson-clang
created #9388740
meson-clover
created #9388736
meson-clover-testing
created #9388737
meson-gallium
created #9388738
meson-release
created #9388734
meson-testing
created #9388735
meson-testing-asan
created #9388741
meson-vulkan
 
  Build Misc
created #9388742
arm_test
created #9388743
meson-android
created #9388745
aarch64
meson-arm64
created #9388746
aarch64
meson-arm64-asan
created #9388747
aarch64
meson-arm64-build-test
created #9388744
aarch64
meson-armhf
created #9388749
meson-i386
created #9388752
meson-mingw32-x86_64
created #9388751
meson-ppc64el
created #9388750
kvm
meson-s390x
created #9388748
windows docker 1809 mesa
meson-windows-vs2019
 
  Amd
created #9388758
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles2:amd64
created #9388765
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64 1/2
created #9388767
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64 2/2
created #9388761
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64 1/2
created #9388763
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64 2/2
created #9388772
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-piglit-gl:amd64
created #9388769
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64
created #9388756
radv-fossils
created #9388753
polaris10 manual
radv-polaris10-traces
created #9388755
polaris10 manual
radv_polaris10_vkcts
created #9388754
raven manual
radv-raven-traces
 
  Intel
created #9388779
mesa-ci-aarch64-lava-collabora manual
iris-amly-traces:amd64
created #9388774
mesa-ci-aarch64-lava-collabora manual
iris-apl-traces:amd64
created #9388777
mesa-ci-aarch64-lava-collabora manual
iris-glk-traces:amd64
 
  Arm
created #9388800
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles2:arm64
created #9388804
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles31:arm64
created #9388802
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles3:arm64
created #9388781
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64
created #9388783
mesa-ci-aarch64-lava-collabora
panfrost-t760-gles2:armhf
created #9388786
mesa-ci-aarch64-lava-collabora
panfrost-t760-traces:armhf
created #9388788
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64
created #9388795
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles31:arm64
created #9388790
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2
created #9388793
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2
created #9388798
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64
 
  Broadcom
created #9388844
igalia-rpi4 manual
v3d-rpi4-egl:armhf
created #9388840
igalia-rpi4
v3d-rpi4-gles2:armhf
created #9388831
igalia-rpi4
v3d-rpi4-gles31:armhf 1/2
created #9388833
igalia-rpi4
v3d-rpi4-gles31:armhf 2/2
created #9388835
igalia-rpi4
v3d-rpi4-gles3:armhf 1/4
created #9388837
igalia-rpi4
v3d-rpi4-gles3:armhf 2/4
created #9388838
igalia-rpi4
v3d-rpi4-gles3:armhf 3/4
created #9388839
igalia-rpi4
v3d-rpi4-gles3:armhf 4/4
created #9388843
igalia-rpi4 manual
v3d-rpi4-khr-gles2:armhf
created #9388841
igalia-rpi4 manual
v3d-rpi4-khr-gles31:armhf
created #9388842
igalia-rpi4 manual
v3d-rpi4-khr-gles3:armhf
created #9388845
igalia-rpi4 manual
v3d-rpi4-piglit:armhf 1/3
created #9388846
igalia-rpi4 manual
v3d-rpi4-piglit:armhf 2/3
created #9388847
igalia-rpi4 manual
v3d-rpi4-piglit:armhf 3/3
created #9388848
igalia-rpi4
v3dv-rpi4-vk:armhf 1/6
created #9388849
igalia-rpi4
v3dv-rpi4-vk:armhf 2/6
created #9388850
igalia-rpi4
v3dv-rpi4-vk:armhf 3/6
created #9388851
igalia-rpi4
v3dv-rpi4-vk:armhf 4/6
created #9388852
igalia-rpi4
v3dv-rpi4-vk:armhf 5/6
created #9388853
igalia-rpi4
v3dv-rpi4-vk:armhf 6/6
created #9388817
igalia-rpi3 manual
vc4-rpi3-egl:armhf
created #9388807
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4
created #9388809
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4
created #9388811
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4
created #9388813
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4
created #9388815
igalia-rpi3 manual
vc4-rpi3-khr-gles2:armhf
created #9388819
igalia-rpi3 manual
vc4-rpi3-piglit-quick_gl:armhf 1/4
created #9388821
igalia-rpi3 manual
vc4-rpi3-piglit-quick_gl:armhf 2/4
created #9388823
igalia-rpi3 manual
vc4-rpi3-piglit-quick_gl:armhf 3/4
created #9388825
igalia-rpi3 manual
vc4-rpi3-piglit-quick_gl:armhf 4/4
created #9388827
igalia-rpi3 manual
vc4-rpi3-piglit-quick_shader:armhf 1/2
created #9388829
igalia-rpi3 manual
vc4-rpi3-piglit-quick_shader:armhf 2/2
 
  Freedreno
created #9388854
google-freedreno-db410c
a306_gles2
created #9388855
google-freedreno-db410c
a306_gles3 1/3
created #9388856
google-freedreno-db410c
a306_gles3 2/3
created #9388857
google-freedreno-db410c
a306_gles3 3/3
created #9388858
google-freedreno-db410c
a306_gles3_options
created #9388859
google-freedreno-db410c
a306-traces
created #9388860
google-freedreno-db820c
a530_gles2
created #9388863
google-freedreno-db820c
a530_gles31 1/2
created #9388861
google-freedreno-db820c
a530_gles3 1/2
created #9388864
google-freedreno-db820c
a530_gles31 2/2
created #9388862
google-freedreno-db820c
a530_gles3 2/2
created #9388865
google-freedreno-db820c
a530_piglit_gl
created #9388866
google-freedreno-db820c
a530_piglit_shader
created #9388867
google-freedreno-db820c
a530-traces
created #9388872
google-freedreno-cheza
a630_egl
created #9388871
google-freedreno-cheza
a630_gl
created #9388868
google-freedreno-cheza
a630_gles2
created #9388870
google-freedreno-cheza
a630_gles3
created #9388869
google-freedreno-cheza
a630_gles31
created #9388874
google-freedreno-cheza manual
a630_gles_asan
created #9388873
google-freedreno-cheza
a630_gles_others
created #9388879
google-freedreno-cheza
a630_piglit
created #9388880
google-freedreno-cheza
a630-traces
created #9388875
google-freedreno-cheza
a630_vk 1/2
created #9388876
google-freedreno-cheza
a630_vk 2/2
created #9388877
google-freedreno-cheza manual
a630_vk_asan
created #9388878
google-freedreno-cheza
a630_vk_sysmem
 
  Software Renderer
created #9388899
lavapipe-vk
created #9388888
llvmpipe-egl
created #9388886
llvmpipe-gles2
created #9388887
llvmpipe-khr-gles2
created #9388881
llvmpipe-piglit-cl
created #9388883
llvmpipe-piglit-glslparser
created #9388882
llvmpipe-piglit-quick_gl
created #9388884
llvmpipe-piglit-quick_shader
created #9388885
llvmpipe-traces
created #9388896
softpipe-asan-gles31
created #9388898
softpipe-gl
created #9388889
softpipe-gles2
created #9388890
softpipe-gles3
created #9388891
softpipe-gles31 1/2
created #9388892
softpipe-gles31 2/2
created #9388893
softpipe-khr-gles2
created #9388894
softpipe-khr-gles3
created #9388895
softpipe-khr-gles31
created #9388897
softpipe-piglit-quick
 
  Layered Backends
created #9388916
windows docker 1809 mesa
test-d3d12-windows
created #9388904
virgl-gl30-on-gl
created #9388905
virgl-gl31-on-gl
created #9388906
virgl-gl32-on-gl
created #9388900
virgl-gles2-on-gl
created #9388907
manual
virgl-gles2-on-gles
created #9388902
virgl-gles31-on-gl 1/2
created #9388903
virgl-gles31-on-gl 2/2
created #9388909
manual
virgl-gles31-on-gles 1/2
created #9388910
manual
virgl-gles31-on-gles 2/2
created #9388901
virgl-gles3-on-gl
created #9388908
manual
virgl-gles3-on-gles
created #9388911
virgl-traces
created #9388915
zink-lvp-gl
created #9388913
zink-lvp-gles2
created #9388914
zink-lvp-gles3
created #9388912
zink-piglit-quick_gl
 
  Deploy
manual #9388917
manual
test-docs