<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Non-const initializers for matrix and vector constructors"
href="https://bugs.freedesktop.org/show_bug.cgi?id=79373">79373</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>idr@freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>Non-const initializers for matrix and vector constructors
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cody@lunarg.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Component</th>
<td>glsl-compiler
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>Ran into a problem with ARB_shading_language_420pack on master. I've got an
app that uses non-const initializers for a matrix. In debug, the compiler
aborts during IR validation. In release, it gets the incorrect answer.
The below patch to an existing piglit test shows the problem. It may affect
other data types, I've only tested with matrices and vectors.
I did enough triage on it to figure out that process_vec_mat_constructor() is
trying to index into a vector, and that doesn't get poofed away by
lower_vector_insert() before validation. I don't know if the right answer is
to call vector constructors or try to insert with a mask right there.
Anyway, if the original authors could take a look. The current piglit tests
get constant folded away.
Thanks,
-C
diff --git
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
index f5da4c9..0af82f1 100644
---
a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
+++
b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
@@ -19,9 +19,9 @@ out vec4 color;
void main()
{
- mat2x2 a = mat2( vec2( 1.0, 0.0 ), vec2( 0.0, 1.0 ) );
- mat2x2 b = { vec2( 1.0, 0.0 ), vec2( 0.0, 1.0 ) };
- mat2x2 c = { { 1.0, 0.0 }, { 0.0, 1.0 } };
+ mat2x2 a = mat2( vec2( 1.0, vertex.x ), vec2( 0.0, 1.0 ) );
+ mat2x2 b = { vec2( 1.0, vertex.x ), vec2( 0.0, 1.0 ) };
+ mat2x2 c = { { 1.0, vertex.x }, { 0.0, 1.0 } };
color = vec4(0.0, 1.0, 0.0, 1.0);</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>