diff options
author | Ian Romanick <[email protected]> | 2010-07-07 11:33:13 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-07-12 15:19:29 -0700 |
commit | 792e01c1e259077eb339af3ce61905fd227ae4bd (patch) | |
tree | 12f77b4ef5066bbdb4a4b1b61f5df242b39cad2a /src | |
parent | b50098122696c00e7f9e57089197e25e5fe0e0cf (diff) |
ir_call: Add method to set the function signature being called
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/ir.cpp | 8 | ||||
-rw-r--r-- | src/glsl/ir.h | 5 |
2 files changed, 13 insertions, 0 deletions
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 @@ -837,6 +837,14 @@ ir_call::get_error_instruction(void *ctx) } 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) { foreach_iter(exec_list_iterator, iter, *list) { 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 @@ -695,6 +695,11 @@ public: } /** + * 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. */ |