[R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-10 Thread Rune Petersen
Hi, Getting proper SIN and COS wasn't as easy as it appeared. I had to make make some changes to the fragment program code. general FP changes: - support HHH swizzle for vector instructions. - don't copy a source to a temp when it is not XYZW swizzled, but combine the two and have the swizzle r

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-10 Thread Rune Petersen
note to self: don't post this late... Rune Petersen wrote: > Hi, > > Getting proper SIN and COS wasn't as easy as it appeared. I had to make > make some changes to the fragment program code. > > general FP changes: > - support HHH swizzle for vector instructions. > - don't copy a source to a tem

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-10 Thread Jerome Glisse
On 2/10/07, Rune Petersen <[EMAIL PROTECTED]> wrote: > Hi, > > Getting proper SIN and COS wasn't as easy as it appeared. I had to make > make some changes to the fragment program code. > > general FP changes: > - support HHH swizzle for vector instructions. > - don't copy a source to a temp when it

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-11 Thread Jerome Glisse
On 2/11/07, Jerome Glisse <[EMAIL PROTECTED]> wrote: On 2/10/07, Rune Petersen <[EMAIL PROTECTED]> wrote: > Hi, > > Getting proper SIN and COS wasn't as easy as it appeared. I had to make > make some changes to the fragment program code. > > general FP changes: > - support HHH swizzle for vector

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-11 Thread Rune Petersen
Jerome Glisse wrote: > On 2/11/07, Jerome Glisse <[EMAIL PROTECTED]> wrote: >> On 2/10/07, Rune Petersen <[EMAIL PROTECTED]> wrote: >> > Hi, >> > >> > Getting proper SIN and COS wasn't as easy as it appeared. I had to make >> > make some changes to the fragment program code. >> > >> > general FP ch

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-11 Thread Rune Petersen
. Rune Petersen wrote: > Jerome Glisse wrote: >> On 2/11/07, Jerome Glisse <[EMAIL PROTECTED]> wrote: >>> On 2/10/07, Rune Petersen <[EMAIL PROTECTED]> wrote: Hi, Getting proper SIN and COS wasn't as easy as it appeared. I had to make make some changes to the fragment progr

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-11 Thread Rune Petersen
Rune Petersen wrote: > . > > Rune Petersen wrote: >> Jerome Glisse wrote: >>> On 2/11/07, Jerome Glisse <[EMAIL PROTECTED]> wrote: On 2/10/07, Rune Petersen <[EMAIL PROTECTED]> wrote: > Hi, > > Getting proper SIN and COS wasn't as easy as it appeared. I had to make > make

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-11 Thread Jerome Glisse
On 2/11/07, Rune Petersen <[EMAIL PROTECTED]> wrote: > Rune Petersen wrote: > > . > > > > Rune Petersen wrote: > >> Jerome Glisse wrote: > >>> On 2/11/07, Jerome Glisse <[EMAIL PROTECTED]> wrote: > On 2/10/07, Rune Petersen <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Getting pro

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-12 Thread Roland Scheidegger
>> >> Rune Petersen >> > > Ok commited. I didn't look too closely at this but I've a couple of comments. - COS looks too complicated & broken. If you'd want to get 2 with a LOG2, you'd need 0.25 as source. But even using RCP instead, that's 5 instructions before performing the sine, for something

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-12 Thread Roland Scheidegger
Roland Scheidegger wrote: >>> Rune Petersen >>> >> Ok commited. > > I didn't look too closely at this but I've a couple of comments. > - COS looks too complicated & broken. If you'd want to get 2 with a > LOG2, you'd need 0.25 as source. But even using RCP instead, that's 5 > instructions before p

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-12 Thread Rune Petersen
Roland Scheidegger wrote: > Roland Scheidegger wrote: Rune Petersen >>> Ok commited. >> I didn't look too closely at this but I've a couple of comments. >> - COS looks too complicated & broken. If you'd want to get 2 with a >> LOG2, you'd need 0.25 as source. But even using RCP instead, t

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-14 Thread Rune Petersen
Roland Scheidegger wrote: > Roland Scheidegger wrote: Rune Petersen >>> Ok commited. >> I didn't look too closely at this but I've a couple of comments. >> - COS looks too complicated & broken. If you'd want to get 2 with a >> LOG2, you'd need 0.25 as source. But even using RCP instead, t

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-14 Thread Jerome Glisse
On 2/14/07, Rune Petersen <[EMAIL PROTECTED]> wrote: > Roland Scheidegger wrote: > > Roland Scheidegger wrote: > Rune Petersen > > >>> Ok commited. > >> I didn't look too closely at this but I've a couple of comments. > >> - COS looks too complicated & broken. If you'd want to get 2 with

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-14 Thread Roland Scheidegger
Rune Petersen wrote: > This patch: - Fixes COS. - Does range reductions for SIN & COS. - > Adds SCS. - removes the optimized version of SIN & COS. - tweaked > weight (should help on precision). - fixed a copy paste typo in > emit_arith(). > > Roland would you mind testing if the tweaked weight hel

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-15 Thread Rune Petersen
Jerome Glisse wrote: > On 2/14/07, Rune Petersen <[EMAIL PROTECTED]> wrote: >> Roland Scheidegger wrote: >>> Roland Scheidegger wrote: >> Rune Petersen >> > Ok commited. I didn't look too closely at this but I've a couple of comments. - COS looks too complicated & broken. If y

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-15 Thread Roland Scheidegger
Roland Scheidegger wrote: > Rune Petersen wrote: >> This patch: - Fixes COS. - Does range reductions for SIN & COS. - >> Adds SCS. - removes the optimized version of SIN & COS. - tweaked >> weight (should help on precision). - fixed a copy paste typo in >> emit_arith(). >> >> Roland would you m

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-15 Thread Rune Petersen
Roland Scheidegger wrote: > Rune Petersen wrote: >> This patch: - Fixes COS. - Does range reductions for SIN & COS. - >> Adds SCS. - removes the optimized version of SIN & COS. - tweaked >> weight (should help on precision). - fixed a copy paste typo in >> emit_arith(). >> >> Roland would you mind

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-15 Thread Rune Petersen
Roland Scheidegger wrote: > Roland Scheidegger wrote: >> Rune Petersen wrote: >>> This patch: - Fixes COS. - Does range reductions for SIN & COS. - >>> Adds SCS. - removes the optimized version of SIN & COS. - tweaked >>> weight (should help on precision). - fixed a copy paste typo in >>> emit_a

Re: [R300][PATCH] Add/fix COS & SIN + FP fixes

2007-02-17 Thread Rune Petersen
Roland Scheidegger wrote: > Roland Scheidegger wrote: >> Rune Petersen wrote: >> Also, the comments for SCS seem a bit off. That's a pity, because >> without comments I can't really see what the code does at first sight >> :-). Looks like quite a few extra instructions though, are you sure >> not