anv/nir_apply_pipeline_layout: Pass the nir_src from the nir_tex_src
authorEduardo Lima Mitev <elima@igalia.com>
Sat, 21 May 2016 07:24:03 +0000 (09:24 +0200)
committerEduardo Lima Mitev <elima@igalia.com>
Sat, 21 May 2016 17:57:31 +0000 (19:57 +0200)
nir_instr_rewrite_src() expects a nir_src and it is currently being fed a
nir_tex_src. This will crash something.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_nir_apply_pipeline_layout.c

index ddb099e4da2732c53dc1c7345d9c3776d8a0d55c..64812693973e94a8d4fc07277869fcadad8b1b41 100644 (file)
@@ -163,7 +163,7 @@ lower_tex_deref(nir_tex_instr *tex, nir_deref_var *deref,
           * first-class texture source.
           */
          tex->src[tex->num_srcs].src_type = src_type;
-         nir_instr_rewrite_src(&tex->instr, &tex->src[tex->num_srcs],
+         nir_instr_rewrite_src(&tex->instr, &tex->src[tex->num_srcs].src,
                                nir_src_for_ssa(index));
          tex->num_srcs++;
       } else {