<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [glsl] C-style const arrays trigger assertion in GLSL 4.30"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96320">96320</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[glsl] C-style const arrays trigger assertion in GLSL 4.30
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>glsl-compiler
</td>
</tr>
<tr>
<th>Assignee</th>
<td>idr@freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>thematrixeatsyou@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Overview:
When constructing a C-style array in a shader when the version is 430, this
assertion happens:
glsl/ast_to_hir.cpp:2103: virtual bool
ast_expression::has_sequence_subexpression() const: Assertion `!"ast_aggregate:
Should never get here."' failed.
The shader compiles successfully when the version is 420.
Steps to reproduce:
1) Put any of these in a shader with a #version 430 directive, and attempt to
compile the shader. If you do not hit a syntax error, these should trigger the
assertion (if you set the version to 420 they will compile successfully):
const float[] EXAMPLE1 = {1.0, 2.0, 3.0};
const float[] EXAMPLE2 = {1.0, 2.0, 3.0, };
const vec3[] EXAMPLE3 = {vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0)};
const vec3[] EXAMPLE4 = {vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0), };
const vec3[] EXAMPLE5 = {{1.0, 2.0, 3.0}, {4.0, 5.0, 6.0}};
const vec3[] EXAMPLE6 = {{1.0, 2.0, 3.0}, {4.0, 5.0, 6.0}, };
const vec3[] EXAMPLE7 = {{1.0, 2.0, 3.0, }, {4.0, 5.0, 6.0, }};
const vec3[] EXAMPLE8 = {{1.0, 2.0, 3.0, }, {4.0, 5.0, 6.0, }, };
These compile without any issues on both 420 and 430 (and also earlier
versions, for that matter):
const float[] NONC1 = float[](1.0, 2.0, 3.0);
const vec3[] NONC2 = vec3[](vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0));
For completeness, this one is a syntax error on 420 and 430:
const vec3[] INVALID1 = vec3[]({1.0, 2.0, 3.0}, {4.0, 5.0, 6.0});
Actual results:
Assertion, followed by an abort.
Expected results:
The shader should compile successfully.
Build Date & Hardware:
Git Revision: 98d40b4d1195ebfaa2fd9ed43755ca6896422c1a
Git Revision Date: Wed Jun 1 09:21:01 2016 +1000
Build Date: 2016-01-06, around 15:00 NZST (+1200)
GPU: Intel HD 530 (Skylake GT2) - i965 driver
Core GL version: 4.3 (GLSL 4.30)
OS: Void Linux amd64</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>