diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index 93bd730cf88..3247a2efc32 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -1673,6 +1673,9 @@ struct brw_compile_cs_params { void *log_data; char *error_str; + + /* If unset, DEBUG_CS is used. */ + uint64_t debug_flag; }; /** diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index dc3d97defe4..ec251b071f7 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -10109,7 +10109,8 @@ brw_compile_cs(const struct brw_compiler *compiler, struct brw_cs_prog_data *prog_data = params->prog_data; int shader_time_index = params->shader_time ? params->shader_time_index : -1; - const bool debug_enabled = INTEL_DEBUG & DEBUG_CS; + const bool debug_enabled = + INTEL_DEBUG & (params->debug_flag ? params->debug_flag : DEBUG_CS); prog_data->base.stage = MESA_SHADER_COMPUTE; prog_data->base.total_shared = nir->info.shared_size;