struct brw_wm_prog_data *prog_data = params->prog_data;
bool allow_spilling = params->allow_spilling;
const bool debug_enabled =
- INTEL_DEBUG(params->debug_flag ? params->debug_flag : DEBUG_WM);
+ brw_should_print_shader(nir, params->debug_flag ? params->debug_flag : DEBUG_WM);
prog_data->base.stage = MESA_SHADER_FRAGMENT;
prog_data->base.ray_queries = nir->info.ray_queries;
struct brw_cs_prog_data *prog_data = params->prog_data;
const bool debug_enabled =
- INTEL_DEBUG(params->debug_flag ? params->debug_flag : DEBUG_CS);
+ brw_should_print_shader(nir, params->debug_flag ? params->debug_flag : DEBUG_CS);
prog_data->base.stage = MESA_SHADER_COMPUTE;
prog_data->base.total_shared = nir->info.shared_size;
int *prog_offset,
char **error_str)
{
- const bool debug_enabled = INTEL_DEBUG(DEBUG_RT);
+ const bool debug_enabled = brw_should_print_shader(shader, DEBUG_RT);
prog_data->base.stage = shader->info.stage;
prog_data->max_stack_size = MAX2(prog_data->max_stack_size,
struct brw_bs_prog_data *prog_data = params->prog_data;
unsigned num_resume_shaders = params->num_resume_shaders;
nir_shader **resume_shaders = params->resume_shaders;
- const bool debug_enabled = INTEL_DEBUG(DEBUG_RT);
+ const bool debug_enabled = brw_should_print_shader(shader, DEBUG_RT);
prog_data->base.stage = shader->info.stage;
prog_data->base.ray_queries = shader->info.ray_queries;
const struct brw_cs_prog_data *cs = brw_cs_prog_data(prog_data);
return cs->local_size[0] * cs->local_size[1] * cs->local_size[2];
}
+
+bool brw_should_print_shader(const nir_shader *shader, uint64_t debug_flag)
+{
+ return INTEL_DEBUG(debug_flag) && (!shader->info.internal || NIR_DEBUG(PRINT_INTERNAL));
+}
\ No newline at end of file
struct nir_shader *nir = params->nir;
const struct brw_task_prog_key *key = params->key;
struct brw_task_prog_data *prog_data = params->prog_data;
- const bool debug_enabled = INTEL_DEBUG(DEBUG_TASK);
+ const bool debug_enabled = brw_should_print_shader(nir, DEBUG_TASK);
brw_nir_lower_tue_outputs(nir, &prog_data->map);
struct nir_shader *nir = params->nir;
const struct brw_mesh_prog_key *key = params->key;
struct brw_mesh_prog_data *prog_data = params->prog_data;
- const bool debug_enabled = INTEL_DEBUG(DEBUG_MESH);
+ const bool debug_enabled = brw_should_print_shader(nir, DEBUG_MESH);
prog_data->base.base.stage = MESA_SHADER_MESH;
prog_data->base.base.total_shared = nir->info.shared_size;
const struct brw_cs_prog_data *prog_data,
const unsigned *sizes);
+bool brw_should_print_shader(const nir_shader *shader, uint64_t debug_flag);
+
#endif // BRW_PRIVATE_H
#include "brw_eu.h"
#include "brw_fs.h"
#include "brw_nir.h"
+#include "brw_private.h"
#include "brw_vec4_tes.h"
#include "dev/intel_debug.h"
#include "main/uniforms.h"
struct brw_tes_prog_data *prog_data = params->prog_data;
const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_EVAL];
- const bool debug_enabled = INTEL_DEBUG(DEBUG_TES);
+ const bool debug_enabled = brw_should_print_shader(nir, DEBUG_TES);
const unsigned *assembly;
prog_data->base.base.stage = MESA_SHADER_TESS_EVAL;
#include "brw_vec4_builder.h"
#include "brw_vec4_vs.h"
#include "brw_dead_control_flow.h"
+#include "brw_private.h"
#include "dev/intel_debug.h"
#include "program/prog_parameter.h"
#include "util/u_math.h"
const struct brw_vs_prog_key *key = params->key;
struct brw_vs_prog_data *prog_data = params->prog_data;
const bool debug_enabled =
- INTEL_DEBUG(params->debug_flag ? params->debug_flag : DEBUG_VS);
+ brw_should_print_shader(nir, params->debug_flag ? params->debug_flag : DEBUG_VS);
prog_data->base.base.stage = MESA_SHADER_VERTEX;
prog_data->base.base.ray_queries = nir->info.ray_queries;
#include "brw_fs.h"
#include "brw_nir.h"
#include "brw_prim.h"
+#include "brw_private.h"
#include "dev/intel_debug.h"
namespace brw {
c.key = *key;
const bool is_scalar = compiler->scalar_stage[MESA_SHADER_GEOMETRY];
- const bool debug_enabled = INTEL_DEBUG(DEBUG_GS);
+ const bool debug_enabled = brw_should_print_shader(nir, DEBUG_GS);
prog_data->base.base.stage = MESA_SHADER_GEOMETRY;
prog_data->base.base.ray_queries = nir->info.ray_queries;
#include "brw_nir.h"
#include "brw_vec4_tcs.h"
#include "brw_fs.h"
+#include "brw_private.h"
#include "dev/intel_debug.h"
namespace brw {
struct brw_vue_prog_data *vue_prog_data = &prog_data->base;
const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_CTRL];
- const bool debug_enabled = INTEL_DEBUG(DEBUG_TCS);
+ const bool debug_enabled = brw_should_print_shader(nir, DEBUG_TCS);
const unsigned *assembly;
vue_prog_data->base.stage = MESA_SHADER_TESS_CTRL;