*/
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);
*
**************************************************************************/
+
+#include <stdarg.h>
+
#include "i915_reg.h"
#include "i915_context.h"
#include "i915_fpc.h"
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;
}
break;
default:
- i915_program_error(p, "bad opcode");
+ i915_program_error(p, "bad opcode %d", inst->Instruction.Opcode);
return;
}