<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 - Segfault when compiling shaders with more than one subroutine uniform"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93722">93722</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segfault when compiling shaders with more than one subroutine uniform
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>major
</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>nioko1337@googlemail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>The fragment shader in question:
#version 330
#extension GL_ARB_shader_subroutine : require
#extension GL_ARB_explicit_uniform_location : require
out vec4 fragColor;
subroutine vec4 color_t();
subroutine vec4 modify_t(vec4 color);
subroutine uniform color_t Color;
subroutine uniform modify_t Modify;
subroutine(color_t)
vec4 ColorRed()
{
return vec4(1, 0, 0, 1);
}
subroutine(color_t)
vec4 ColorBlue()
{
return vec4(0, 0.4, 1, 1);
}
subroutine(modify_t)
vec4 SwapRB(vec4 color)
{
return vec4(color.b, color.g, color.r, color.a);
}
subroutine(modify_t)
vec4 DeleteR(vec4 color)
{
return vec4(0, color.g, color.b, color.a);
}
void main()
{
vec4 color = Color();
fragColor = Modify(color);
}
Some debug logs I could gather:
[...]
[OpenGL] CreateShader(35632)
[OpenGL] ShaderSource(2, 1, 0x7fff29927210, 0x0)
[OpenGL] CompileShader(2)
An unknown error occurred
dmesg output:
[78197.436774] subroutines[12214]: segfault at 60 ip 00007f9d05705f70 sp
00007fff1f1da118 error 4 in i965_dri.so[7f9d0545c000+5d7000]
Also happens when using llvm renderer:
[78750.763639] subroutines[12766]: segfault at 60 ip 00007f25b4e88230 sp
00007fff299269f8 error 4 in swrast_dri.so[7f25b4bca000+86b000]
This is my first bug report, so I'm not entirely sure if I'm doing this
completely right.</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>