summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-03-29 23:41:13 +0200
committerDave Airlie <airlied@redhat.com>2016-03-31 10:00:41 +1000
commitfee6e71c70e05270d3c98dbdf96430dd1bd6315e (patch)
tree79197e5d2f4002a7740677bad76aa6b2774e74dd
parent7b2fbc9fd3ef64c62b21569aebeaf4dd7769bab4 (diff)
tgsi: use printf-style argument for report_error()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 4a82c9b..1b6a2b0 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -272,12 +272,19 @@ struct translate_ctx
unsigned num_immediates;
};
-static void report_error( struct translate_ctx *ctx, const char *msg )
+static void report_error(struct translate_ctx *ctx, const char *format, ...)
{
+ va_list args;
int line = 1;
int column = 1;
const char *itr = ctx->text;
+ debug_printf("\nTGSI asm error: ");
+
+ va_start(args, format);
+ _debug_vprintf(format, args);
+ va_end(args);
+
while (itr != ctx->cur) {
if (*itr == '\n') {
column = 1;
@@ -287,7 +294,7 @@ static void report_error( struct translate_ctx *ctx, const char *msg )
++itr;
}
- debug_printf( "\nTGSI asm error: %s [%d : %d] \n", msg, line, column );
+ debug_printf(" [%d : %d] \n", line, column);
}
/* Parse shader header.