From 792e01c1e259077eb339af3ce61905fd227ae4bd Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 7 Jul 2010 11:33:13 -0700 Subject: ir_call: Add method to set the function signature being called --- src/glsl/ir.cpp | 8 ++++++++ src/glsl/ir.h | 5 +++++ 2 files changed, 13 insertions(+) (limited to 'src') diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 4257842583..f3ee12ce81 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 0d5bbc20aa..89922c6bbc 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. -- cgit v1.2.3