intel/compiler: print shaders after nir_remove_unused_varyings
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Wed, 13 Jul 2022 11:52:52 +0000 (13:52 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 13 Jul 2022 15:50:02 +0000 (15:50 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17516>

src/intel/compiler/brw_nir.c

index e7b053b..3485be5 100644 (file)
@@ -972,6 +972,15 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
    NIR_PASS(_, consumer, nir_remove_dead_variables, nir_var_shader_in, NULL);
 
    if (nir_remove_unused_varyings(producer, consumer)) {
+      if (should_print_nir(producer)) {
+         printf("nir_remove_unused_varyings\n");
+         nir_print_shader(producer, stdout);
+      }
+      if (should_print_nir(consumer)) {
+         printf("nir_remove_unused_varyings\n");
+         nir_print_shader(consumer, stdout);
+      }
+
       NIR_PASS(_, producer, nir_lower_global_vars_to_local);
       NIR_PASS(_, consumer, nir_lower_global_vars_to_local);