failed = true;
msg = ralloc_vasprintf(mem_ctx, format, va);
- msg = ralloc_asprintf(mem_ctx, "FS compile failed: %s\n", msg);
+ msg = ralloc_asprintf(mem_ctx, "%s compile failed: %s\n", stage_abbrev, msg);
this->fail_msg = msg;
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (debug_enabled) {
fprintf(stderr, "%s", msg);
}
}
nir_copy_prop(nir);
nir_validate_shader(nir);
- if (INTEL_DEBUG & DEBUG_WM) {
- fprintf(stderr, "NIR (SSA form) for fragment shader:\n");
+ if (unlikely(debug_enabled)) {
+ fprintf(stderr, "NIR (SSA form) for %s shader:\n", stage_name);
nir_print_shader(nir, stderr);
}
MESA_DEBUG_SOURCE_SHADER_COMPILER,
MESA_DEBUG_TYPE_OTHER,
MESA_DEBUG_SEVERITY_NOTIFICATION,
- "FS NIR shader: %d inst\n",
+ "%s NIR shader: %d inst\n",
+ stage_abbrev,
count_nir_instrs(nir));
}
nir_emit_impl(overload->impl);
}
- if (INTEL_DEBUG & DEBUG_WM) {
- fprintf(stderr, "NIR (final form) for fragment shader:\n");
+ if (unlikely(debug_enabled)) {
+ fprintf(stderr, "NIR (final form) for %s shader:\n", stage_name);
nir_print_shader(nir, stderr);
}