<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><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#c3">Comment # 3</a>
              on <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">bug 91213</a>
              from <span class="vcard"><a class="email" href="mailto:b7.10110111@gmail.com" title="Ruslan Kabatsayev <b7.10110111@gmail.com>"> <span class="fn">Ruslan Kabatsayev</span></a>
</span></b>
        <pre>(In reply to Matt Turner from <a href="show_bug.cgi?id=91213#c2">comment #2</a>)
<span class="quote">> We just use the sin/cos instructions directly.</span >
Hm, indeed, just tested with an equivalent ARBfp shader, with the same results.

<span class="quote">> Is this just a corner case you noticed, or something that you really want to
> work?</span >

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.</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>