summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_fpc_translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_fpc_translate.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_fpc_translate.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/pipe/i915simple/i915_fpc_translate.c b/src/mesa/pipe/i915simple/i915_fpc_translate.c
index e041f89140..7db7e4f6ba 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;
}