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, that's 5 >> instructions before performing the sine, for something you can easily do >> in two, using another constant (just 1 add + 1 cmp needed, if you use >> the right constants for the add). Maybe it's not that bad though, I >> don't know how many rgb and a slots it will actually consume, but still, >> are constant slots that rare? >> Second, you'd really need to do range reduction of the input, otherwise >> results will be very wrong for inputs outside [-pi, pi]. This would be >> true for taylor approximation too, of course, unless you do an infinite >> series :-). You wouldn't need to do that for SCS.
The mess of trying to get 2 from RCP was a brain fart on my part. And since I forgot the range reduction, I'll add PI*0.5 and then do the range reduction. And this time I will need a constant more (r300 has 16). > > Oh, and forgot to mention, you probably really want to use the higher > precision variant by default. 12% max relative error (and even absolute > it's still 6%) will likely be visible in some cases depending what the > shader is doing. Even the enhanced version seems to miss opengl > conformance (accurate to "about 1 part in 10^5") by roughly a factor of > 10, which stretches the meaning of "about" a bit probably already. > You could also rely on the precision hint for fragment programs to > switch to the faster version instead of a dri conf option (note though > the spec explicitly states implementations are discouraged even in this > case to perform optimizations which could have significant impact on the > output). it helps to have the numbers. when making these decisions. Thank you for your feedback. Rune Petersen ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel