diff options
author | José Fonseca <[email protected]> | 2007-10-31 14:16:00 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2007-10-31 14:16:00 +0000 |
commit | af60ebc4eedcfec2090e1ddd7630137948c26866 (patch) | |
tree | b39471fa12516b487ddf7b83f067633a6844273b /src/mesa/pipe/i915simple | |
parent | 13acc263859a4b4689f519be8b5519c784baf3ba (diff) |
Allow more verbose error output.
Diffstat (limited to 'src/mesa/pipe/i915simple')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_fpc.h | 2 | ||||
-rw-r--r-- | src/mesa/pipe/i915simple/i915_fpc_translate.c | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/pipe/i915simple/i915_fpc.h b/src/mesa/pipe/i915simple/i915_fpc.h index c25f5abf0ea..8c7b68aefb5 100644 --- a/src/mesa/pipe/i915simple/i915_fpc.h +++ b/src/mesa/pipe/i915simple/i915_fpc.h @@ -204,7 +204,7 @@ extern void i915_disassemble_program(const uint * program, uint sz); */ extern void -i915_program_error(struct i915_fp_compile *p, const char *msg); +i915_program_error(struct i915_fp_compile *p, const char *msg, ...); extern void i915_translate_fragment_program(struct i915_context *i915); diff --git a/src/mesa/pipe/i915simple/i915_fpc_translate.c b/src/mesa/pipe/i915simple/i915_fpc_translate.c index e041f891401..7db7e4f6ba9 100644 --- a/src/mesa/pipe/i915simple/i915_fpc_translate.c +++ b/src/mesa/pipe/i915simple/i915_fpc_translate.c @@ -25,6 +25,9 @@ * **************************************************************************/ + +#include <stdarg.h> + #include "i915_reg.h" #include "i915_context.h" #include "i915_fpc.h" @@ -111,9 +114,16 @@ i915_use_passthrough_shader(struct i915_context *i915) void -i915_program_error(struct i915_fp_compile *p, const char *msg) +i915_program_error(struct i915_fp_compile *p, const char *msg, ...) { - fprintf(stderr, "i915_program_error: %s\n", msg); + va_list args; + + fprintf(stderr, "i915_program_error: "); + va_start( args, msg ); + vfprintf( stderr, msg, args ); + va_end( args ); + fprintf(stderr, "\n"); + p->error = 1; } @@ -855,7 +865,7 @@ i915_translate_instruction(struct i915_fp_compile *p, break; default: - i915_program_error(p, "bad opcode"); + i915_program_error(p, "bad opcode %d", inst->Instruction.Opcode); return; } |