_mesa_glsl_initialize_variables(instructions, state);
+ state->current_function = NULL;
+
foreach (ptr, & state->translation_unit) {
((ast_node *)ptr)->hir(instructions, state);
}
}
+ assert(state->current_function == NULL);
+ state->current_function = signature;
+
ast_function_parameters_to_hir(& this->prototype->parameters,
& signature->parameters,
state);
state->symbols->pop_scope();
+ assert(state->current_function == signature);
+ state->current_function = NULL;
/* Function definitions do not have r-values.
*/
unsigned language_version;
enum _mesa_glsl_parser_targets target;
+ /**
+ * During AST to IR conversion, pointer to current IR function
+ *
+ * Will be \c NULL whenever the AST to IR conversion is not inside a
+ * function definition.
+ */
+ class ir_function_signature *current_function;
+
/** Was there an error during compilation? */
bool error;
};