<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 - SSO: wrong interface validation between GS and VS (regresion due to latest gles 3.1)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96358">96358</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>SSO: wrong interface validation between GS and VS (regresion due to latest gles 3.1)
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</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>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gregory.hainaut@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Hello,
My program generates pipeline invalidation error but it used to be fine. It is
related to bd3f15cffdbbec6d1ea5b7db2fcddaf8b7ae4524.
Here the Vertex Shader output
out SHADER
{
vec4 t_float;
vec4 t_int;
vec4 c;
flat vec4 fc;
} VSout;
Here the Geometry Shader input. Please notice the array.
in SHADER
{
vec4 t_float;
vec4 t_int;
vec4 c;
flat vec4 fc;
} GSin[];
In src/mesa/main/shader_query.cpp in validate_io function:
The error detected is this one:
/* Section 7.4.1 (Shader Interface Matching) of the OpenGL ES 3.1 spec
* says:
*
* - An output variable is considered to match an input variable in
* the subsequent shader if:
*
* - the two variables match in name, type, and qualification; or
*
* - the two variables are declared with the same location
* qualifier and match in type and qualification.
*/
if (producer_var == NULL) {
valid = false;
goto out;
}
Here the consumer_var info
(gdb) p *consumer_var
$17 = {
type = 0x8acc940,
interface_type = 0x8b39b50,
outermost_struct_type = 0x0,
name = 0x8ae8e68 "SHADER[2].c",
location = -1,
component = 0,
index = 0,
patch = 0,
mode = 4,
interpolation = 2,
explicit_location = 0,
precision = 0
}
And the first output
gdb) p *outputs[0
$24 = {
type = 0xf4b9f4f0 <glsl_type::_vec4_type>,
interface_type = 0x8b382e8,
outermost_struct_type = 0x0,
name = 0x8b27b80 "SHADER.c",
location = -1,
component = 0,
index = 0,
patch = 0,
mode = 5,
interpolation = 0,
explicit_location = 0,
precision = 0
}
As you can the name of the GS interface got an extra "[2]" likely the size of
the array. So the previous strcmp isn't possible
<<<<
if (!var->explicit_location &&
strcmp(consumer_var->name, var->name) == 0) {
<span class="quote">>>>></span >
Good luck :)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>