<div dir="ltr">Reviewed-by: Chris Forbes <<a href="mailto:chrisforbes@google.com" target="_blank">chrisforbes@google.com</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 23, 2016 at 2:15 PM, Dave Airlie <span dir="ltr"><<a href="mailto:airlied@gmail.com" target="_blank">airlied@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
<br>
These types can't be returned.<br>
<br>
This fixes:<br>
GL43-CTS.shader_subroutine.subroutines_not_allowed_as_variables_constructors_and_argument_or_return_types<br>
for the return type case.<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
---<br>
src/compiler/glsl/ast_to_hir.cpp | 9 +++++++++<br>
1 file changed, 9 insertions(+)<br>
<br>
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp<br>
index aa8e810..0ec5b70 100644<br>
--- a/src/compiler/glsl/ast_to_hir.cpp<br>
+++ b/src/compiler/glsl/ast_to_hir.cpp<br>
@@ -5402,6 +5402,15 @@ ast_function::hir(exec_list *instructions,<br>
name);<br>
}<br>
<br>
+ /**/<br>
+ if (return_type->is_subroutine()) {<br>
+ YYLTYPE loc = this->get_location();<br>
+ _mesa_glsl_error(&loc, state,<br>
+ "function `%s' return type can't be a subroutine type",<br>
+ name);<br>
+ }<br>
+<br>
+<br>
/* Create an ir_function if one doesn't already exist. */<br>
f = state->symbols->get_function(name);<br>
if (f == NULL) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.5.5<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>