From c7b2cce4186974adb86f14c4c62c43fc0332d6f4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 15:57:09 -0600 Subject: [PATCH] improve literal printing --- src/mesa/shader/slang/slang_print.c | 21 +++++++++++++-------- 1 file 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: -- 2.30.2