From 51528aeb602042eaa6d903c6b04b896f435423aa Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 29 Mar 2021 16:14:03 -0700 Subject: [PATCH] intel/compiler: Use INTEL_DEBUG=blorp to dump blorp compute shaders Make INTEL_DEBUG=blorp dump the blorp compute shaders instead using the general INTEL_DEBUG=cs which is now reserved for actual compute programs. Ref: 05933fb0f7e ("intel/compiler: Use INTEL_DEBUG=blorp to dump blorp shaders") Signed-off-by: Jordan Justen Reviewed-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Part-of: --- src/intel/compiler/brw_compiler.h | 3 +++ src/intel/compiler/brw_fs.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) 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;