summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp11
2 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index c46e1d73fd4..a562b8a3b1c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -810,11 +810,11 @@ fs_visitor::vfail(const char *format, va_list va)
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);
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 21238296d50..90eecae7120 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -124,8 +124,8 @@ fs_visitor::emit_nir_code()
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);
}
@@ -135,7 +135,8 @@ fs_visitor::emit_nir_code()
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));
}
@@ -178,8 +179,8 @@ fs_visitor::emit_nir_code()
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);
}