intel/nir: Use the correct scalar stage for consumers when linking
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 31 Jul 2018 18:31:22 +0000 (11:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 2 Aug 2018 01:02:28 +0000 (18:02 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/intel/compiler/brw_nir.c

index 5990427b7314fe91a6147872a8c5558be0710aaf..17ccfa48af61bd9f1c63fdd76a7400b3823ee983 100644 (file)
@@ -730,7 +730,7 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
       *producer = brw_nir_optimize(*producer, compiler, p_is_scalar);
 
       const bool c_is_scalar =
-         compiler->scalar_stage[(*producer)->info.stage];
+         compiler->scalar_stage[(*consumer)->info.stage];
       *consumer = brw_nir_optimize(*consumer, compiler, c_is_scalar);
    }
 }