summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-04-20 10:22:57 +1000
committerDave Airlie <[email protected]>2015-07-23 17:25:32 +1000
commit30681c3bb80ad78392f1740aa915efa072c837e8 (patch)
tree7de576f29799ea7e571ad904332c619d34e872dc /src/glsl/ir.h
parentd8a250ce5edc3da092ede6d62d433fbb37aa6cf6 (diff)
glsl/ir: add subroutine information storage to ir_function (v1.1)
We need to store two sets of info into the ir_function, if this is a function definition with a subroutine list (subroutine_def) or if it a subroutine prototype. v1.1: add some more documentation. Reviewed-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 8294b8a19bd..da867427e1a 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1126,6 +1126,21 @@ public:
* List of ir_function_signature for each overloaded function with this name.
*/
struct exec_list signatures;
+
+ /**
+ * is this function a subroutine type declaration
+ * e.g. subroutine void type1(float arg1);
+ */
+ bool is_subroutine;
+
+ /**
+ * is this function associated to a subroutine type
+ * e.g. subroutine (type1, type2) function_name { function_body };
+ * would have num_subroutine_types 2,
+ * and pointers to the type1 and type2 types.
+ */
+ int num_subroutine_types;
+ const struct glsl_type **subroutine_types;
};
inline const char *ir_function_signature::function_name() const