mesa: Move var declaration to top of scope.
authorBrian Paul <brianp@vmware.com>
Tue, 6 Jan 2009 21:28:49 +0000 (14:28 -0700)
committerAlan Hourihane <alanh@vmware.com>
Fri, 9 Jan 2009 11:16:35 +0000 (11:16 +0000)
(cherry picked from commit 3740a06e28f4cd09e2a3dce2da60320aa9304df1)

src/mesa/shader/slang/slang_codegen.c

index 66615d3afd6a264ca57dfc9ea8274f8bcd11104c..88860923b58c22cec666c865318d9af67a268fa6 100644 (file)
@@ -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]);