From a964f321a5346bf6d8c508946ecab2c44def910f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 16 Apr 2026 10:09:23 -0400 Subject: [PATCH] jay: don't print internal without the flag Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_from_nir.c | 7 +++++-- src/intel/compiler/jay/jay_private.h | 6 ++++-- src/intel/compiler/jay/jay_to_binary.c | 7 +++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/intel/compiler/jay/jay_from_nir.c b/src/intel/compiler/jay/jay_from_nir.c index aed974af0de..5554ebaad8c 100644 --- a/src/intel/compiler/jay/jay_from_nir.c +++ b/src/intel/compiler/jay/jay_from_nir.c @@ -2587,7 +2587,10 @@ jay_compile(const struct intel_device_info *devinfo, union brw_any_prog_key *key) { jay_debug = debug_get_option_jay_debug(); - bool debug = INTEL_DEBUG(intel_debug_flag_for_shader_stage(nir->info.stage)); + bool debug = + INTEL_DEBUG(intel_debug_flag_for_shader_stage(nir->info.stage)) && + !(nir->info.internal || NIR_DEBUG(PRINT_INTERNAL)); + unsigned simd_width = jay_process_nir(devinfo, nir, prog_data, key); if (debug) { @@ -2656,7 +2659,7 @@ jay_compile(const struct intel_device_info *devinfo, } struct jay_shader_bin *bin = - jay_to_binary(s, nir->constant_data, nir->constant_data_size); + jay_to_binary(s, nir->constant_data, nir->constant_data_size, debug); assert(bin->kernel); ralloc_steal(mem_ctx, bin); diff --git a/src/intel/compiler/jay/jay_private.h b/src/intel/compiler/jay/jay_private.h index e0ceaebdaed..cf98499d7d7 100644 --- a/src/intel/compiler/jay/jay_private.h +++ b/src/intel/compiler/jay/jay_private.h @@ -75,8 +75,10 @@ void jay_lower_simd_width(jay_shader *s); void jay_lower_scoreboard(jay_shader *s); void jay_insert_fp_mode(jay_shader *shader, uint32_t api, uint32_t float_sizes); -struct jay_shader_bin * -jay_to_binary(jay_shader *s, void *const_data, size_t const_data_size); +struct jay_shader_bin *jay_to_binary(jay_shader *s, + void *const_data, + size_t const_data_size, + bool debug); #ifdef __cplusplus } /* extern C */ diff --git a/src/intel/compiler/jay/jay_to_binary.c b/src/intel/compiler/jay/jay_to_binary.c index a0431d78d78..6b8f6e3a2cc 100644 --- a/src/intel/compiler/jay/jay_to_binary.c +++ b/src/intel/compiler/jay/jay_to_binary.c @@ -525,7 +525,10 @@ emit(struct brw_codegen *p, } struct jay_shader_bin * -jay_to_binary(jay_shader *s, void *const_data, size_t const_data_size) +jay_to_binary(jay_shader *s, + void *const_data, + size_t const_data_size, + bool debug) { struct jay_shader_bin *bin = rzalloc(s, struct jay_shader_bin); @@ -570,7 +573,7 @@ jay_to_binary(jay_shader *s, void *const_data, size_t const_data_size) brw_compact_instructions(&p, start_offset, disasm); - if (INTEL_DEBUG(intel_debug_flag_for_shader_stage(s->stage)) || !valid) { + if (debug || !valid) { dump_assembly(p.store, 0, p.next_insn_offset, disasm, NULL, stdout); }