static const struct debug_named_value st_debug_flags[] = {
{ "mesa", DEBUG_MESA, NULL },
{ "tgsi", DEBUG_PRINT_IR, NULL },
+ { "nir", DEBUG_PRINT_IR, NULL },
{ "constants",DEBUG_CONSTANTS, NULL },
{ "pipe", DEBUG_PIPE, NULL },
{ "tex", DEBUG_TEX, NULL },
nir_shader_get_entrypoint(state.ir.nir));
}
+ if (ST_DEBUG & DEBUG_PRINT_IR)
+ nir_print_shader(state.ir.nir, stderr);
+
vpv->driver_shader = pipe->create_vs_state(pipe, &state);
/* When generating a NIR program, we usually don't have TGSI tokens.
screen->finalize_nir(screen, state.ir.nir, false);
}
+ if (ST_DEBUG & DEBUG_PRINT_IR)
+ nir_print_shader(state.ir.nir, stderr);
+
variant->driver_shader = pipe->create_fs_state(pipe, &state);
variant->key = *key;
st_finalize_nir(st, &prog->Base, prog->shader_program,
state.ir.nir, true);
}
- } else {
+
+ if (ST_DEBUG & DEBUG_PRINT_IR)
+ nir_print_shader(state.ir.nir, stderr);
+ } else {
if (key->lower_depth_clamp) {
struct gl_program_parameter_list *params = prog->Base.Parameters;