diff options
author | Brian <[email protected]> | 2007-03-13 15:55:41 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-13 15:55:41 -0600 |
commit | a49a865cf53dad5734ca7019406e4ce89702a08f (patch) | |
tree | f1f07c27514992ffa4c122e312b5a066f2c209c4 /src/mesa/shader/slang | |
parent | 948c60badc52cf938766964dc90ce574f885b23d (diff) |
better error msg for undefined function, disable some debug output
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 5b5de07b4fe..45868c725d8 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1074,7 +1074,7 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, slang_operation_construct(oper); slang_operation_copy(oper, inlined); #else - *oper = *inlined; + *oper = *inlined; /* XXX slang_operation_copy() */ #endif @@ -1280,7 +1280,7 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, */ fun = _slang_first_function(A->space.funcs, name); if (!_slang_adapt_call(oper, fun, &A->space, A->atoms, A->log)) { - slang_info_log_error(A->log, "Undefined function '%s'", name); + slang_info_log_error(A->log, "Function '%s' not found (check argument types)", name); return NULL; } assert(fun); @@ -2739,10 +2739,8 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) return GL_TRUE; /* not an error */ } -#if 1 - printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name); -#endif #if 0 + printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name); slang_print_function(fun, 1); #endif @@ -2754,6 +2752,11 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* fold constant expressions, etc. */ _slang_simplify(fun->body, &A->space, A->atoms); +#if 0 + printf("\n*********** simplified %s\n", (char *) fun->header.a_name); + slang_print_function(fun, 1); +#endif + /* Create an end-of-function label */ A->curFuncEndLabel = _slang_label_new("__endOfFunc__main"); @@ -2787,7 +2790,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); #endif -#if 1 +#if 0 printf("************* End codegen function ************\n\n"); #endif |