return 0;
}
-#if 111
/* if the function returns a value, append a hidden __retVal 'out'
* parameter that corresponds to the return value.
*/
p->type = func->header.type;
p->type.qualifier = slang_qual_out;
}
-#endif
/* function formal parameters and local variables share the same
* scope, so save the information about param count in a seperate
if (!parse_expression(C, O, var->initializer))
return 0;
break;
-#if 0
case VARIABLE_ARRAY_UNKNOWN:
/* unsized array - mark it as array and copy the specifier to
the array element
if (!convert_to_array(C, var, &type->specifier))
return GL_FALSE;
break;
-#endif
case VARIABLE_ARRAY_EXPLICIT:
if (!convert_to_array(C, var, &type->specifier))
return GL_FALSE;
return 0;
}
-#if 1
+ /* emit code for global var decl */
if (C->global_scope) {
slang_assemble_ctx A;
-
A.atoms = C->atoms;
A.space.funcs = O->funs;
A.space.structs = O->structs;
A.space.vars = O->vars;
A.program = O->program;
A.vartable = O->vartable;
-
_slang_codegen_global_variable(&A, var, C->type);
}
-#endif
/* allocate global address space for a variable with a known size */
if (C->global_scope
/* Finally check the syntax and generate its binary representation. */
if (!grammar_fast_check(id,
(const byte *) (slang_string_cstr(&preprocessed)),
- &prod, &size,
- 65536)) {
+ &prod, &size, 65536)) {
char buf[1024];
GLint pos;
if (!success)
return GL_FALSE;
-#if NEW_SLANG
- {
- slang_create_uniforms(&object->expdata, shader);
- _mesa_print_program(program);
- _mesa_print_program_parameters(ctx, program);
- }
-#endif
-
return GL_TRUE;
}