On 13 September 2011 07:17, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><div><div class="h5">
> *instructions, type = glsl_type::error_type; }<br>
><br>
> + /* From page 39 (page 45 of the PDF) of the GLSL 1.10 spec: +<br>
> * + * "When calling a function, expressions that do not<br>
> evaluate to + * l-values cannot be passed to parameters<br>
> declared as out or inout." + * + * From page 32 (page 38 of<br>
> the PDF) of the GLSL 1.10 spec: + * + * "Other binary or<br>
> unary expressions, non-dereferenced arrays, + * function<br>
> names, swizzles with repeated fields, and constants + *<br>
> cannot be l-values." + * + * So for GLSL 1.10, passing an<br>
> array as an out or inout parameter is not + * allowed. This<br>
> restriction is removed in GLSL 1.20, and in GLSL ES. + */ + if<br>
> ((var->mode == ir_var_inout || var->mode == ir_var_out) + &&<br>
> type->is_array() && state->language_version == 110) { +<br>
> _mesa_glsl_error(&loc, state, "Arrays are not l-values in GLSL<br>
> 1.10");<br>
<br>
</div></div>> /** @@ -2953,6 +2934,26 @@ ast_parameter_declarator::hir(exec_list<br>The error message should say what the actual error is. While this<br>
message is technically correct, it will confuse / irritate some<br>
people. "Arrays cannot be out or inout parameters in GLSL 1.10" is<br>
better.<br></blockquote><div><br>Agreed. Your phrasing is better. I'll fix it when I push the patch.<br></div></div>