i965: Use info->textures_used instead of prog->SamplersUsed.

prog->SamplersUsed is set by the linker when validating resource limits,
while info->textures_used is gathered after NIR optimizations, which may
have eliminated some unused surfaces.

This may let us skip some work.

Reviewed-by: Eric Anholt <eric@anholt.net>
25 jobs for sampler-bitmask in 114 minutes and 39 seconds (queued for 209 minutes and 44 seconds)
Status Job ID Name Coverage
  Containers Build
passed #109979
containers:ubuntu

00:00:18

 
  Build+Test
passed #109994
build:make-gallium-drivers-other

00:09:19

passed #109993
build:make-gallium-drivers-radeonsi

00:06:05

passed #109992
build:make-gallium-drivers-swr

00:10:42

passed #109995
build:make-gallium-st-clover-llvm-39

00:06:25

passed #109996
build:make-gallium-st-clover-llvm-4

00:06:37

passed #109997
build:make-gallium-st-clover-llvm-5

00:06:24

passed #109998
build:make-gallium-st-clover-llvm-6

00:06:30

passed #109999
build:make-gallium-st-clover-llvm-7

00:07:04

passed #110000
build:make-gallium-st-other

00:07:15

passed #109991
build:make-loader-classic-dri

00:08:26

passed #109990
build:make-vulkan

00:05:01

passed #109986
build:meson-gallium-clover-llvm5

00:01:48

passed #109987
build:meson-gallium-clover-llvm6

00:01:41

passed #109988
build:meson-gallium-clover-llvm7

00:01:53

passed #109985
build:meson-gallium-drivers-other

00:02:24

passed #109984
build:meson-gallium-radeonsi

00:01:45

passed #109989
build:meson-gallium-st-other

00:01:45

passed #109983
build:meson-gallium-swr

00:04:15

passed #109982
build:meson-glvnd

00:02:08

passed #109981
build:meson-loader-classic-dri

00:01:57

passed #109980
build:meson-vulkan

00:00:48

passed #110002
build:scons-llvm

00:03:53

passed #110001
build:scons-nollvm

00:03:29

passed #110003
build:scons-swr

00:06:35