From: Ian Romanick Date: Wed, 7 Jul 2010 18:33:13 +0000 (-0700) Subject: ir_call: Add method to set the function signature being called X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=792e01c1e259077eb339af3ce61905fd227ae4bd;p=mesa.git ir_call: Add method to set the function signature being called --- diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 42578425839..f3ee12ce81f 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -836,6 +836,14 @@ ir_call::get_error_instruction(void *ctx) return call; } +void +ir_call::set_callee(const ir_function_signature *sig) +{ + assert((this->type == NULL) || (this->type == sig->return_type)); + + this->callee = sig; +} + void visit_exec_list(exec_list *list, ir_visitor *visitor) { diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 0d5bbc20aa8..89922c6bbcd 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -694,6 +694,11 @@ public: return callee; } + /** + * Set the function call target + */ + void set_callee(const ir_function_signature *sig); + /** * Generates an inline version of the function before @ir, * returning the return value of the function.