[Bug 91213] GLSL sine and cosine of argument larger than 4096*pi give wrong results

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jul 5 23:49:01 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91213

--- Comment #3 from Ruslan Kabatsayev <b7.10110111 at gmail.com> ---
(In reply to Matt Turner from comment #2)
> We just use the sin/cos instructions directly.
Hm, indeed, just tested with an equivalent ARBfp shader, with the same results.

> Is this just a corner case you noticed, or something that you really want to
> work?

I was using GLSL to compute scattering of a 2D wave and render its density
plot. And while downscaling the image I noticed that the results start looking
strange starting from some distance to the scatterer, and this only reproduced
on intel. And only then I tracked this to the problem with the sin/cos
functions implementation.

So I'd like this to work indeed, it was not just some test where I noticed the
problem. But OTOH, the GLSL spec (I looked at 1.20) doesn't say (AFAIK)
anything about accuracy requirements for built-in functions, nor does it
mention range for which the results must be usable. So I'm not sure what's best
for Mesa. If you feel this would make the GLSL implementation noticeably slower
in general, maybe a GLSL pragma like "mesa_make_functions_correct" to enable
fix like in Windows would be a good solution. Or it might be some special
setting in ~/.drirc.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150706/682bf098/attachment.html>


More information about the intel-3d-bugs mailing list