<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 sine and cosine of argument larger than 4096*pi give wrong results"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91213">91213</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>GLSL sine and cosine of argument larger than 4096*pi give wrong results
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>10.5
</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>Drivers/DRI/i965
</td>
</tr>
<tr>
<th>Assignee</th>
<td>idr@freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>b7.10110111@gmail.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=116915" name="attach_116915" title="Plot of per-channel values in a scanline of the resulting image">attachment 116915</a> <a href="attachment.cgi?id=116915&action=edit" title="Plot of per-channel values in a scanline of the resulting image">[details]</a></span>
Plot of per-channel values in a scanline of the resulting image
The following fragment shader gives me wrong results for red and blue channels,
while the green channel can taken as a reference:
#version 120
float SinGood(float x)
{
if(x>12866)
x=mod(x,6.283185307);
return sin(x);
}
void main()
{
const float pi=3.14159265;
gl_FragColor=vec4(0.5+0.5*sin(3.14159265/256*gl_FragCoord.x+4096*pi),
0.5+0.5*SinGood(3.14159265/256*gl_FragCoord.x+4096*pi),
0.5+0.5*sin(3.14159265/256*gl_FragCoord.x+2*4096*pi),
1);
}
I've tested on Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics
Controller (rev 06), as well as on HD Graphics 4600 on Kubuntu 14.04 and LFS.
If I set LIBGL_ALWAYS_SOFTWARE=1, then I get all three channels with identical
results (visually in the resulting image and on the channels plot), i.e. the
problem only appears when HW acceleration is enabled.</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>