diff options
author | Brian <brian@yutani.localnet.net> | 2007-03-13 15:57:09 -0600 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-03-13 15:57:09 -0600 |
commit | c7b2cce4186974adb86f14c4c62c43fc0332d6f4 (patch) | |
tree | 9a59afca2825c9f95d15a105028146d768f1e51e /src/mesa/shader/slang | |
parent | 000b2899b92b800f962a52243aa1ca775dd353fa (diff) |
improve literal printing
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_print.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index c377759bea..4be9041c78 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -387,22 +387,27 @@ slang_print_tree(const slang_operation *op, int indent) case SLANG_OPER_LITERAL_BOOL: spaces(indent); - /*printf("SLANG_OPER_LITERAL_BOOL\n");*/ - printf("%s\n", op->literal[0] ? "TRUE" : "FALSE"); + printf("LITERAL ("); + for (i = 0; i < op->literal_size; i++) + printf("%s ", op->literal[0] ? "TRUE" : "FALSE"); + printf(")\n"); + break; case SLANG_OPER_LITERAL_INT: spaces(indent); - /*printf("SLANG_OPER_LITERAL_INT\n");*/ - printf("(%d %d %d %d)\n", (int) op->literal[0], (int) op->literal[1], - (int) op->literal[2], (int) op->literal[3]); + printf("LITERAL ("); + for (i = 0; i < op->literal_size; i++) + printf("%d ", (int) op->literal[i]); + printf(")\n"); break; case SLANG_OPER_LITERAL_FLOAT: spaces(indent); - /*printf("SLANG_OPER_LITERAL_FLOAT\n");*/ - printf("(%f %f %f %f)\n", op->literal[0], op->literal[1], op->literal[2], - op->literal[3]); + printf("LITERAL ("); + for (i = 0; i < op->literal_size; i++) + printf("%f ", op->literal[i]); + printf(")\n"); break; case SLANG_OPER_IDENTIFIER: |