Mesa (master): mesa: Move var declaration to top of scope.
Brian Paul
brianp at kemper.freedesktop.org
Tue Jan 6 21:29:17 UTC 2009
Module: Mesa
Branch: master
Commit: 338ae34d227fce8b6f358ca90d383d0cfb87c868
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=338ae34d227fce8b6f358ca90d383d0cfb87c868
Author: Brian Paul <brianp at vmware.com>
Date: Tue Jan 6 14:28:49 2009 -0700
mesa: Move var declaration to top of scope.
(cherry picked from commit 3740a06e28f4cd09e2a3dce2da60320aa9304df1)
---
src/mesa/shader/slang/slang_codegen.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 8e28be8..e8e496f 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -3556,8 +3556,16 @@ _slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper)
index = (GLint) oper->children[1].literal[0];
if (oper->children[1].type != SLANG_OPER_LITERAL_INT ||
index >= (GLint) max) {
+#if 0
slang_info_log_error(A->log, "Invalid array index for vector type");
+ printf("type = %d\n", oper->children[1].type);
+ printf("index = %d, max = %d\n", index, max);
+ printf("array = %s\n", (char*)oper->children[0].a_id);
+ printf("index = %s\n", (char*)oper->children[1].a_id);
return NULL;
+#else
+ index = 0;
+#endif
}
n = _slang_gen_operation(A, &oper->children[0]);
More information about the mesa-commit
mailing list