<div dir="ltr"><div>You are correct, it should be state->is_version(120, 300).<br></div>I will submit an updated patch.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 22, 2016 at 3:32 PM, Eduardo Lima Mitev <span dir="ltr"><<a href="mailto:elima@igalia.com" target="_blank">elima@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 03/22/2016 02:48 PM, Lars Hamre wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Resending this patch because it received no response last week.<br>
<br>
Allow the sequence operator to be a constant expression in GLSL ES versions prior<br>
to GLSL ES 3.0<br>
<br>
Fixes the following piglit test:<br>
    /all/spec/glsl-es-1.0/compiler/array-sized-by-sequence-in-parenthesis.vert<br>
<br>
</blockquote>
<br></span>
I confirm this fixes the above test, but it also regresses test:<br>
<br>
/all/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert.<br>
<br>
Maybe you are missing a version check?<br>
<br>
Eduardo<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
This mirrors the logic from process_initializer() which performs the<br>
same check for constant variable initialization with sequence operators.<br>
<br>
Section 4.3.3 (Constant Expressions) of the GLSL 4.30.9 spec and of the<br>
GLSL ES 3.00.4 spec say that the result of a sequence operator is not a<br>
constant expression; however, we should not mandate that for lower GLSL<br>
versions.<br>
<br>
Signed-off-by: Lars Hamre <<a href="mailto:chemecse@gmail.com" target="_blank">chemecse@gmail.com</a>><br>
<br>
---<br>
  src/compiler/glsl/ast_to_hir.cpp | 4 +++-<br>
  1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp<br>
index 5262bd8..4037468 100644<br>
--- a/src/compiler/glsl/ast_to_hir.cpp<br>
+++ b/src/compiler/glsl/ast_to_hir.cpp<br>
@@ -2125,7 +2125,9 @@ process_array_size(exec_node *node,<br>
     }<br>
<br>
     ir_constant *const size = ir->constant_expression_value();<br>
-   if (size == NULL || array_size->has_sequence_subexpression()) {<br>
+   if (size == NULL ||<br>
+       (state->is_version(430, 300) &&<br>
+        array_size->has_sequence_subexpression())) {<br>
        _mesa_glsl_error(& loc, state, "array size must be a "<br>
                         "constant valued expression");<br>
        return 0;<br>
--<br>
2.5.0<br>
<br></div></div>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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>
<br>
</blockquote>
<br>
</blockquote></div><br></div>