intel/compiler: Respect NIR_DEBUG_PRINT_INTERNAL for DEBUG_OPTIMIZER
If the NIR_DEBUG_PRINT_INTERNAL flag is not set, don't print debugging information for internal shaders in INTEL_DEBUG=optimizer dumps. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24684>
This commit is contained in:

committed by
Marge Bot

parent
8a8bde69a5
commit
d7daf78f62
@@ -6193,10 +6193,11 @@ fs_visitor::invalidate_analysis(brw::analysis_dependency_class c)
|
||||
}
|
||||
|
||||
void
|
||||
fs_visitor::debug_optimizer(const char *pass_name,
|
||||
fs_visitor::debug_optimizer(const nir_shader *nir,
|
||||
const char *pass_name,
|
||||
int iteration, int pass_num) const
|
||||
{
|
||||
if (!INTEL_DEBUG(DEBUG_OPTIMIZER))
|
||||
if (!brw_should_print_shader(nir, DEBUG_OPTIMIZER))
|
||||
return;
|
||||
|
||||
char *filename;
|
||||
@@ -6213,7 +6214,7 @@ fs_visitor::debug_optimizer(const char *pass_name,
|
||||
void
|
||||
fs_visitor::optimize()
|
||||
{
|
||||
debug_optimizer("start", 0, 0);
|
||||
debug_optimizer(nir, "start", 0, 0);
|
||||
|
||||
/* Start by validating the shader we currently have. */
|
||||
validate();
|
||||
@@ -6240,7 +6241,7 @@ fs_visitor::optimize()
|
||||
bool this_progress = pass(args); \
|
||||
\
|
||||
if (this_progress) \
|
||||
debug_optimizer(#pass, iteration, pass_num); \
|
||||
debug_optimizer(nir, #pass, iteration, pass_num); \
|
||||
\
|
||||
validate(); \
|
||||
\
|
||||
@@ -6747,7 +6748,7 @@ fs_visitor::allocate_registers(bool allow_spilling)
|
||||
if (needs_register_pressure)
|
||||
shader_stats.max_register_pressure = compute_max_register_pressure();
|
||||
|
||||
debug_optimizer("pre_register_allocate", 99, 99);
|
||||
debug_optimizer(nir, "pre_register_allocate", 99, 99);
|
||||
|
||||
bool spill_all = allow_spilling && INTEL_DEBUG(DEBUG_SPILL_FS);
|
||||
|
||||
|
@@ -572,7 +572,8 @@ private:
|
||||
|
||||
unsigned workgroup_size() const;
|
||||
|
||||
void debug_optimizer(const char *pass_name,
|
||||
void debug_optimizer(const nir_shader *nir,
|
||||
const char *pass_name,
|
||||
int iteration, int pass_num) const;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user