nir: Use the correct infos structure for copying atomic sources
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Oct 2016 19:12:33 +0000 (12:12 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Oct 2016 20:04:54 +0000 (13:04 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Cc: "12.0" <mesa-dev@lists.freedestkop.org>
src/compiler/nir/nir_lower_io.c

index d469b6180f84cc2897ae26bf40362e7c9615aa72..a3b14238993c91a2480349909b0a846f40b9baf3 100644 (file)
@@ -327,7 +327,7 @@ lower_atomic(nir_intrinsic_instr *intrin, struct lower_io_state *state,
    nir_intrinsic_set_base(atomic, var->data.driver_location);
 
    atomic->src[0] = nir_src_for_ssa(offset);
-   for (unsigned i = 0; i < nir_op_infos[intrin->intrinsic].num_inputs; i++) {
+   for (unsigned i = 0; i < nir_intrinsic_infos[intrin->intrinsic].num_srcs; i++) {
       nir_src_copy(&atomic->src[i+1], &intrin->src[i], atomic);
    }