|
|
@ -272,12 +272,19 @@ struct translate_ctx |
|
|
|
unsigned num_immediates; |
|
|
|
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 line = 1; |
|
|
|
int column = 1; |
|
|
|
int column = 1; |
|
|
|
const char *itr = ctx->text; |
|
|
|
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) { |
|
|
|
while (itr != ctx->cur) { |
|
|
|
if (*itr == '\n') { |
|
|
|
if (*itr == '\n') { |
|
|
|
column = 1; |
|
|
|
column = 1; |
|
|
@ -287,7 +294,7 @@ static void report_error( struct translate_ctx *ctx, const char *msg ) |
|
|
|
++itr; |
|
|
|
++itr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
debug_printf( "\nTGSI asm error: %s [%d : %d] \n", msg, line, column ); |
|
|
|
debug_printf(" [%d : %d] \n", line, column); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Parse shader header.
|
|
|
|
/* Parse shader header.
|
|
|
|