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 <chrisf@ijw.co.nz>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2015-04-20 10:22:57 +10:00
parent d8a250ce5e
commit 30681c3bb8
4 changed files with 26 additions and 1 deletions

View File

@@ -231,7 +231,7 @@ void ir_print_visitor::visit(ir_function_signature *ir)
void ir_print_visitor::visit(ir_function *ir)
{
fprintf(f, "(function %s\n", ir->name);
fprintf(f, "(%s function %s\n", ir->is_subroutine ? "subroutine" : "", ir->name);
indentation++;
foreach_in_list(ir_function_signature, sig, &ir->signatures) {
indent();