From 67a101759ec0b84e4f30fbb329e86ac5031cf7e7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 21:39:20 +0000 Subject: [PATCH] Call _mesa_problem() from i915_program_error() so we get a nice error message. --- src/mesa/drivers/dri/i915/i915_program.c | 5 +---- src/mesa/drivers/dri/i915tex/i915_program.c | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 0faadb4..9c13290 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -369,10 +369,7 @@ GLuint i915_emit_param4fv( struct i915_fragment_program *p, void i915_program_error( struct i915_fragment_program *p, const char *msg ) { - /* XXX we shouldn't print anything to stdout, record GL error or - * call _mesa_problem() - */ - fprintf(stderr, "%s\n", msg); + _mesa_problem(NULL, "i915_program_error: %s", msg); p->error = 1; } diff --git a/src/mesa/drivers/dri/i915tex/i915_program.c b/src/mesa/drivers/dri/i915tex/i915_program.c index 4fb5622..0be89d3 100644 --- a/src/mesa/drivers/dri/i915tex/i915_program.c +++ b/src/mesa/drivers/dri/i915tex/i915_program.c @@ -379,17 +379,14 @@ i915_emit_param4fv(struct i915_fragment_program * p, const GLfloat * values) - void i915_program_error(struct i915_fragment_program *p, const char *msg) { - /* XXX we shouldn't print anything to stdout, record GL error or - * call _mesa_problem() - */ - fprintf(stderr, "%s\n", msg); + _mesa_problem(NULL, "i915_program_error: %s", msg); p->error = 1; } + void i915_init_program(struct i915_context *i915, struct i915_fragment_program *p) { -- 2.7.4