diff options
author | Brian <[email protected]> | 2007-03-13 15:57:09 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-13 15:57:09 -0600 |
commit | c7b2cce4186974adb86f14c4c62c43fc0332d6f4 (patch) | |
tree | 9a59afca2825c9f95d15a105028146d768f1e51e | |
parent | 000b2899b92b800f962a52243aa1ca775dd353fa (diff) |
improve literal printing
-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 c377759bea5..4be9041c787 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: |