Number of GPU cycles for cos and sin functions?

Started by
13 comments, last by vNistelrooy 18 years, 11 months ago
They are single cycle on the 6800 according to NVIDIA. Google for it. Even if they aren't, they'd be faster than texture lookups with all the hassle involved.
Advertisement
Quote:Original post by _the_phantom_
As for the lack of instruction cycles, what you have to realise is that even the ARB_vertex/fragment_program interfaces while they might look like assembly do not have a 1:1 mapping of instructions to GPU instructions and with pipelining and the ability for the compiler to rearrange things cycle counts become somewhat redundant.


As well as doing multiple thing per cycle. For example a texture-lookup + a multiply-add instruction would be done in parrallel in one cycle (hopefully).
While it is important to understand things like that, concentrate on developing the shader and optimizing the bottlenecks in the shaders first.
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
the best way to check the speed of this stuff simply create a shader of what u wanna test, draw it to say a 1000x1000sized window, and see how fast it runs on your hardware, if anything is done in software youll soon tell
How will that allow you to properly differentiate between a 1 and 2 cycle cost?

oh, it won't.
Quote:Original post by Anonymous Poster
How will that allow you to properly differentiate between a 1 and 2 cycle cost?

oh, it won't.


Oh no. Your sin functions take 2 friggin' cycles. Come on, why should you care? Would you use different code pathes for cards that need an extra clock cycle? It is the shader performance tha counts, not the extra clock cycle...
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

This topic is closed to new replies.

Advertisement