projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89d8577
)
tgsi: make the tgsi assembly parser report line/column on error
author
Zack Rusin
<zackr@vmware.com>
Tue, 15 Dec 2009 14:26:51 +0000
(09:26 -0500)
committer
Zack Rusin
<zackr@vmware.com>
Fri, 25 Dec 2009 10:52:17 +0000
(
05:52
-0500)
src/gallium/auxiliary/tgsi/tgsi_text.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/tgsi/tgsi_text.c
b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 84e863b23759fcfe32e3d9ba3a03d5812c113dae..9673686ace6298f9a94d2e3d1ce2c00de26fc80d 100644
(file)
--- a/
src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/
src/gallium/auxiliary/tgsi/tgsi_text.c
@@
-197,7
+197,20
@@
struct translate_ctx
static void report_error( struct translate_ctx *ctx, const char *msg )
{
- debug_printf( "\nError: %s", msg );
+ int line = 1;
+ int column = 1;
+ const char *itr = ctx->text;
+
+ while (itr != ctx->cur) {
+ if (*itr == '\n') {
+ column = 1;
+ ++line;
+ }
+ ++column;
+ ++itr;
+ }
+
+ debug_printf( "\nTGSI asm error: %s [%d : %d] \n", msg, line, column );
}
/* Parse shader header.