ast_function_parameters_to_hir(& this->prototype->parameters, & parameters,
state);
+ const char *return_type_name;
+ const glsl_type *return_type =
+ type_specifier_to_glsl_type(this->prototype->return_type->specifier,
+ & return_type_name, state);
+
+ assert(return_type != NULL);
+
/* Verify that this function's signature either doesn't match a previously
* seen signature for a function with the same name, or, if a match is found,
/* Finish storing the information about this new function in its signature.
*/
if (signature == NULL) {
- signature = new ir_function_signature();
+ signature = new ir_function_signature(return_type);
f->signatures.push_tail(signature);
} else {
/* Destroy all of the previous parameter information. The previous
}
-ir_function_signature::ir_function_signature(void)
- : ir_instruction(ir_op_func_sig)
+ir_function_signature::ir_function_signature(const glsl_type *return_type)
+ : ir_instruction(ir_op_func_sig), return_type(return_type), definition(NULL)
{
/* empty */
}
/*@{*/
class ir_function_signature : public ir_instruction {
public:
- ir_function_signature(void);
+ ir_function_signature(const glsl_type *return_type);
virtual void accept(ir_visitor *v)
{