From 2df56b002dcc5d7e91515bd0ca741677f0172b38 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 7 Mar 2011 15:08:22 -0800 Subject: glsl: Function signatures cannot have NULL return type The return type can be void, and this is the case where a `_ret_val' variable should not be declared. --- src/glsl/ir_validate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/glsl/ir_validate.cpp') diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 44d7549ea2..5e491db2c4 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -198,6 +198,12 @@ ir_validate::visit_enter(ir_function_signature *ir) abort(); } + if (ir->return_type == NULL) { + printf("Function signature %p for function %s has NULL return type.\n", + ir, ir->function_name()); + abort(); + } + this->validate_ir(ir, this->data); return visit_continue; -- cgit v1.2.3