summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915/i915_program.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-07-30 12:32:40 -0700
committerEric Anholt <eric@anholt.net>2009-10-01 14:31:03 -0700
commit994d1db079b4947e6f10ab22a4b366a676382345 (patch)
tree4f8399f1cc42f193cfe006f042129a793ad3219c /src/mesa/drivers/dri/i915/i915_program.c
parent5d2413fca4c252ec5c7880fa7f983b5df3d762ba (diff)
i915: Let i915_program_error take a format string, and don't use _mesa_problem.
It's misleading to report things like the program having too many native instructions as a Mesa implementation error, when the program may just be too big for the hardware.
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_program.c')
-rw-r--r--src/mesa/drivers/dri/i915/i915_program.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c
index e87700f8e0..85a1b0cf5d 100644
--- a/src/mesa/drivers/dri/i915/i915_program.c
+++ b/src/mesa/drivers/dri/i915/i915_program.c
@@ -424,12 +424,21 @@ i915_emit_param4fv(struct i915_fragment_program * p, const GLfloat * values)
return 0;
}
-
-
+/* Warning the user about program errors seems to be quite valuable, from
+ * our bug reports. It unfortunately means piglit reporting errors
+ * when we fall back to software due to an unsupportable program, though.
+ */
void
-i915_program_error(struct i915_fragment_program *p, const char *msg)
+i915_program_error(struct i915_fragment_program *p, const char *fmt, ...)
{
- _mesa_problem(NULL, "i915_program_error: %s", msg);
+ va_list args;
+
+ fprintf(stderr, "i915_program_error: ");
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+
+ fprintf(stderr, "\n");
p->error = 1;
}