<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 - Later precision statement isn't overriding earlier one"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97804">97804</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Later precision statement isn't overriding earlier one
</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>glsl-compiler
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>eero.t.tamminen@intel.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=126514" name="attach_126514" title="Glmark2 shader triggering the bug">attachment 126514</a> <a href="attachment.cgi?id=126514&action=edit" title="Glmark2 shader triggering the bug">[details]</a></span>
Glmark2 shader triggering the bug
GLES 3.2 spec:
<a href="https://www.khronos.org/registry/gles/specs/3.2/GLSL_ES_Specification_3.20.pdf">https://www.khronos.org/registry/gles/specs/3.2/GLSL_ES_Specification_3.20.pdf</a>
States following in "4.7.4 Default Precision Qualifiers":
--------------------------------------------
Non-precision qualified declarations will use the precision qualifier specified
in the most recent precision statement that is still in scope. The precision
statement has the same scoping rules as variable declarations.
...
*Multiple precision statements for the same basic type can appear inside the
same scope, with later statements overriding earlier statements within that
scope.*
...
"
All languages except for the fragment language have the following predeclared
globally scoped default precision statements:
precision highp float;
...
The fragment language has no default precision qualifier for floating point
types. Hence for float, floating point vector and matrix variable declarations,
either the declaration must include a precision qualifier or the default float
precision must have been previously declared.
--------------------------------------------
Check for latter was added with <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - In GLSL ES, a missing FS precision qualifier does not generate an error"
href="show_bug.cgi?id=60737">bug 60737</a>, but precision overriding doesn't
seem to work.
Attached Glmark2 shader test fails to Mesa <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTOURBUG - Regression: GLB 2.7 & Glmark-2 GLES versions segfault due to linker precision error (259fc505) on dead variable"
href="show_bug.cgi?id=97532">bug 97532</a>. Vertex shader float
uniform defaults to highp, and same should happen in fragment shader, however,
that happens only if the first precision statement in shader is removed, as
only then it will pass the linker check. I.e. precision overriding doesn't
work.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>