diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 565102ce841..755c0fdf655 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -9093,7 +9093,7 @@ brw_compile_fs(const struct brw_compiler *compiler, if (!key->multisample_fbo) NIR_PASS_V(nir, brw_nir_demote_sample_qualifiers); NIR_PASS_V(nir, brw_nir_move_interpolation_to_top); - brw_postprocess_nir(nir, compiler, true); + brw_postprocess_nir(nir, compiler, true, debug_enabled); brw_nir_populate_wm_prog_data(nir, compiler->devinfo, key, prog_data); @@ -9420,7 +9420,7 @@ compile_cs_to_nir(const struct brw_compiler *compiler, NIR_PASS_V(shader, nir_opt_constant_folding); NIR_PASS_V(shader, nir_opt_dce); - brw_postprocess_nir(shader, compiler, true); + brw_postprocess_nir(shader, compiler, true, debug_enabled); return shader; } @@ -9721,7 +9721,7 @@ brw_compile_bs(const struct brw_compiler *compiler, void *log_data, const unsigned max_dispatch_width = 16; brw_nir_apply_key(shader, compiler, &key->base, max_dispatch_width, true); - brw_postprocess_nir(shader, compiler, true); + brw_postprocess_nir(shader, compiler, true, debug_enabled); fs_visitor *v = NULL, *v8 = NULL, *v16 = NULL; bool has_spilled = false; diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index dea4eadb484..e8b8416ff87 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1077,11 +1077,9 @@ nir_shader_has_local_variables(const nir_shader *nir) */ void brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, - bool is_scalar) + bool is_scalar, bool debug_enabled) { const struct gen_device_info *devinfo = compiler->devinfo; - bool debug_enabled = - (INTEL_DEBUG & intel_debug_flag_for_shader_stage(nir->info.stage)); UNUSED bool progress; /* Written by OPT */ diff --git a/src/intel/compiler/brw_nir.h b/src/intel/compiler/brw_nir.h index 05b921501fc..0bb7dc57d25 100644 --- a/src/intel/compiler/brw_nir.h +++ b/src/intel/compiler/brw_nir.h @@ -134,7 +134,8 @@ bool brw_nir_lower_mem_access_bit_sizes(nir_shader *shader, void brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, - bool is_scalar); + bool is_scalar, + bool debug_enabled); bool brw_nir_clamp_image_1d_2d_array_sizes(nir_shader *shader); diff --git a/src/intel/compiler/brw_shader.cpp b/src/intel/compiler/brw_shader.cpp index 1c5d58791b1..fd7372ad6c3 100644 --- a/src/intel/compiler/brw_shader.cpp +++ b/src/intel/compiler/brw_shader.cpp @@ -1323,7 +1323,7 @@ brw_compile_tes(const struct brw_compiler *compiler, brw_nir_apply_key(nir, compiler, &key->base, 8, is_scalar); brw_nir_lower_tes_inputs(nir, input_vue_map); brw_nir_lower_vue_outputs(nir); - brw_postprocess_nir(nir, compiler, is_scalar); + brw_postprocess_nir(nir, compiler, is_scalar, debug_enabled); brw_compute_vue_map(devinfo, &prog_data->base.vue_map, nir->info.outputs_written, diff --git a/src/intel/compiler/brw_vec4.cpp b/src/intel/compiler/brw_vec4.cpp index 418212dd49e..46621701b38 100644 --- a/src/intel/compiler/brw_vec4.cpp +++ b/src/intel/compiler/brw_vec4.cpp @@ -2866,7 +2866,7 @@ brw_compile_vs(const struct brw_compiler *compiler, brw_nir_lower_vs_inputs(nir, key->gl_attrib_wa_flags); brw_nir_lower_vue_outputs(nir); - brw_postprocess_nir(nir, compiler, is_scalar); + brw_postprocess_nir(nir, compiler, is_scalar, debug_enabled); prog_data->base.clip_distance_mask = ((1 << nir->info.clip_distance_array_size) - 1); diff --git a/src/intel/compiler/brw_vec4_gs_visitor.cpp b/src/intel/compiler/brw_vec4_gs_visitor.cpp index c584b65a5b7..3aa0a3b5167 100644 --- a/src/intel/compiler/brw_vec4_gs_visitor.cpp +++ b/src/intel/compiler/brw_vec4_gs_visitor.cpp @@ -617,7 +617,7 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data, brw_nir_apply_key(nir, compiler, &key->base, 8, is_scalar); brw_nir_lower_vue_inputs(nir, &c.input_vue_map); brw_nir_lower_vue_outputs(nir); - brw_postprocess_nir(nir, compiler, is_scalar); + brw_postprocess_nir(nir, compiler, is_scalar, debug_enabled); prog_data->base.clip_distance_mask = ((1 << nir->info.clip_distance_array_size) - 1); diff --git a/src/intel/compiler/brw_vec4_tcs.cpp b/src/intel/compiler/brw_vec4_tcs.cpp index 607bc314101..fcca3b82471 100644 --- a/src/intel/compiler/brw_vec4_tcs.cpp +++ b/src/intel/compiler/brw_vec4_tcs.cpp @@ -390,7 +390,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, if (key->quads_workaround) brw_nir_apply_tcs_quads_workaround(nir); - brw_postprocess_nir(nir, compiler, is_scalar); + brw_postprocess_nir(nir, compiler, is_scalar, debug_enabled); bool has_primitive_id = BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_PRIMITIVE_ID);