[Bug 27901] GLSL cos/sin functions broken on Mesa R600 driver
Conn Clark
conn.o.clark at gmail.com
Thu May 20 18:08:25 PDT 2010
On Thu, May 20, 2010 at 5:40 PM, <bugzilla-daemon at freedesktop.org> wrote:
> 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.
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
Alain,
Its a tough call on who's is the better solution. Yours uses one less
temp reg and mine will allow for a couple of operations to be done in
parallel in the future. I guess we both deserve a pat on the back and
leave it to someone more experienced to make the call on which one to
choose.
Good job
Conn
--
Conn O. Clark
Observation: In formal computer science advances are made
by standing on the shoulders of giants. Linux has proved
that if there are enough of you, you can advance just as
far by stepping on each others toes.
More information about the dri-devel
mailing list