gbm: fail early when modifier list only contains INVALID

The current check only accomodates for a list with a single INVALID
item. However the driver won't be able to pick any modifier if the
list only contains INVALID. This includes the following cases:

- The modifier list is empty (count == 0)
- The modifier list contains more than a single item, but all items
  are INVALID

In these cases, also fail early.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: mesa/mesa!7601 (comment 778845)
91 jobs for !8715 with gbm-detect-mod-invalid in 8 seconds (queued for 6 seconds)
latest detached
Status Job ID Name Coverage
  Sanity
passed #6890905
sanity

00:00:08

 
  Container
manual #6890908
aarch64 manual
arm_build
manual #6890909
manual
arm_test-base
manual #6890910
windows shell 1809 mesa manual
windows_build_vs2019
manual #6890906
manual
x86_build-base
manual #6890907
manual
x86_test-base
 
  Container 2
created #6890918
android_build
created #6890921
arm64_test
created #6890922
armhf_test
created #6890915
i386_build
created #6890911
kernel+rootfs_amd64
created #6890912
aarch64
kernel+rootfs_arm64
created #6890913
aarch64
kernel+rootfs_armhf
created #6890916
ppc64el_build
created #6890917
s390x_build
created #6890914
x86_build
created #6890919
x86_test-gl
created #6890920
x86_test-vk
 
  Meson X86 64
created #6890928
meson-clang
created #6890929
meson-clover
created #6890925
meson-clover-testing
created #6890926
meson-gallium
created #6890927
meson-release
created #6890923
meson-testing
created #6890924
meson-testing-asan
created #6890930
meson-vulkan
 
  Build Misc
created #6890931
meson-android
created #6890933
aarch64
meson-arm64
created #6890934
aarch64
meson-arm64-build-test
created #6890932
aarch64
meson-armhf
created #6890937
meson-i386
created #6890940
meson-mingw32-x86_64
created #6890939
kvm
meson-ppc64el
created #6890938
kvm
meson-s390x
created #6890935
windows docker 1809 mesa
meson-windows-vs2019
created #6890936
allowed to fail
scons-win64
 
  Amd
created #6890941
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles2:amd64
created #6890943
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64
created #6890942
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64
created #6890944
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64
created #6890945
radv-fossils
 
  Arm
created #6890951
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles2:arm64
created #6890952
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles3:arm64
created #6890946
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64
created #6890947
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64
created #6890948
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2
created #6890949
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2
created #6890950
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64
 
  Broadcom
created #6890953
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4
created #6890954
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4
created #6890955
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4
created #6890956
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4
 
  Freedreno
created #6890967
google-freedreno-db410c
arm64_a306_gles2
created #6890968
google-freedreno-db410c
arm64_a306_gles3
created #6890969
google-freedreno-db410c
arm64_a306_gles3_options
created #6890970
google-freedreno-db820c
arm64_a530_gles2 1/2
created #6890971
google-freedreno-db820c
arm64_a530_gles2 2/2
created #6890972
google-freedreno-db820c
arm64_a530_gles3
created #6890973
google-freedreno-db820c
arm64_a530_gles31
created #6890961
google-freedreno-cheza
arm64_a630_gl
created #6890958
google-freedreno-cheza
arm64_a630_gles2
created #6890960
google-freedreno-cheza
arm64_a630_gles3
created #6890959
google-freedreno-cheza
arm64_a630_gles31
created #6890962
google-freedreno-cheza
arm64_a630_gles_others
created #6890966
google-freedreno-cheza
arm64_a630_piglit_shader
created #6890957
google-freedreno-cheza
arm64-a630-traces
created #6890963
google-freedreno-cheza
arm64_a630_vk 1/2
created #6890964
google-freedreno-cheza
arm64_a630_vk 2/2
created #6890965
google-freedreno-cheza
arm64_a630_vk_sysmem
 
  Software Renderer
created #6890986
lavapipe-vk
created #6890978
llvmpipe-gles2
created #6890975
llvmpipe-piglit-glslparser
created #6890974
llvmpipe-piglit-quick_gl
created #6890976
llvmpipe-piglit-quick_shader
created #6890977
llvmpipe-traces
created #6890983
softpipe-asan-gles31
created #6890985
softpipe-gl
created #6890979
softpipe-gles2
created #6890980
softpipe-gles3
created #6890981
softpipe-gles31 1/2
created #6890982
softpipe-gles31 2/2
created #6890984
softpipe-piglit-quick
 
  Layered Backends
created #6890987
windows docker 1809 mesa
test-d3d12-windows
created #6890993
virgl-gl30-on-gl
created #6890994
virgl-gl31-on-gl
created #6890995
virgl-gl32-on-gl
created #6890989
virgl-gles2-on-gl
created #6890991
virgl-gles31-on-gl 1/2
created #6890992
virgl-gles31-on-gl 2/2
created #6890990
virgl-gles3-on-gl
created #6890988
virgl-traces