[Bug 27901] GLSL cos/sin functions broken on Mesa R600 driver

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 20 17:40:22 PDT 2010


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

--- Comment #8 from Alain Perrot <alain.perrot at gmail.com> 2010-05-20 17:40:21 PDT ---
Created an attachment (id=35777)
 View: https://bugs.freedesktop.org/attachment.cgi?id=35777
 Review: https://bugs.freedesktop.org/review?bug=27901&attachment=35777

Alternative assemble_TRIG fix

I can confirm that your patch seems to work for me too.

By the way, you beat me at posting a working patch here :-)

I also figured out that the 0.5 special constant was an issue in your patch,
and I managed to get a working assemble_TRIG function which implements the
following instruction sequence (lightly different of yours) to normalize the
angle:

MULADD  tmp.x, angle, 1/(2*PI), 0.5
FRACT   tmp.x, tmp.x
ADD     tmp.y, tmp.x, 1
CNDGE   tmp.x, tmp.x, tmp.x, tmp.y
MULADD  tmp.x, tmp.x, 2*PI, -PI

I don't known if it is better or worse than yours beside the fact that it use
only one helper variable.

I attached my patch (updated to use the same extended value of PI than yours)
which fix the assemble_TRIG function, but not the assemble_SCS one.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the dri-devel mailing list