# of Interpolated Varyings, Hidden Costs?

Started by
1 comment, last by TimothyFarrar 16 years, 5 months ago
General question for later model GPU's, Besides the obvious performance issues of number of texture fetches and operations, are there any hidden costs (clock cycles and memory bandwidth) associated with having a large number of interpolated (or even flat varyings with SM4.0) inputs to a fragment shader? Basically asking about the black box between the output of the vertex pipe and the input of the fragment pipe. I'd guess that the hardware has the ability to handle some smaller set number of interpolated variables per vertex (say the standard position, normal, texture position, etc, or about 12-16 FP32 values), and once that number is surpassed that triangle setup slows down. Also guessing there is a similar performance drop for large quantities of interpolated variables going to the fragment shaders. Anyone have any knowledge in these matters? Or better yet, know of any GPU performance graphs which cover these issues? [Edited by - TimothyFarrar on November 4, 2007 2:41:07 PM]
_|imothy Farrar :: www.farrarfocus.com/atom
Advertisement
There are two costs associated with attributes.

The first cost is the space used in passing attributes between the vertex and fragment shaders. Before g80, there was just a fixed maximum number of attributes you could pass and beyond that your shader would simply fail to compile. I'm not sure whether g80 acts the same way.

The second cost is in perspective correction of the interpolated attributes. Each interpolated attribute costs one division per component in the fragment shader. Of course this cost shouldn't apply to flat varyings.
"Math is hard" -Barbie
Quote:Original post by Pragma
There are two costs associated with attributes.

The first cost is the space used in passing attributes between the vertex and fragment shaders. Before g80, there was just a fixed maximum number of attributes you could pass and beyond that your shader would simply fail to compile. I'm not sure whether g80 acts the same way.

The second cost is in perspective correction of the interpolated attributes. Each interpolated attribute costs one division per component in the fragment shader. Of course this cost shouldn't apply to flat varyings.


Been looking for more info on this and I just read something on ATI's HD doing the interpolation in hardware something like 80 FP32s per clock cycle.

It also appears that the GeForce 8 series does interpolation as stream processor ops in the fragment shader.

Still found no info on the costs associated with the triangle setup side...
_|imothy Farrar :: www.farrarfocus.com/atom

This topic is closed to new replies.

Advertisement