freedreno: nir: Workaround to db410c crash

On db410c with the 19.1 branch we see the following crash
booting to the home screen in AOSP (on wallpaper loading, I
believe):

signal 11 (Segmentation fault)
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xc23072b2 in tid 4355 (RenderThread), pid 4332 (ndroid.settings)
Revision: '0'
pid: 4332, tid: 4355, name: RenderThread  >>> com.android.settings <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xc23072b2
     r0  00000000  r1  86d1760d  r2  00000000  r3  00000007
     r4  c1a51ad8  r5  c1a8cf58  r6  c23072b2  r7  00000004
     r8  00000000  r9  00000000
     ip  e87acd20  sp  c1ebdc80  lr  e872a075  pc  c26c4d24

Stack Trace:
  RELADDR   FUNCTION                     FILE:LINE
  00404d24  ir3_context_error+92         external/mesa3d/src/freedreno/ir3/ir3_context.c:?
  v------>  emit_tex                     external/mesa3d/src/freedreno/ir3/ir3_compiler_nir.c:1736
  0040134b  emit_instr+7542              external/mesa3d/src/freedreno/ir3/ir3_compiler_nir.c:2075
  003ff57d  emit_block+116               external/mesa3d/src/freedreno/ir3/ir3_compiler_nir.c:2143
  003ff44d  emit_cf_list+28              external/mesa3d/src/freedreno/ir3/ir3_compiler_nir.c:2190
  v------>  emit_function                external/mesa3d/src/freedreno/ir3/ir3_compiler_nir.c:2329
  v------>  emit_instructions            external/mesa3d/src/freedreno/ir3/ir3_compiler_nir.c:2718
  003fe6c5  ir3_compile_shader_nir+1680  external/mesa3d/src/freedreno/ir3/ir3_compiler_nir.c:2822
  003fd7d5  create_variant+76            external/mesa3d/src/freedreno/ir3/ir3_shader.c:198
  v------>  shader_variant               external/mesa3d/src/freedreno/ir3/ir3_shader.c:230
  003fd747  ir3_shader_get_variant+78    external/mesa3d/src/freedreno/ir3/ir3_shader.c:245
  00136535  ir3_shader_variant+112       external/mesa3d/src/gallium/drivers/freedreno/ir3/ir3_gallium.c:91
  v------>  fd3_emit_get_fp              external/mesa3d/src/gallium/drivers/freedreno/a3xx/fd3_emit.h:81
  00114777  fd3_program_emit+154         external/mesa3d/src/gallium/drivers/freedreno/a3xx/fd3_program.c:150
  00112f97  fd3_emit_tile_mem2gmem+1414  external/mesa3d/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c:670
  v------>  render_tiles                 external/mesa3d/src/gallium/drivers/freedreno/freedreno_gmem.c:363
  000fe8b3  fd_gmem_render_tiles+426     external/mesa3d/src/gallium/drivers/freedreno/freedreno_gmem.c:464
  000fbcf5  batch_flush_func+4           external/mesa3d/src/gallium/drivers/freedreno/freedreno_batch.c:298
  003f5265  util_queue_thread_func+164   external/mesa3d/src/util/u_queue.c:289
  000a291b  __pthread_start(void*)+20    bionic/libc/bionic/pthread_create.cpp:338
  0005e293  __start_thread+30            bionic/libc/bionic/clone.cpp:53

With the error message:
 "Unhandled NIR tex src type: 11"

Interestingly this isn't seen on db845c with the same code.

For whatever reason, the src_type is being set to
nir_tex_src_texture_deref and nir_tex_src_sampler_deref on the
db410c, and that's crashing out as unhandled.

(NOTE: This crash does not occur with 19.0 or master)

This workaround patch (which obviously isn't right) simply adds
those two values to the select statement treating them like
nir_tex_src_texture_offset, which seems to avoid the crash
and work ok.

Suggestions for a better fix would be great!

Signed-off-by: John Stultz <john.stultz@linaro.org>
11 jobs for !1292 with 19.1-db410c-crash-workaround in 12 minutes and 58 seconds (queued for 24 seconds)
detached
Status Job ID Name Coverage
  Containers Build
passed debian #407565

00:00:22

 
  Build+Test
passed meson-clang #407567

00:07:44

passed meson-clover-llvm #407570

00:04:59

passed meson-clover-llvm39 #407571

00:02:42

passed meson-main #407569

00:05:53

passed meson-swr-glvnd #407566

00:05:33

passed meson-vulkan #407568

00:01:55

passed scons-llvm #407573

00:03:28

passed scons-nollvm #407572

00:03:19

passed scons-swr #407574

00:03:39

passed scons-win64 #407575

00:09:18