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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--- Comment #1 from Conn Clark <conn.o.clark@xxxxxxxxx> 2010-05-17 15:10:30 PDT ---
A proper fix would be to fix the r700_assembler.c code so that it generates
code to translate the radians input to a corresponding value between PI and -PI
before passing it to the SIN or COS instructions.


I *think* that this could be achieved through the following r600 instructions

inst count  unit        opcode          DEST   SRC0, SRC1, SRC3
        0   x:          MUL             tmp.x, ang, 1/(2.0 * pi)
        1   x:          FRACT           tmp.x, tmp.x
        2   x:          ADD             tmp.x, tmp.x, -0.5F
            y:          MULADD          tmp.y, tmp.x, (2.0 * pi), -(2.0 * pi)
            z:          MUL             tmp.z, tmp.x, (2.0 * pi)
        3   x:          CMOVEGT         tmp.x, tmp.x, tmp.y, tmp.z
        4   t:          SIN or COS      dest,  tmp.x

Unfortunately I can't quite figure out how to do it in the code yet to try and
see.

-- 
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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux