Mesa (glsl2): ir_call: Add method to set the function signature being called
Ian Romanick
idr at kemper.freedesktop.org
Mon Jul 12 22:23:37 UTC 2010
Module: Mesa
Branch: glsl2
Commit: 792e01c1e259077eb339af3ce61905fd227ae4bd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=792e01c1e259077eb339af3ce61905fd227ae4bd
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Jul 7 11:33:13 2010 -0700
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(+), 0 deletions(-)
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 4257842..f3ee12c 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 0d5bbc2..89922c6 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.
*/
More information about the mesa-commit
mailing list