Mesa (master): i915: Only emit program errors when INTEL_DEBUG=wm

Ian Romanick idr at kemper.freedesktop.org
Sat Feb 12 00:46:34 UTC 2011


Module: Mesa
Branch: master
Commit: 13c545346f928c807fd76493d4c06b5475c7bf29
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13c545346f928c807fd76493d4c06b5475c7bf29

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Feb 10 13:20:26 2011 -0800

i915: Only emit program errors when INTEL_DEBUG=wm

This makes piglit a lot more happy.

---

 src/mesa/drivers/dri/i915/i915_program.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c
index ca1949b..f8b9fe8 100644
--- a/src/mesa/drivers/dri/i915/i915_program.c
+++ b/src/mesa/drivers/dri/i915/i915_program.c
@@ -442,14 +442,16 @@ i915_emit_param4fv(struct i915_fragment_program * p, const GLfloat * values)
 void
 i915_program_error(struct i915_fragment_program *p, const char *fmt, ...)
 {
-   va_list args;
+   if (INTEL_DEBUG & DEBUG_WM) {
+      va_list args;
 
-   fprintf(stderr, "i915_program_error: ");
-   va_start(args, fmt);
-   vfprintf(stderr, fmt, args);
-   va_end(args);
+      fprintf(stderr, "i915_program_error: ");
+      va_start(args, fmt);
+      vfprintf(stderr, fmt, args);
+      va_end(args);
 
-   fprintf(stderr, "\n");
+      fprintf(stderr, "\n");
+   }
    p->error = 1;
 }
 




More information about the mesa-commit mailing list