spirv: Add helper to find args of Image Operands

Avoid keeping track of the idx and all possible image operands for
each operation.  Note for convenience we split up the handling of
ImageOperandsOffsetMask and ImageOperandsConstOffsetMask.

Suggested by Jason Ekstrand.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
47 jobs for !1932 with r/mm in 36 minutes and 25 seconds (queued for 6 seconds)
detached
Status Job ID Name Coverage
  Container
passed #808546
debian-10:amd64

00:00:22

passed #808548
aarch64
debian-10:arm64

00:00:18

passed #808547
debian-9:amd64

00:00:22

passed #808545
lava-container:arm64

00:00:22

passed #808544
lava-container:armhf

00:00:21

 
  Build
passed #808550
lava-build:arm64

00:05:07

passed #808549
lava-build:armhf

00:04:44

passed #808553
aarch64
meson-arm64

00:01:55

passed #808552
aarch64
meson-armhf

00:02:30

passed #808555
meson-clang

00:03:56

passed #808558
meson-clover

00:07:02

passed #808559
meson-clover-old-llvm

00:06:42

passed #808561
meson-i386

00:05:33

passed #808551
meson-main

00:10:57

passed #808562
meson-mingw32-x86_64

00:04:10

passed #808554
meson-swr-glvnd

00:05:13

passed #808560
meson-vulkan

00:04:53

passed #808563
scons

00:08:52

passed #808564
scons-old-llvm

00:06:01

passed #808556
scons-swr

00:06:20

passed #808557
scons-win64

00:06:47

 
  Test
passed #808587
db410c
arm64_a306_gles2 1/4

00:05:01

passed #808588
db410c
arm64_a306_gles2 2/4

00:05:01

passed #808589
db410c
arm64_a306_gles2 3/4

00:03:51

passed #808590
db410c
arm64_a306_gles2 4/4

00:04:09

passed #808576
mesa-cheza
arm64_a630_gles2

00:04:26

passed #808577
mesa-cheza
arm64_a630_gles31 1/4

00:04:47

passed #808578
mesa-cheza
arm64_a630_gles31 2/4

00:05:13

passed #808579
mesa-cheza
arm64_a630_gles31 3/4

00:06:25

passed #808580
mesa-cheza
arm64_a630_gles31 4/4

00:05:11

passed #808581
mesa-cheza
arm64_a630_gles3 1/6

00:03:46

passed #808582
mesa-cheza
arm64_a630_gles3 2/6

00:03:55

passed #808583
mesa-cheza
arm64_a630_gles3 3/6

00:03:44

passed #808584
mesa-cheza
arm64_a630_gles3 4/6

00:03:46

passed #808585
mesa-cheza
arm64_a630_gles3 5/6

00:03:31

passed #808586
mesa-cheza
arm64_a630_gles3 6/6

00:04:06

passed #808565
lava-rk3288-veyron-jaq
panfrost-t760-test:armhf

00:07:26

passed #808566
lava-rk3399-gru-kevin
panfrost-t860-test:arm64

00:06:26

passed #808567
test-llvmpipe-gles2 1/4

00:03:35

passed #808568
test-llvmpipe-gles2 2/4

00:02:39

passed #808569
test-llvmpipe-gles2 3/4

00:03:36

passed #808570
test-llvmpipe-gles2 4/4

00:03:44

passed #808571
test-softpipe-gles2 1/4

00:01:31

passed #808572
test-softpipe-gles2 2/4

00:01:36

passed #808573
test-softpipe-gles2 3/4

00:01:28

passed #808574
test-softpipe-gles2 4/4

00:01:02

passed #808575
test-softpipe-gles3-limited

00:03:52